Files
lokiloto/components/lottery-strip.tsx
T
Nazim KriandClaude Opus 5.5 ad214a24dd Landing redesign: animated hero, draw cards, how-it-works, footer
Keeps only countries with archived results (Québec, France, US, Spain,
Portugal). The landing gets motion and a real structure: staggered
fade-in hero with a floating Loki, twinkling stars, a shimmering gold CTA
and counters that tick up (draws archived, lotteries, countries); draw
cards in place of the table, with lottery balls dropping in and a
lift-on-hover; a three-step "Comment ça marche"; and a site-wide footer
with links, covered countries, responsible-play note and 18+ notice.
All motion is disabled under prefers-reduced-motion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:58:21 -04:00

71 lines
2.1 KiB
TypeScript

import Link from "next/link"
import { Clover, Crown, Dices, Gem, LayoutGrid, Sparkles, Star, Zap, type LucideIcon } from "lucide-react"
import { cn } from "@/lib/utils"
import type { LotteryFeedEntry } from "@/lib/lokilab-feed"
const ICONS: Record<string, LucideIcon> = {
"lotto-max": Crown,
"lotto-649": Clover,
"daily-grand": Gem,
powerball: Zap,
"mega-millions": Star,
"fr-loto": Clover,
euromillions: Sparkles,
}
export function lotteryIcon(id: string): LucideIcon {
return ICONS[id] ?? Dices
}
/** Horizontal icon strip under the header — the 1xbet sports-strip pattern, one tile per lottery. */
export function LotteryStrip({ lotteries, activeId }: { lotteries: LotteryFeedEntry[]; activeId?: string }) {
return (
<div className="border-b border-border bg-card/70">
<div className="mx-auto flex max-w-6xl items-stretch overflow-x-auto px-2 sm:px-4 [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden">
<StripItem href="/" icon={LayoutGrid} label="Tous" active={!activeId} />
{lotteries.map((l) => (
<StripItem
key={l.id}
href={`/loterie/${l.id}`}
icon={ICONS[l.id] ?? Dices}
label={shortName(l.name)}
active={activeId === l.id}
/>
))}
</div>
</div>
)
}
function StripItem({
href,
icon: Icon,
label,
active,
}: {
href: string
icon: LucideIcon
label: string
active?: boolean
}) {
return (
<Link
href={href}
aria-current={active ? "page" : undefined}
className={cn(
"flex w-[86px] shrink-0 flex-col items-center gap-1.5 border-b-2 px-2 pb-2.5 pt-3 text-center transition-colors",
active
? "border-gold bg-gold/5 text-gold"
: "border-transparent text-muted-foreground hover:bg-panel-hover/50 hover:text-foreground"
)}
>
<Icon className="h-5 w-5" />
<span className="w-full truncate text-[11px] leading-tight">{label}</span>
</Link>
)
}
function shortName(name: string) {
return name.replace(" (Daily Grand)", "").replace("Quotidienne ", "Quot. ")
}