feat: adaptive promo images with blurred fill

Replace cover-crop background with PromoImage component: sharp
contain image over a blurred cover copy. Whole image visible on
any aspect ratio, no flat letterbox bars. Applied to accueil,
adherent profile, backend promotions, member space preview +
upload dropzone.

Also retheme adherent logo frame (cream gradient + warm border)
instead of flat white.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Opus 4.8 committed 2026-06-27 14:59:46 +02:00
1 parent c199d7a7db
commit 03eca6e9ae
5 files changed
+60 -19

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
/**
* Promo image that adapts to any aspect ratio.
* Sharp `contain` image on top of a blurred `cover` copy of itself,
* so the whole image is always visible with no flat letterbox bars.
* Render inside a `position: relative` box; place after it any
* badges/labels that must sit on top.
*/
export function PromoImage({ src, alt = "" }: { src: string; alt?: string }) {
return (
<>
<div
aria-hidden
style={{
position: "absolute",
inset: 0,
backgroundImage: `url(${src})`,
backgroundSize: "cover",
backgroundPosition: "center",
filter: "blur(18px) saturate(1.15)",
transform: "scale(1.18)",
}}
/>
<div aria-hidden style={{ position: "absolute", inset: 0, background: "rgba(40,30,15,0.16)" }} />
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={src}
alt={alt}
style={{
position: "absolute",
inset: 0,
width: "100%",
height: "100%",
objectFit: "contain",
display: "block",
}}
/>
</>
);
}