Public Access
feat(ui): modern shadcn/ui theme with violet accent across all pages
Add shadcn/ui (Radix + Tailwind 4) components, zinc/violet theme tokens and self-hosted Inter. New header with user menu, Steam cover art, skeletons and toasts. Replace @mdi/font with lucide-react. Fix: top-owned list on the landing page only showed with top-played entries; numbers use the app language.
This commit is contained in:
1 parent
76a9ac3e6f
commit
e480369a98
43 files changed
+3804
-979
No files matched your search
@@ -0,0 +1,30 @@
|
||||
import {useState} from 'react';
|
||||
import {Gamepad2} from 'lucide-react';
|
||||
|
||||
import {cn} from '@/lib/utils';
|
||||
import {coverUrl} from '@/utils/games.js';
|
||||
|
||||
/**
|
||||
* Steam store header (460x215). Falls back to a neutral tile when the app has no header image.
|
||||
*/
|
||||
export default function GameCover({appid, className}) {
|
||||
const [failed, setFailed] = useState(false);
|
||||
|
||||
return (
|
||||
<div className={cn('aspect-[460/215] overflow-hidden rounded-md bg-muted', className)}>
|
||||
{failed ? (
|
||||
<div className="flex size-full items-center justify-center text-muted-foreground">
|
||||
<Gamepad2 className="size-1/3 max-h-8"/>
|
||||
</div>
|
||||
) : (
|
||||
<img
|
||||
src={coverUrl(appid)}
|
||||
alt=""
|
||||
loading="lazy"
|
||||
className="size-full object-cover"
|
||||
onError={() => setFailed(true)}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user