From f40bb3002929937a792f8d7c8e09b7a446fd5000 Mon Sep 17 00:00:00 2001 From: Mathew Date: Wed, 1 Jul 2026 22:41:04 +0200 Subject: [PATCH] Ajoute une image de couverture sur les cards de jeu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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) --- app/games/[slug]/page.tsx | 25 ++++++++++++++++++------- app/games/page.tsx | 24 +++++++++++++++++------- app/page.tsx | 27 ++++++++++++++++++++------- lib/games.ts | 5 +++++ 4 files changed, 60 insertions(+), 21 deletions(-) diff --git a/app/games/[slug]/page.tsx b/app/games/[slug]/page.tsx index 28187b5..5c5cb0e 100644 --- a/app/games/[slug]/page.tsx +++ b/app/games/[slug]/page.tsx @@ -65,15 +65,26 @@ export default async function GamePage({ params }: Props) { /> {/* HERO */}
-
+ {game.cover ? ( -
+ ) : ( +
+ +
+ )}
diff --git a/app/games/page.tsx b/app/games/page.tsx index 408fe70..80fd8e3 100644 --- a/app/games/page.tsx +++ b/app/games/page.tsx @@ -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" > -
+ {game.cover ? ( -
+ ) : ( +
+ +
+ )}

{statusLabel[game.status]} diff --git a/app/page.tsx b/app/page.tsx index 1c9b30a..26e49e7 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -3,6 +3,9 @@ import Image from "next/image"; import Link from "next/link"; import { motion } from "framer-motion"; +import { games } from "@/lib/games"; + +const featured = games[0]; // Screenshots WIP du projet. // Pour en ajouter : dépose l'image dans /public/image/Emberwild/ @@ -190,15 +193,25 @@ export default function Home() { href="/games/emberwild" className="group relative aspect-[16/9] bg-surface border border-border overflow-hidden block hover:border-accent transition-colors duration-500" > -

+ {featured?.cover ? ( Game placeholder -
+ ) : ( +
+ Game placeholder +
+ )}