From 41b3646325021a95e16daae5c86abdebcead0c3b Mon Sep 17 00:00:00 2001 From: luciano Date: Thu, 7 May 2026 11:04:40 +0200 Subject: [PATCH] feat(ui): layout edge-to-edge + font Geist su tutta l'app MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Font: Geist (Vercel) sostituisce Fraunces/Inter Tight; GeistMono al posto di JetBrains Mono. `--font-display`, `--font-sans`, `--font-mono` mappati tutti su Geist via alias CSS — vocabolario tipografico unificato sans-serif moderno. - Layout: rimosso `mx-auto max-w-7xl` da 7 pagine app (root, onboarding, profile, plan, tracking, fasting, shopping, recipe detail). Sostituito con `w-full px-6 sm:px-10 lg:px-16 xl:px-24` — edge-to-edge, ma respiro su 4K. Welcome/sign-in/sign-up restano stretti (testo lungo / form login). - Tailwind: fontFamily fallback display da `Georgia, serif` a `system-ui` sans. Rimosse le OpenType features di Fraunces (`cv11`, `dlig`) — Geist usa `ss01`/`ss03`. - Cleanup: rimosso `docs/~\$D_KetoPath.docx` (Word lockfile residuo). Co-Authored-By: Claude Opus 4.7 (1M context) --- apps/web/package.json | 1 + apps/web/src/app/[locale]/fasting/page.tsx | 2 +- apps/web/src/app/[locale]/layout.tsx | 26 ++---------------- apps/web/src/app/[locale]/onboarding/page.tsx | 2 +- apps/web/src/app/[locale]/page.tsx | 2 +- apps/web/src/app/[locale]/plan/page.tsx | 2 +- apps/web/src/app/[locale]/profile/page.tsx | 2 +- .../src/app/[locale]/recipes/[id]/page.tsx | 2 +- apps/web/src/app/[locale]/shopping/page.tsx | 2 +- apps/web/src/app/[locale]/tracking/page.tsx | 2 +- apps/web/src/styles/globals.css | 13 +++++++-- apps/web/tailwind.config.ts | 18 ++++++++++-- docs/~$D_KetoPath.docx | Bin 162 -> 0 bytes pnpm-lock.yaml | Bin 338993 -> 339616 bytes 14 files changed, 37 insertions(+), 37 deletions(-) delete mode 100644 docs/~$D_KetoPath.docx diff --git a/apps/web/package.json b/apps/web/package.json index 683e6df..1847824 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -23,6 +23,7 @@ "better-auth": "^1.0.21", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", + "geist": "^1.7.0", "lucide-react": "^0.439.0", "next": "^14.2.5", "next-intl": "^3.17.2", diff --git a/apps/web/src/app/[locale]/fasting/page.tsx b/apps/web/src/app/[locale]/fasting/page.tsx index 54acabe..8d2a2ea 100644 --- a/apps/web/src/app/[locale]/fasting/page.tsx +++ b/apps/web/src/app/[locale]/fasting/page.tsx @@ -43,7 +43,7 @@ function FastingPageContent({ return (
-
+
diff --git a/apps/web/src/app/[locale]/layout.tsx b/apps/web/src/app/[locale]/layout.tsx index 61d9b42..ce1fd13 100644 --- a/apps/web/src/app/[locale]/layout.tsx +++ b/apps/web/src/app/[locale]/layout.tsx @@ -1,5 +1,6 @@ +import { GeistMono } from 'geist/font/mono'; +import { GeistSans } from 'geist/font/sans'; import type { Metadata, Viewport } from 'next'; -import { Fraunces, Inter_Tight, JetBrains_Mono } from 'next/font/google'; import { notFound } from 'next/navigation'; import { NextIntlClientProvider } from 'next-intl'; import { getMessages, getTranslations, setRequestLocale } from 'next-intl/server'; @@ -10,27 +11,6 @@ import { locales, type Locale } from '@/i18n'; import '@/styles/globals.css'; -const fraunces = Fraunces({ - subsets: ['latin'], - variable: '--font-display', - display: 'swap', - style: ['normal', 'italic'], -}); - -const interTight = Inter_Tight({ - subsets: ['latin'], - variable: '--font-sans', - display: 'swap', - weight: ['400', '500', '600'], -}); - -const mono = JetBrains_Mono({ - subsets: ['latin'], - variable: '--font-mono', - display: 'swap', - weight: ['400', '500'], -}); - export function generateStaticParams() { return locales.map((locale) => ({ locale })); } @@ -88,7 +68,7 @@ export default async function LocaleLayout({ const messages = await getMessages(); return ( - + {children} diff --git a/apps/web/src/app/[locale]/onboarding/page.tsx b/apps/web/src/app/[locale]/onboarding/page.tsx index c77c974..6a83970 100644 --- a/apps/web/src/app/[locale]/onboarding/page.tsx +++ b/apps/web/src/app/[locale]/onboarding/page.tsx @@ -49,7 +49,7 @@ function OnboardingPageContent({ return (
-
+
diff --git a/apps/web/src/app/[locale]/page.tsx b/apps/web/src/app/[locale]/page.tsx index ec2e5b7..a66621e 100644 --- a/apps/web/src/app/[locale]/page.tsx +++ b/apps/web/src/app/[locale]/page.tsx @@ -18,7 +18,7 @@ export default async function HomePage({ params: { locale } }: { params: { local function HomeContent({ userName }: { userName: string | null }) { return (
-
+
{userName ? : }
diff --git a/apps/web/src/app/[locale]/plan/page.tsx b/apps/web/src/app/[locale]/plan/page.tsx index d9fe42c..c08dd72 100644 --- a/apps/web/src/app/[locale]/plan/page.tsx +++ b/apps/web/src/app/[locale]/plan/page.tsx @@ -57,7 +57,7 @@ function PlanPageContent({ return (
-
+
diff --git a/apps/web/src/app/[locale]/profile/page.tsx b/apps/web/src/app/[locale]/profile/page.tsx index a125b2b..f3f0be2 100644 --- a/apps/web/src/app/[locale]/profile/page.tsx +++ b/apps/web/src/app/[locale]/profile/page.tsx @@ -58,7 +58,7 @@ function ProfilePageContent({ return (
-
+
diff --git a/apps/web/src/app/[locale]/recipes/[id]/page.tsx b/apps/web/src/app/[locale]/recipes/[id]/page.tsx index 040b5f0..c32af93 100644 --- a/apps/web/src/app/[locale]/recipes/[id]/page.tsx +++ b/apps/web/src/app/[locale]/recipes/[id]/page.tsx @@ -110,7 +110,7 @@ function RecipeContent({ recipe }: { recipe: RecipeView }) { const phasesAll = recipe.phases.length === 3; return ( -
+
-
+
diff --git a/apps/web/src/app/[locale]/tracking/page.tsx b/apps/web/src/app/[locale]/tracking/page.tsx index 7d8794a..aa26717 100644 --- a/apps/web/src/app/[locale]/tracking/page.tsx +++ b/apps/web/src/app/[locale]/tracking/page.tsx @@ -65,7 +65,7 @@ function TrackingPageContent({ return (
-
+
diff --git a/apps/web/src/styles/globals.css b/apps/web/src/styles/globals.css index 58e3e12..3f51cc0 100644 --- a/apps/web/src/styles/globals.css +++ b/apps/web/src/styles/globals.css @@ -14,6 +14,12 @@ @layer base { :root { + /* Font aliases — il pacchetto `geist` espone --font-geist-sans / --font-geist-mono. + * Mappiamo le nostre tre keyword (display/sans/mono) tutte a Geist. */ + --font-display: var(--font-geist-sans); + --font-sans: var(--font-geist-sans); + --font-mono: var(--font-geist-mono); + --carta: 42 38% 94%; --carta-light: 44 45% 97%; --carta-dim: 40 30% 88%; @@ -87,7 +93,7 @@ @apply bg-background text-foreground font-sans; font-feature-settings: 'ss01' on, - 'cv11' on; + 'ss03' on; } /* paper grain — applied once, fixed, non-interactive */ @@ -117,10 +123,11 @@ h2, h3 { font-optical-sizing: auto; + letter-spacing: -0.02em; font-feature-settings: 'ss01' on, - 'liga' on, - 'dlig' on; + 'ss03' on, + 'liga' on; } .font-mono { diff --git a/apps/web/tailwind.config.ts b/apps/web/tailwind.config.ts index 3056f98..07feb9b 100644 --- a/apps/web/tailwind.config.ts +++ b/apps/web/tailwind.config.ts @@ -12,9 +12,21 @@ const config: Config = { }, extend: { fontFamily: { - display: ['var(--font-display)', 'Georgia', 'serif'], - sans: ['var(--font-sans)', 'system-ui', 'sans-serif'], - mono: ['var(--font-mono)', 'ui-monospace', 'monospace'], + display: [ + 'var(--font-display)', + 'system-ui', + '-apple-system', + 'BlinkMacSystemFont', + 'sans-serif', + ], + sans: [ + 'var(--font-sans)', + 'system-ui', + '-apple-system', + 'BlinkMacSystemFont', + 'sans-serif', + ], + mono: ['var(--font-mono)', 'ui-monospace', 'SFMono-Regular', 'monospace'], }, fontSize: { // tighter editorial display sizes diff --git a/docs/~$D_KetoPath.docx b/docs/~$D_KetoPath.docx deleted file mode 100644 index 533a3bc45652b66592242048ea9e3d31ec63b3f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 162 icmZScO)M!%&1WDDurc^DBr=o$VJZWudP%d1fdK$`b_C%7 diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 65b6e42d7abfd387bc011ab67c928186791bb682..e28dc86d63a16705e884a53838fced4d7ffa5f7d 100644 GIT binary patch delta 676 zcmdmZLuA2SkqvyD(-$`~OKi5{Oy&l&CR=gtpWGqZ$C93!Sv+|nlQ^@Xp84cJArV#} zt!FU#KS%RsezANGu;S)ba@$wQF@DgPe)J@hfNns3Norn6W@3(lbGWOnsezG#u0m)* zN@7W>LP@@Yp`Njxp+bI9>VgxVIm0XEff%nps@pU^u;ijaf4^ zDltDZsysV5&A_F++{rL6ImO4jKs!C%F(;+4BFEInP&+sx(a+P#Jv+d$Fu7E_A}h?x zry?iKSU=dJ%%{XM)T6?%qSQ34$~Y&f%G){1G}AvUW%|clMn!?V)QS=-1$8@HLt{N7 zJp=Xjw|^P8zx~T}-i^fs=)mb8-I)!ye|BN!VuJ7mZCHG!`@1vGflL2@OZZN=@nl{N zmk61j8NjSCz0{6HV0xh!^Afl^Gy_s6|F;sJUgySKk6T5ojR>lW#_7fWNR9y8^#`us zZ~6jvW~u3y1CfE)dK-`w=W=cTDd$W0?(iu-jxGbN=ZaRxIssgM6mPS+J~v zbHP63pPprjBnDO@3iJan7OkR_V{P~l;@g42r^X034&u!1OKn+h1#p7n8N)+q_;Zg99$o{7!!RJ9$P!jp_Q$6$PiPkKJ+wGV4Rm@Wld{|7~_fHjNEbc{xCEOb5o9_;%KbEVJhV04Xn_SO5S3