feat: ajouter la photo de Cyprien dans l'admin et la page maçon
- lib/site-images.ts : nouvelle clé macon_photo_cyprien (url vide par défaut, l'admin upload la vraie photo) - app/macon/page.tsx : remplace le placeholder SVG par un <img> conditionnel — affiche l'image quand la clé est renseignée, conserve le placeholder texte "Photo de Cyprien (sur le chantier)" tant qu'aucune photo n'est uploadée https://claude.ai/code/session_01PzA98VhLMmsHpzs7gnLHGs
This commit is contained in:
@@ -382,6 +382,14 @@ export default async function MaconPage() {
|
|||||||
<div className="relative">
|
<div className="relative">
|
||||||
<div className="absolute -inset-3 bg-orange/20 rounded-3xl blur-xl" />
|
<div className="absolute -inset-3 bg-orange/20 rounded-3xl blur-xl" />
|
||||||
<div className="relative w-72 h-80 sm:w-80 sm:h-96 rounded-2xl overflow-hidden border-2 border-white/10">
|
<div className="relative w-72 h-80 sm:w-80 sm:h-96 rounded-2xl overflow-hidden border-2 border-white/10">
|
||||||
|
{images.macon_photo_cyprien ? (
|
||||||
|
// eslint-disable-next-line @next/next/no-img-element
|
||||||
|
<img
|
||||||
|
src={images.macon_photo_cyprien}
|
||||||
|
alt="Cyprien, artisan maçon"
|
||||||
|
className="w-full h-full object-cover"
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
<div className="w-full h-full bg-navy-light flex items-center justify-center">
|
<div className="w-full h-full bg-navy-light flex items-center justify-center">
|
||||||
<div className="text-center">
|
<div className="text-center">
|
||||||
<div className="w-20 h-20 bg-orange/20 rounded-full flex items-center justify-center mx-auto mb-3">
|
<div className="w-20 h-20 bg-orange/20 rounded-full flex items-center justify-center mx-auto mb-3">
|
||||||
@@ -393,6 +401,7 @@ export default async function MaconPage() {
|
|||||||
<p className="text-white/20 text-xs mt-1">(sur le chantier)</p>
|
<p className="text-white/20 text-xs mt-1">(sur le chantier)</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="absolute -bottom-3 -right-3 bg-orange text-white text-xs font-bold px-4 py-2 rounded-xl shadow-lg">
|
<div className="absolute -bottom-3 -right-3 bg-orange text-white text-xs font-bold px-4 py-2 rounded-xl shadow-lg">
|
||||||
Artisan depuis 10 ans
|
Artisan depuis 10 ans
|
||||||
|
|||||||
@@ -44,6 +44,10 @@ export const DEFAULT_IMAGES: Record<string, { url: string; label: string }> = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// ── Démo Maçon ─────────────────────────────────────────────────────────────
|
// ── Démo Maçon ─────────────────────────────────────────────────────────────
|
||||||
|
macon_photo_cyprien: {
|
||||||
|
url: "",
|
||||||
|
label: "Maçon — Photo de Cyprien (sur le chantier)",
|
||||||
|
},
|
||||||
macon_hero: {
|
macon_hero: {
|
||||||
url: "https://images.unsplash.com/photo-1504307651254-35680f356dfd?auto=format&fit=crop&w=1920&q=80",
|
url: "https://images.unsplash.com/photo-1504307651254-35680f356dfd?auto=format&fit=crop&w=1920&q=80",
|
||||||
label: "Maçon — Photo fond Hero",
|
label: "Maçon — Photo fond Hero",
|
||||||
|
|||||||
Reference in New Issue
Block a user