Files
lokiloto/components/hero.tsx
T
Nazim KriandClaude Opus 5.5 2eafbfd3d7 Rebuild LokiLoto in the LokiLab visual universe
The hero and header used a hand-drawn geometric fox and flat grey
surfaces; the user asked for LokiLab's look. Brings over LokiLab's real
illustrated assets (Loki mascots, observatory/workshop backgrounds,
ornaments, the horned-gem mark) and its palette and type: midnight
#101827, brass gold, mint gem, ivory text, Fraunces display + Inter.
The hero now sits on the observatory scene with the waving Loki
illustration; --primary is brand gold, --success is mint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 09:25:04 -04:00

93 lines
3.8 KiB
TypeScript

import Image from "next/image"
import Link from "next/link"
import { Users, Trophy, Globe } from "lucide-react"
import { Button } from "@/components/ui/button"
export function Hero({
armyTotal,
countryCount,
totalWins,
isAuthenticated,
}: {
armyTotal: number
countryCount: number
totalWins: number
isAuthenticated: boolean
}) {
return (
<section className="relative isolate overflow-hidden border-b border-border">
<picture className="absolute inset-0 -z-20">
<source media="(max-width: 767px)" srcSet="/lokilab/backgrounds/observatory-mobile.webp" />
<img
src="/lokilab/backgrounds/observatory-desktop.webp"
alt=""
aria-hidden="true"
className="h-full w-full object-cover"
/>
</picture>
<div className="absolute inset-0 -z-10 bg-gradient-to-r from-background via-background/80 to-background/10" />
<div className="absolute inset-x-0 bottom-0 -z-10 h-40 bg-gradient-to-t from-background to-transparent" />
<div className="mx-auto grid min-h-[600px] max-w-6xl grid-cols-1 items-end gap-4 px-4 pt-10 sm:px-6 md:grid-cols-[1.1fr_0.9fr] md:items-center md:pt-0">
<div className="pb-4 md:py-16">
<p className="text-xs font-semibold uppercase tracking-[0.2em] text-mint">L&apos;armée de Loki</p>
<h1 className="mt-3 font-display text-4xl leading-[1.08] text-foreground sm:text-5xl lg:text-6xl">
Loki lit les tirages.
<br />
<span className="text-gold">Vous décidez de le suivre.</span>
</h1>
<p className="mt-5 max-w-md text-base leading-relaxed text-muted-foreground">
Résultats, statistiques et pronostics de loterie, pays par pays. Rejoignez l&apos;armée,
suivez les choix de Loki et grimpez au classement.
</p>
<div className="mt-7 flex flex-wrap items-center gap-3">
{!isAuthenticated && (
<Button asChild size="lg" className="h-11 px-6 font-semibold shadow-[0_0_24px_rgba(244,199,107,0.35)]">
<Link href="/connexion">Rejoindre l&apos;armée</Link>
</Button>
)}
<Button
asChild
variant="outline"
size="lg"
className="h-11 border-gold/40 bg-background/40 px-6 backdrop-blur hover:bg-gold/10"
>
<Link href="/classement">Voir le classement</Link>
</Button>
</div>
<div className="mt-10 grid max-w-lg grid-cols-3 gap-3">
<HeroStat icon={Users} value={armyTotal.toLocaleString("fr-CA")} label="Membres" />
<HeroStat icon={Globe} value={countryCount.toString()} label="Pays" />
<HeroStat icon={Trophy} value={totalWins.toString()} label="Grilles gagnées" />
</div>
</div>
<div className="relative flex justify-center md:justify-end">
<div className="absolute bottom-10 h-64 w-64 rounded-full bg-gold/20 blur-3xl" />
<Image
src="/lokilab/mascots/loki-welcome.webp"
alt="Loki, la mascotte de LokiLoto, salue de la main"
width={640}
height={960}
priority
sizes="(max-width: 767px) 260px, 420px"
className="relative h-[340px] w-auto drop-shadow-[0_20px_40px_rgba(0,0,0,0.6)] md:h-[560px]"
/>
</div>
</div>
</section>
)
}
function HeroStat({ icon: Icon, value, label }: { icon: typeof Users; value: string; label: string }) {
return (
<div className="rounded-lg border border-gold/20 bg-card/60 px-3 py-3 backdrop-blur">
<Icon className="h-4 w-4 text-gold" />
<p className="mt-2 font-display text-2xl leading-none text-foreground tabular-nums">{value}</p>
<p className="mt-1 text-[11px] text-muted-foreground">{label}</p>
</div>
)
}