feat(01-04): design tokens Tailwind v4 + wire ClientDashboard in page.tsx

- globals.css: aggiunto @theme con palette light & clean (primary, secondary,
  tertiary, bg-subtle, border-light, accent, success, warning, info)
- app/c/[token]/page.tsx: import ClientDashboard, generateMetadata dinamico,
  React.cache() per deduplicare DB call tra metadata e render
This commit is contained in:
Simone Cavalli
2026-05-14 21:43:41 +02:00
parent 4707ab5d6f
commit 4e703d7068
2 changed files with 66 additions and 30 deletions
+39 -17
View File
@@ -1,26 +1,48 @@
@import "tailwindcss";
:root {
--background: #ffffff;
--foreground: #171717;
}
/* =========================================================
Design tokens — light & clean palette (Tailwind v4 @theme)
========================================================= */
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--font-sans: var(--font-geist-sans);
/* Colori base */
--color-background: #ffffff;
--color-foreground: #171717;
/* Font */
--font-sans: var(--font-geist-sans), system-ui, -apple-system, BlinkMacSystemFont,
"Segoe UI", Roboto, "Helvetica Neue", sans-serif;
--font-mono: var(--font-geist-mono);
/* Palette brand iamcavalli — light & clean */
--color-primary: #1a1a1a; /* charcoal per testo principale */
--color-secondary: #666666; /* grigio medio per testo secondario */
--color-tertiary: #999999; /* grigio chiaro per hint e timestamp */
--color-bg-subtle: #f9f9f9; /* grigio molto chiaro per sfondi sezione */
--color-border-light: #e5e5e5; /* bordo sottile */
--color-accent: #0066cc; /* blu accent */
--color-success: #16a34a; /* verde per done/saldato */
--color-warning: #ca8a04; /* giallo per in_progress/inviata */
--color-info: #2563eb; /* blu per pending/da_saldare */
}
@media (prefers-color-scheme: dark) {
:root {
--background: #0a0a0a;
--foreground: #ededed;
}
/* =========================================================
Base styles
========================================================= */
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
}
body {
background: var(--background);
color: var(--foreground);
font-family: Arial, Helvetica, sans-serif;
}
background-color: #ffffff;
color: #171717;
font-family: var(--font-sans);
line-height: 1.6;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}