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>
This commit is contained in:
Nazim Kri
2026-10-30 09:25:04 -04:00
co-authored by Claude Opus 5.5
parent 8a45c331c3
commit 2eafbfd3d7
91 changed files with 114 additions and 144 deletions
+11 -9
View File
@@ -1,23 +1,25 @@
import Image from "next/image"
import Link from "next/link"
import { Suspense } from "react"
import { LokiMark } from "@/components/loki-mark"
import { UserMenu } from "@/components/user-menu"
import { Skeleton } from "@/components/ui/skeleton"
export function AppHeader() {
return (
<div className="h-14 border-b border-border/60 bg-card">
<div className="mx-auto flex h-full max-w-6xl items-center gap-5 px-4 sm:px-6">
<Link href="/" className="flex shrink-0 items-center gap-2">
<LokiMark className="h-8 w-8 text-accent" />
<span className="text-base font-bold tracking-tight">LokiLoto</span>
<div className="sticky top-0 z-30 h-14 border-b border-border bg-background/85 backdrop-blur">
<div className="mx-auto flex h-full max-w-6xl items-center gap-6 px-4 sm:px-6">
<Link href="/" className="flex shrink-0 items-center gap-2.5">
<Image src="/lokilab/ui/loki-mark.svg" alt="" aria-hidden="true" width={30} height={30} />
<span className="font-display text-xl text-foreground">
Loki<span className="text-gold">Loto</span>
</span>
</Link>
<nav className="hidden items-center gap-4 text-sm text-muted-foreground sm:flex">
<Link href="/" className="hover:text-foreground">
<nav className="hidden items-center gap-5 text-sm text-muted-foreground sm:flex">
<Link href="/" className="transition-colors hover:text-gold">
Résultats
</Link>
<Link href="/classement" className="hover:text-foreground">
<Link href="/classement" className="transition-colors hover:text-gold">
Classement
</Link>
</nav>
+51 -44
View File
@@ -1,7 +1,7 @@
import Image from "next/image"
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"
import { Button } from "@/components/ui/button"
export function Hero({
armyTotal,
@@ -15,71 +15,78 @@ export function Hero({
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">
<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 />
Vous décidez si vous le suivez.
<span className="text-gold">Vous décidez de le suivre.</span>
</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&apos;armée, suivez les choix de Loki, grimpez au classement.
<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-6 flex flex-wrap items-center gap-3">
<div className="mt-7 flex flex-wrap items-center gap-3">
{!isAuthenticated && (
<Button asChild size="lg" className="font-semibold">
<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">
<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-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 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="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 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
}) {
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 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>
)
}
-52
View File
@@ -1,52 +0,0 @@
/**
* Large-format hero illustration of the mascot — more detail than LokiMark
* (which is tuned for 20-24px). Same palette-swap contract: every fill is
* currentColor or a var(), never a hardcoded country color.
*/
export function LokiHeroMark({ className }: { className?: string }) {
return (
<svg viewBox="0 0 400 400" fill="none" className={className} aria-hidden="true">
{/* Back glow */}
<circle cx="200" cy="210" r="170" fill="var(--accent-soft)" />
{/* Ears */}
<path d="M100 60 L170 150 L120 170 Z" fill="currentColor" />
<path d="M300 60 L230 150 L280 170 Z" fill="currentColor" />
<path d="M118 90 L160 148 L132 158 Z" fill="var(--background)" opacity="0.35" />
<path d="M282 90 L240 148 L268 158 Z" fill="var(--background)" opacity="0.35" />
{/* Head */}
<path
d="M200 110
C 270 110 310 165 310 225
C 310 300 260 340 200 340
C 140 340 90 300 90 225
C 90 165 130 110 200 110 Z"
fill="currentColor"
/>
{/* Cheek markings */}
<path d="M90 225 C 90 270 115 305 150 325 L 140 260 Z" fill="var(--background)" opacity="0.18" />
<path d="M310 225 C 310 270 285 305 250 325 L 260 260 Z" fill="var(--background)" opacity="0.18" />
{/* Muzzle */}
<path
d="M160 255 C 160 290 178 312 200 312 C 222 312 240 290 240 255 C 240 235 222 222 200 222 C 178 222 160 235 160 255 Z"
fill="var(--background)"
/>
<ellipse cx="200" cy="258" rx="14" ry="10" fill="currentColor" />
{/* Eyes */}
<ellipse cx="160" cy="210" rx="16" ry="20" fill="var(--background)" />
<ellipse cx="240" cy="210" rx="16" ry="20" fill="var(--background)" />
<circle cx="162" cy="214" r="8" fill="currentColor" />
<circle cx="238" cy="214" r="8" fill="currentColor" />
<circle cx="165" cy="210" r="2.5" fill="var(--background)" />
<circle cx="241" cy="210" r="2.5" fill="var(--background)" />
{/* Eyebrows — trickster tilt */}
<path d="M140 182 Q 160 170 180 180" stroke="currentColor" strokeWidth="6" strokeLinecap="round" />
<path d="M260 182 Q 240 170 220 180" stroke="currentColor" strokeWidth="6" strokeLinecap="round" />
</svg>
)
}