The homepage went straight into a dense dashboard with no brand identity up front — user feedback was blunt: "c'est quoi ça, j'ai demandé une belle landing page et interface." Adds a proper hero above the existing dashboard: a large, more detailed mascot illustration (LokiHeroMark, distinct from the small LokiMark used in the header), a real headline + tagline, "Rejoindre l'armée" / "Voir le classement" CTAs, and big-number stats (army size, country count, total wins). Brand-neutral gold accent, not tied to the selected country's color — the hero is identity, not data. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
86 lines
2.9 KiB
TypeScript
86 lines
2.9 KiB
TypeScript
import Link from "next/link"
|
|
import { LokiHeroMark } from "@/components/loki-hero-mark"
|
|
import { Button } from "@/components/ui/button"
|
|
import { Users, Trophy, Globe } from "lucide-react"
|
|
|
|
export function Hero({
|
|
armyTotal,
|
|
countryCount,
|
|
totalWins,
|
|
isAuthenticated,
|
|
}: {
|
|
armyTotal: number
|
|
countryCount: number
|
|
totalWins: number
|
|
isAuthenticated: boolean
|
|
}) {
|
|
return (
|
|
<section className="relative overflow-hidden border-b border-border/60">
|
|
<div
|
|
className="pointer-events-none absolute inset-0 -z-10"
|
|
style={{
|
|
background:
|
|
"radial-gradient(ellipse 80% 55% at 50% -10%, oklch(0.77 0.118 84.8 / 18%), transparent 65%)",
|
|
}}
|
|
/>
|
|
<div className="mx-auto grid max-w-6xl grid-cols-1 items-center gap-6 px-4 py-10 sm:px-6 md:grid-cols-[1fr_auto] md:py-16">
|
|
<div className="order-2 md:order-1">
|
|
<p className="text-sm font-semibold uppercase tracking-wide text-accent">
|
|
Le tricheur des loteries
|
|
</p>
|
|
<h1 className="mt-2 text-4xl font-extrabold leading-[1.05] tracking-tight sm:text-5xl">
|
|
Loki lit les tirages.
|
|
<br />
|
|
Vous décidez si vous le suivez.
|
|
</h1>
|
|
<p className="mt-4 max-w-md text-sm text-muted-foreground sm:text-base">
|
|
Statistiques, pronostics et historique de loterie, pays par pays. Rejoignez
|
|
l'armée, suivez les choix de Loki, grimpez au classement.
|
|
</p>
|
|
|
|
<div className="mt-6 flex flex-wrap items-center gap-3">
|
|
{!isAuthenticated && (
|
|
<Button asChild size="lg" className="font-semibold">
|
|
<Link href="/connexion">Rejoindre l'armée</Link>
|
|
</Button>
|
|
)}
|
|
<Button asChild variant="outline" size="lg">
|
|
<Link href="/classement">Voir le classement</Link>
|
|
</Button>
|
|
</div>
|
|
|
|
<div className="mt-8 flex flex-wrap gap-x-8 gap-y-4">
|
|
<HeroStat icon={Users} value={armyTotal.toLocaleString("fr-CA")} label="Membres de l'armée" />
|
|
<HeroStat icon={Globe} value={countryCount.toString()} label="Pays couverts" />
|
|
<HeroStat icon={Trophy} value={totalWins.toString()} label="Grilles gagnées par Loki" />
|
|
</div>
|
|
</div>
|
|
|
|
<div className="order-1 flex justify-center md:order-2">
|
|
<LokiHeroMark className="h-48 w-48 text-accent sm:h-64 sm:w-64 md:h-72 md:w-72" />
|
|
</div>
|
|
</div>
|
|
</section>
|
|
)
|
|
}
|
|
|
|
function HeroStat({
|
|
icon: Icon,
|
|
value,
|
|
label,
|
|
}: {
|
|
icon: typeof Users
|
|
value: string
|
|
label: string
|
|
}) {
|
|
return (
|
|
<div className="flex items-center gap-2">
|
|
<Icon className="h-5 w-5 shrink-0 text-accent" />
|
|
<div>
|
|
<p className="text-xl font-bold leading-none tabular-nums">{value}</p>
|
|
<p className="mt-0.5 text-xs text-muted-foreground">{label}</p>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|