feat(ui): nav app persistente nel masthead (desktop + drawer mobile)

L'utente non aveva modo di saltare da una pagina app all'altra senza tornare alla home (solo il logo era cliccabile). Aggiunta nav globale:

- **Desktop**: row di link orizzontale a destra del logo (Cucina · Tracking · Digiuno · Spesa · Profilo · Abbonamento). Pagina corrente evidenziata in pomodoro, hover sulle altre.
- **Mobile**: bottone hamburger (≡ Menu) che apre un drawer sotto la riga di header con le 6 voci. Si chiude da solo al cambio di pathname.

`<Masthead>` ora è un Client Component (serve usePathname). Prop `showNav` (default false) controlla la nav: attivata sulle 7 pagine logged-in (`/`, /plan, /tracking, /fasting, /shopping, /profile, /billing, /recipes/[id]). Lasciata off su welcome, onboarding, sign-in, sign-up.

Aggiunti i18n keys: navPlan/navTracking/navFasting/navShopping/navProfile/navBilling. Rimossi gli `issueLabel="N. XX — ..."" dalle pagine app (`issueLabel` resta supportato per pagine senza nav).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
lucianoandClaude Opus 4.7 committed 2026-05-07 15:29:43 +02:00
1 parent 221b567d45
commit a5d8dc355d
10 files changed
+133 -17

No files matched your search

+2 -2
View File
@@ -39,7 +39,7 @@ function BillingPageContent({ status }: { status: BillingStatus | null }) {
return (
<div className="relative">
<div className="min-h-screen w-full px-6 sm:px-10 lg:px-16 xl:px-24">
<Masthead issueLabel="N. 08 — Abbonamento" />
<Masthead showNav />
<main className="pb-24 pt-12">
<p className="editorial-eyebrow">{t('errorLoading')}</p>
</main>
@@ -54,7 +54,7 @@ function BillingPageContent({ status }: { status: BillingStatus | null }) {
return (
<div className="relative">
<div className="min-h-screen w-full px-6 sm:px-10 lg:px-16 xl:px-24">
<Masthead issueLabel="N. 08 — Abbonamento" />
<Masthead showNav />
<main className="relative overflow-hidden pb-24 pt-10 sm:pt-12">
<CursorGlow color="hsl(var(--oro))" size={520} />
<div
+1 -1
View File
@@ -44,7 +44,7 @@ function FastingPageContent({
return (
<div className="relative">
<div className="min-h-screen w-full px-6 sm:px-10 lg:px-16 xl:px-24">
<Masthead issueLabel="N. 07 — Digiuno" />
<Masthead showNav />
<main className="relative overflow-hidden pb-24 pt-10 sm:pt-12">
<CursorGlow color="hsl(var(--pomodoro))" size={520} />
<div
+1 -1
View File
@@ -28,7 +28,7 @@ function HomeContent({
return (
<div className="relative">
<div className="min-h-screen w-full px-6 sm:px-10 lg:px-16 xl:px-24">
<Masthead />
<Masthead showNav={!!userName} />
{userName ? (
<SignedInDashboard userName={userName} billing={billing} />
) : (
+1 -1
View File
@@ -64,7 +64,7 @@ function PlanPageContent({
return (
<div className="relative">
<div className="min-h-screen w-full px-6 sm:px-10 lg:px-16 xl:px-24">
<Masthead issueLabel="N. 05 — Cucina" />
<Masthead showNav />
<main className="relative overflow-hidden py-10 sm:py-12">
<CursorGlow color="hsl(var(--pomodoro))" size={520} />
<div
+1 -1
View File
@@ -59,7 +59,7 @@ function ProfilePageContent({
return (
<div className="relative">
<div className="min-h-screen w-full px-6 sm:px-10 lg:px-16 xl:px-24">
<Masthead issueLabel="N. 04 — Profilo" />
<Masthead showNav />
<main className="relative overflow-hidden pb-24 pt-10 sm:pt-12">
<CursorGlow color="hsl(var(--oliva))" size={520} />
<div
@@ -111,7 +111,7 @@ function RecipeContent({ recipe }: { recipe: RecipeView }) {
return (
<div className="min-h-screen w-full px-6 sm:px-10 lg:px-16 xl:px-24">
<Masthead issueLabel={`N. 08 — ${t(`categoryLabel.${recipe.category}`)}`} />
<Masthead showNav />
<main className="py-10 sm:py-14">
<Link
href="/plan"
+1 -1
View File
@@ -54,7 +54,7 @@ function ShoppingPageContent({ list }: { list: ShoppingList | null }) {
return (
<div className="relative">
<div className="min-h-screen w-full px-6 sm:px-10 lg:px-16 xl:px-24">
<Masthead issueLabel="N. 09 — La spesa" />
<Masthead showNav />
<main className="relative overflow-hidden pb-24 pt-10 sm:pt-12">
<CursorGlow color="hsl(var(--oliva))" size={520} />
<div
+1 -1
View File
@@ -73,7 +73,7 @@ function TrackingPageContent({
return (
<div className="relative">
<div className="min-h-screen w-full px-6 sm:px-10 lg:px-16 xl:px-24">
<Masthead issueLabel="N. 06 — Tracking" />
<Masthead showNav />
<main className="relative overflow-hidden pb-24 pt-10 sm:pt-12">
<CursorGlow color="hsl(var(--oro))" size={520} />
<div