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
+11
View File
@@ -65,6 +65,16 @@ export default async function GamePage({ params }: Props) {
/> />
{/* HERO */} {/* HERO */}
<section className="relative aspect-[21/9] sm:aspect-[21/8] bg-surface border-b border-border overflow-hidden"> <section className="relative aspect-[21/9] sm:aspect-[21/8] bg-surface border-b border-border overflow-hidden">
{game.cover ? (
<Image
src={game.cover}
alt={game.title}
fill
priority
sizes="100vw"
className="object-cover"
/>
) : (
<div className="absolute inset-0 flex items-center justify-center"> <div className="absolute inset-0 flex items-center justify-center">
<Image <Image
src="/image/Studio/Logo Flat.png" src="/image/Studio/Logo Flat.png"
@@ -74,6 +84,7 @@ export default async function GamePage({ params }: Props) {
className="opacity-20" className="opacity-20"
/> />
</div> </div>
)}
<div className="absolute inset-0 bg-gradient-to-t from-background via-background/40 to-transparent" /> <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="absolute bottom-0 left-0 right-0 px-6 lg:px-10 pb-10">
<div className="max-w-6xl mx-auto"> <div className="max-w-6xl mx-auto">
+10
View File
@@ -32,6 +32,15 @@ export default function GamesPage() {
href={`/games/${game.slug}`} 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" 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 ? (
<Image
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 className="absolute inset-0 flex items-center justify-center"> <div className="absolute inset-0 flex items-center justify-center">
<Image <Image
src="/image/Studio/Logo Flat.png" src="/image/Studio/Logo Flat.png"
@@ -41,6 +50,7 @@ export default function GamesPage() {
className="opacity-15 group-hover:opacity-25 group-hover:scale-105 transition-all duration-700" className="opacity-15 group-hover:opacity-25 group-hover:scale-105 transition-all duration-700"
/> />
</div> </div>
)}
<div className="absolute bottom-0 left-0 right-0 p-8 bg-gradient-to-t from-background via-background/80 to-transparent"> <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"> <p className="font-display text-xs tracking-[0.3em] text-accent mb-2">
{statusLabel[game.status]} {statusLabel[game.status]}
+13
View File
@@ -3,6 +3,9 @@
import Image from "next/image"; import Image from "next/image";
import Link from "next/link"; import Link from "next/link";
import { motion } from "framer-motion"; import { motion } from "framer-motion";
import { games } from "@/lib/games";
const featured = games[0];
// Screenshots WIP du projet. // Screenshots WIP du projet.
// Pour en ajouter : dépose l'image dans /public/image/Emberwild/ // Pour en ajouter : dépose l'image dans /public/image/Emberwild/
@@ -190,6 +193,15 @@ export default function Home() {
href="/games/emberwild" href="/games/emberwild"
className="group relative aspect-[16/9] bg-surface border border-border overflow-hidden block hover:border-accent transition-colors duration-500" className="group relative aspect-[16/9] bg-surface border border-border overflow-hidden block hover:border-accent transition-colors duration-500"
> >
{featured?.cover ? (
<Image
src={featured.cover}
alt={featured.title}
fill
sizes="(max-width: 1152px) 100vw, 1152px"
className="object-cover group-hover:scale-105 transition-transform duration-700 ease-out"
/>
) : (
<div className="absolute inset-0 flex items-center justify-center"> <div className="absolute inset-0 flex items-center justify-center">
<Image <Image
src="/image/Studio/Logo Flat.png" src="/image/Studio/Logo Flat.png"
@@ -199,6 +211,7 @@ export default function Home() {
className="opacity-20 group-hover:opacity-30 group-hover:scale-105 transition-all duration-700 ease-out" className="opacity-20 group-hover:opacity-30 group-hover:scale-105 transition-all duration-700 ease-out"
/> />
</div> </div>
)}
<div <div
aria-hidden aria-hidden
className="absolute inset-0 bg-accent/0 group-hover:bg-accent/[0.03] transition-colors duration-500" className="absolute inset-0 bg-accent/0 group-hover:bg-accent/[0.03] transition-colors duration-500"
+5
View File
@@ -7,6 +7,10 @@ export type Game = {
genres: string[]; genres: string[];
releaseWindow?: string; releaseWindow?: string;
steamUrl?: string; steamUrl?: string;
// Image de couverture affichée sur les cards (home, liste, page projet).
// Dépose l'image dans /public/image/Emberwild/ puis renseigne le chemin,
// ex: "/image/Emberwild/cover.jpg". Laisse vide pour un placeholder.
cover?: string;
}; };
export const games: Game[] = [ export const games: Game[] = [
@@ -19,6 +23,7 @@ export const games: Game[] = [
"Inspired by Raft and Aloft. Build, explore, and survive across drifting worlds. A new survival adventure currently in early development. The first world from Highland Games Studio.", "Inspired by Raft and Aloft. Build, explore, and survive across drifting worlds. A new survival adventure currently in early development. The first world from Highland Games Studio.",
genres: ["Survival", "Crafting", "Exploration"], genres: ["Survival", "Crafting", "Exploration"],
releaseWindow: "TBA", releaseWindow: "TBA",
// cover: "/image/Emberwild/cover.jpg",
}, },
]; ];