Ajoute une image de couverture sur les cards de jeu
Deploy / deploy (push) Successful in 59s

- Champ `cover` dans lib/games.ts
- Branché sur la card home, la liste des jeux et le hero page projet
- Fallback placeholder logo si pas d'image

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-01 22:41:04 +02:00
parent 1d1792b43a
commit f40bb30029
4 changed files with 60 additions and 21 deletions
+18 -7
View File
@@ -65,15 +65,26 @@ export default async function GamePage({ params }: Props) {
/>
{/* HERO */}
<section className="relative aspect-[21/9] sm:aspect-[21/8] bg-surface border-b border-border overflow-hidden">
<div className="absolute inset-0 flex items-center justify-center">
{game.cover ? (
<Image
src="/image/Studio/Logo Flat.png"
alt=""
width={220}
height={148}
className="opacity-20"
src={game.cover}
alt={game.title}
fill
priority
sizes="100vw"
className="object-cover"
/>
</div>
) : (
<div className="absolute inset-0 flex items-center justify-center">
<Image
src="/image/Studio/Logo Flat.png"
alt=""
width={220}
height={148}
className="opacity-20"
/>
</div>
)}
<div className="absolute inset-0 bg-gradient-to-t from-background via-background/40 to-transparent" />
<div className="absolute bottom-0 left-0 right-0 px-6 lg:px-10 pb-10">
<div className="max-w-6xl mx-auto">
+17 -7
View File
@@ -32,15 +32,25 @@ export default function GamesPage() {
href={`/games/${game.slug}`}
className="group relative aspect-[16/9] sm:aspect-[21/9] bg-surface border border-border overflow-hidden block hover:border-accent transition-colors"
>
<div className="absolute inset-0 flex items-center justify-center">
{game.cover ? (
<Image
src="/image/Studio/Logo Flat.png"
alt=""
width={140}
height={94}
className="opacity-15 group-hover:opacity-25 group-hover:scale-105 transition-all duration-700"
src={game.cover}
alt={game.title}
fill
sizes="(max-width: 1024px) 100vw, 1024px"
className="object-cover group-hover:scale-105 transition-transform duration-700"
/>
</div>
) : (
<div className="absolute inset-0 flex items-center justify-center">
<Image
src="/image/Studio/Logo Flat.png"
alt=""
width={140}
height={94}
className="opacity-15 group-hover:opacity-25 group-hover:scale-105 transition-all duration-700"
/>
</div>
)}
<div className="absolute bottom-0 left-0 right-0 p-8 bg-gradient-to-t from-background via-background/80 to-transparent">
<p className="font-display text-xs tracking-[0.3em] text-accent mb-2">
{statusLabel[game.status]}