Restructure navigation after 1xbet: utility bar, lottery strip, right rail

User feedback: still ugly, the 1xbet navigation was never actually
reproduced. Now follows its structure:
- thin utility bar on top (country picker, Connexion + Inscription)
  above the main bar (logo, nav)
- horizontal icon strip of the country's lotteries under the header,
  with the active one underlined in gold
- compact promo banner instead of a full-height hero, so results stay
  above the fold
- right rail in the bet-slip position: top-5 leaderboard and army stats

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Nazim Kri
2026-10-30 15:41:16 -04:00
co-authored by Claude Opus 5.5
parent e97b2e54ad
commit 9996f7b823
11 changed files with 233 additions and 158 deletions
+32 -80
View File
@@ -1,92 +1,44 @@
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
}) {
/** Compact promo banner, 1xbet-style: short, wide, one message and one CTA — data stays above the fold. */
export function Hero({ isAuthenticated }: { 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"
<section className="relative isolate overflow-hidden rounded-lg border border-gold/25">
<img
src="/lokilab/backgrounds/observatory-desktop.webp"
alt=""
aria-hidden="true"
className="absolute inset-0 -z-20 h-full w-full object-cover object-[center_35%]"
/>
<div className="absolute inset-0 -z-10 bg-gradient-to-r from-background via-background/85 to-background/20" />
<div className="flex min-h-[176px] items-center justify-between gap-4 pl-5 sm:pl-8">
<div className="py-5">
<p className="text-[11px] font-semibold uppercase tracking-[0.2em] text-mint">L&apos;armée de Loki</p>
<h1 className="mt-1.5 font-display text-2xl leading-tight sm:text-3xl">
Loki lit les tirages. <span className="text-gold">Suivez ses choix.</span>
</h1>
<p className="mt-1.5 max-w-md text-sm text-muted-foreground">
Suivez ses pronostics, grimpez au classement — gratuit.
</p>
<Button asChild size="sm" className="mt-3.5 h-9 px-5 font-semibold">
<Link href={isAuthenticated ? "/classement" : "/connexion?mode=inscription"}>
{isAuthenticated ? "Voir le classement" : "Rejoindre l'armée"}
</Link>
</Button>
</div>
<Image
src="/lokilab/mascots/loki-welcome-320.webp"
alt=""
aria-hidden="true"
className="h-full w-full object-cover"
width={320}
height={480}
priority
className="hidden h-[176px] w-auto self-end object-cover object-top sm:block sm:mr-6"
/>
</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>
)
}