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:
1 parent
221b567d45
commit
a5d8dc355d
10 files changed
+133
-17
No files matched your search
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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} />
|
||||
) : (
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user