Build & Push Docker Image / build (push) Has been cancelled
Refresh the homepage around new hero/services/roadmap sections, shared design tokens, and updated brand assets. Co-authored-by: Cursor <cursoragent@cursor.com>
3.2 KiB
3.2 KiB
Shadcn / Tailark Adaptation
Imported blocks are starting points—not finished UI. Every Shadcn UI or Tailark block must be adapted to Amin Rayan tokens before merge.
Goals
- Visual continuity with existing sections.
- One container, one spacing scale, one button/card system.
- Dark mode and RTL friendliness preserved.
Adaptation checklist (mandatory)
When adding or regenerating a block:
- Container — Replace
container,mx-auto max-w-*, and foreignpx-*with<Container>/layout.container. - Section rhythm — Outer
<section>useslayout.sectionY(+section-shell/bg-section-*as appropriate). - Colors — Remap to semantic tokens (
bg-background,text-foreground,primary,muted-foreground,border). Delete purple/zinc hardcodes. - Typography — Swap ad-hoc heading classes for
type.*/<Typography>. - Buttons — Use
@/components/ui/buttononly; map sizes tosm | default | lg. - Cards — Prefer
@/components/ui/card; remove stacked shadow recipes that fightshadow-sm. - Radius — Align to
--radiusscale (rounded-md,rounded-xl,rounded-blogwhere relevant). - Shadows — Prefer
shadow-xs/shadow-sm/shadow-md/shadow-glow-primary. - Motion — Prefer
MotionRevealor existing duration scale; strip flashy infinite animations unless product-required. - Dark mode — Verify
.darkwith semantic tokens; removedark:hacks that reintroduce foreign palettes. - A11y — Keep Radix behaviors; ensure labels, focus, and reduced motion.
- Alignment QA — Compare left/right edges with header/footer.
Never allow after import
| Banned | Replace with |
|---|---|
Random containers / max-w-5xl shells |
<Container> |
| Random hex colors | Semantic tokens |
| Random typography stacks | type.* |
| Parallel button CSS | Button |
Arbitrary spacing (p-[1.125rem]) |
Spacing scale |
| Purple / indigo marketing gradients | Brand gradients |
| Extra global CSS for one block | Local Tailwind + existing utilities |
Workflow
npx shadcn@latest add button
# or paste a Tailark section into components/
Then immediately:
- Open container.md + quality-checklist.md.
- Diff the block against a known-good section (
services-14,cta-16,footer). - Delete unused vendor CSS variables.
- Wire copy to Persian where the surface is fa-IR.
Example transform
// ❌ Vendor
<section className="py-24">
<div className="mx-auto max-w-5xl px-4">
<h2 className="text-4xl font-bold tracking-tight">…</h2>
<button className="rounded-full bg-indigo-600 px-6 py-3 text-white">…</button>
</div>
</section>
// ✅ Adapted
<section className={cn("section-shell bg-section-canvas", layout.sectionY)}>
<Container>
<h2 className={type.h2}>…</h2>
<Button size="lg">…</Button>
</Container>
</section>
Existing UI primitives
Prefer composing from components/ui/* already in the repo (59+ primitives) instead of re-adding duplicates.
Related
- coding-rules.md
- quality-checklist.md
- Cursor rule:
.cursor/rules/shadcn.mdc