- 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:
+20
-7
@@ -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"
|
||||
>
|
||||
<div className="absolute inset-0 flex items-center justify-center">
|
||||
{featured?.cover ? (
|
||||
<Image
|
||||
src="/image/Studio/Logo Flat.png"
|
||||
alt="Game placeholder"
|
||||
width={120}
|
||||
height={80}
|
||||
className="opacity-20 group-hover:opacity-30 group-hover:scale-105 transition-all duration-700 ease-out"
|
||||
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>
|
||||
) : (
|
||||
<div className="absolute inset-0 flex items-center justify-center">
|
||||
<Image
|
||||
src="/image/Studio/Logo Flat.png"
|
||||
alt="Game placeholder"
|
||||
width={120}
|
||||
height={80}
|
||||
className="opacity-20 group-hover:opacity-30 group-hover:scale-105 transition-all duration-700 ease-out"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
aria-hidden
|
||||
className="absolute inset-0 bg-accent/0 group-hover:bg-accent/[0.03] transition-colors duration-500"
|
||||
|
||||
Reference in New Issue
Block a user