Rifinisce l'interfaccia su safe area, materiali, tipografia e accessibilità.
Nessun cambio di funzionalità: solo resa, accessibilità e correzioni al layout su iPhone. - Aggiunge `viewport-fit=cover`: senza, su iOS `env(safe-area-inset-*)` valeva 0 e il margine per la barra gesture già presente nella bottom nav non aveva effetto. Aggiunge il margine superiore su hero, PageHeader e header dello scout, che in modalità standalone finivano sotto il notch. - Attiva il tema scuro sulla preferenza di sistema e ne riscrive i valori: l'accento resta il rosso del brand (prima diventava grigio-blu) e i token semantici che mancavano ora ci sono. `theme-color` ha una tinta per tema. - Sposta il feedback dal rilascio alla pressione su Button, bottom nav e comandi principali; aggiunge l'anello di focus da tastiera in `@layer base`, che mancava su tutti i bottoni scritti a mano fuori da components/ui/. - Rende la bottom nav una superficie traslucida con sfumatura di scorrimento al posto della riga netta, alleggerisce il velo dei drawer e sostituisce l'alone rosso delle ombre con ombre neutre. - Introduce una scala tipografica in rem con crenatura e interlinea per taglia, al posto dei 109 `text-[Npx]` fissi che non scalavano con l'impostazione di testo del sistema. - Porta a 44px le aree di tocco dei comandi piccoli, mostra uno scheletro di pagina al posto della schermata bianca in home e profilo, conserva le dissolvenze con movimento ridotto e aggiunge il supporto a `prefers-reduced-transparency` e `prefers-contrast`. - Anima l'apertura delle sezioni a tendina con Radix Collapsible, già fra le dipendenze, al posto di un montaggio secco. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
952f7b43d3
commit
f3b22583ed
30 files changed
+555
-202
No files matched your search
@@ -45,21 +45,21 @@ function CardBadge({ b, opaco, indice = 0 }: { b: BadgeStato; opaco?: boolean; i
|
||||
<div className="flex items-center justify-between">
|
||||
<Icon className={cn("h-6 w-6", meta ? meta.text : "text-muted-foreground/50")} />
|
||||
{meta ? (
|
||||
<span className={cn("text-[10px] font-bold uppercase", meta.text)}>{meta.label}</span>
|
||||
<span className={cn("text-3xs font-bold uppercase", meta.text)}>{meta.label}</span>
|
||||
) : null}
|
||||
</div>
|
||||
<p className="mt-1.5 text-sm font-bold leading-tight">{b.def.nome}</p>
|
||||
<p className="text-[11px] text-muted-foreground">
|
||||
<p className="text-2xs text-muted-foreground">
|
||||
{b.valore} {b.def.unita}
|
||||
</p>
|
||||
{b.prossimaSoglia ? (
|
||||
<>
|
||||
<Barra percentuale={b.progresso} altezza="h-1.5" trackClassName="mt-2" />
|
||||
<p className="mt-1 text-[10px] font-semibold text-accent">{mancanoPer(b)}</p>
|
||||
<p className="text-[10px] text-muted-foreground">{microcopyBadge(b)}</p>
|
||||
<p className="mt-1 text-3xs font-semibold text-accent">{mancanoPer(b)}</p>
|
||||
<p className="text-3xs text-muted-foreground">{microcopyBadge(b)}</p>
|
||||
</>
|
||||
) : (
|
||||
<p className="mt-2 text-[10px] text-muted-foreground">{microcopyBadge(b)}</p>
|
||||
<p className="mt-2 text-3xs text-muted-foreground">{microcopyBadge(b)}</p>
|
||||
)}
|
||||
</Reveal>
|
||||
);
|
||||
@@ -96,7 +96,7 @@ function SocialDrawer({
|
||||
</div>
|
||||
</div>
|
||||
<div className="rounded-2xl bg-card p-4 shadow-card ring-1 ring-border">
|
||||
<p className="text-[11px] font-bold uppercase tracking-wide text-muted-foreground">
|
||||
<p className="text-2xs font-bold uppercase tracking-wide text-muted-foreground">
|
||||
Vinto
|
||||
</p>
|
||||
<p className="mt-1 font-display text-3xl leading-none">
|
||||
@@ -141,7 +141,7 @@ export function CollezioneBadge({
|
||||
<div className="rounded-3xl bg-hero p-4 text-primary-foreground shadow-card">
|
||||
<div className="flex items-end justify-between gap-3">
|
||||
<div className="min-w-0">
|
||||
<p className="text-[11px] font-semibold uppercase tracking-wide text-primary-foreground/60">
|
||||
<p className="text-2xs font-semibold uppercase tracking-wide text-primary-foreground/60">
|
||||
Collezione badge
|
||||
</p>
|
||||
<p className="font-display text-4xl leading-none">
|
||||
@@ -158,7 +158,7 @@ export function CollezioneBadge({
|
||||
|
||||
{vicino ? (
|
||||
<div className="rounded-3xl bg-card p-4 shadow-card ring-1 ring-accent/30">
|
||||
<p className="text-[11px] font-bold uppercase tracking-wide text-accent">
|
||||
<p className="text-2xs font-bold uppercase tracking-wide text-accent">
|
||||
Prossimo traguardo
|
||||
</p>
|
||||
<p className="mt-1 text-sm font-bold leading-tight">{vicino.def.nome}</p>
|
||||
@@ -171,7 +171,7 @@ export function CollezioneBadge({
|
||||
|
||||
{c.sbloccati.length > 0 ? (
|
||||
<div>
|
||||
<p className="mb-2 text-[11px] font-bold uppercase tracking-wide text-muted-foreground">
|
||||
<p className="mb-2 text-2xs font-bold uppercase tracking-wide text-muted-foreground">
|
||||
Sbloccati ({c.sbloccati.length})
|
||||
</p>
|
||||
<div className="grid grid-cols-2 gap-2">
|
||||
@@ -186,7 +186,7 @@ export function CollezioneBadge({
|
||||
|
||||
{c.inProgresso.length > 0 ? (
|
||||
<div>
|
||||
<p className="mb-2 text-[11px] font-bold uppercase tracking-wide text-muted-foreground">
|
||||
<p className="mb-2 text-2xs font-bold uppercase tracking-wide text-muted-foreground">
|
||||
In progresso ({c.inProgresso.length})
|
||||
</p>
|
||||
<div className="grid grid-cols-2 gap-2">
|
||||
@@ -201,7 +201,7 @@ export function CollezioneBadge({
|
||||
|
||||
{socialVinti.length > 0 ? (
|
||||
<div>
|
||||
<p className="mb-2 text-[11px] font-bold uppercase tracking-wide text-muted-foreground">
|
||||
<p className="mb-2 text-2xs font-bold uppercase tracking-wide text-muted-foreground">
|
||||
Votati dai compagni
|
||||
</p>
|
||||
<div className="grid grid-cols-2 gap-2">
|
||||
@@ -210,7 +210,7 @@ export function CollezioneBadge({
|
||||
<div className="rounded-2xl bg-card p-3 shadow-card ring-1 ring-accent/25">
|
||||
<p className="text-lg leading-none">{cat.emoji}</p>
|
||||
<p className="mt-1 text-sm font-bold leading-tight">{cat.nome}</p>
|
||||
<p className="text-[11px] text-muted-foreground">
|
||||
<p className="text-2xs text-muted-foreground">
|
||||
Vinto {social[cat.id]} {social[cat.id] === 1 ? "volta" : "volte"}
|
||||
</p>
|
||||
</div>
|
||||
@@ -221,7 +221,7 @@ export function CollezioneBadge({
|
||||
) : null}
|
||||
|
||||
<div>
|
||||
<p className="mb-2 text-[11px] font-bold uppercase tracking-wide text-muted-foreground">
|
||||
<p className="mb-2 text-2xs font-bold uppercase tracking-wide text-muted-foreground">
|
||||
Badge segreti
|
||||
</p>
|
||||
<div className="grid grid-cols-2 gap-2">
|
||||
@@ -232,7 +232,7 @@ export function CollezioneBadge({
|
||||
<div className="rounded-2xl bg-card p-3 shadow-card ring-1 ring-oro/40">
|
||||
<Icon className="h-6 w-6 text-oro" />
|
||||
<p className="mt-1.5 text-sm font-bold leading-tight">{b.def.nome}</p>
|
||||
<p className="text-[11px] text-muted-foreground">
|
||||
<p className="text-2xs text-muted-foreground">
|
||||
{b.def.celebrazione ?? "Badge segreto sbloccato."}
|
||||
</p>
|
||||
</div>
|
||||
@@ -246,7 +246,7 @@ export function CollezioneBadge({
|
||||
>
|
||||
<Lucchetto className="h-6 w-6 text-muted-foreground/50" />
|
||||
<p className="mt-1.5 text-sm font-bold leading-tight text-muted-foreground">???</p>
|
||||
<p className="text-[11px] text-muted-foreground/70">Badge segreto da scoprire</p>
|
||||
<p className="text-2xs text-muted-foreground/70">Badge segreto da scoprire</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user