Real design pass: shadcn/ui, dark sportsbook-style UI, per-country accent
Replaces the plain proof-of-concept page with a proper design: shadcn/ui component foundation, dark theme by default, a brand bar + country selector pill nav, lottery cards with real number chips and win-state highlighting, and a shared Loki mark reskinned per country via a single --accent CSS variable (set from lib/countries.ts's flag-derived OKLCH palette) — one mascot, one layout, color is the only thing that changes per country, as specified. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
3017d612e3
commit
8621284cab
@@ -0,0 +1,50 @@
|
||||
"use client"
|
||||
|
||||
import Link from "next/link"
|
||||
import { usePathname, useSearchParams } from "next/navigation"
|
||||
import { COUNTRIES } from "@/lib/countries"
|
||||
import { cn } from "@/lib/utils"
|
||||
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area"
|
||||
|
||||
export function CountrySelector({ active }: { active: string }) {
|
||||
const pathname = usePathname()
|
||||
const searchParams = useSearchParams()
|
||||
|
||||
function hrefFor(code: string) {
|
||||
const params = new URLSearchParams(searchParams.toString())
|
||||
params.set("country", code)
|
||||
return `${pathname}?${params.toString()}`
|
||||
}
|
||||
|
||||
return (
|
||||
<ScrollArea className="w-full">
|
||||
<nav
|
||||
aria-label="Sélection du pays"
|
||||
className="flex items-center gap-1.5 pb-3"
|
||||
>
|
||||
{COUNTRIES.map((c) => {
|
||||
const isActive = c.code === active
|
||||
return (
|
||||
<Link
|
||||
key={c.code}
|
||||
href={hrefFor(c.code)}
|
||||
aria-current={isActive ? "page" : undefined}
|
||||
className={cn(
|
||||
"flex shrink-0 items-center gap-1.5 rounded-full border px-3.5 py-2 text-sm font-medium transition-colors",
|
||||
isActive
|
||||
? "border-accent bg-accent-soft text-foreground"
|
||||
: "border-border text-muted-foreground hover:border-accent/40 hover:text-foreground"
|
||||
)}
|
||||
>
|
||||
<span aria-hidden className="text-base leading-none">
|
||||
{c.flagEmoji}
|
||||
</span>
|
||||
{c.name}
|
||||
</Link>
|
||||
)
|
||||
})}
|
||||
</nav>
|
||||
<ScrollBar orientation="horizontal" />
|
||||
</ScrollArea>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user