Logo adaptatif (contain) dans le cadre du profil et les previews

- Avatar logo de la fiche adherent : <img> object-fit contain centre,
  cadre a overflow hidden -> plus de debordement quel que soit le ratio
- ImageField : prop fit (cover|contain). Champs logo en contain (apercu
  centre, non etire) dans l'edition fiche et l'espace adherent

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Opus 4.8 committed 2026-06-27 11:03:37 +02:00
1 parent aa63462eff
commit 497ea0562c
4 files changed
+19 -7

No files matched your search

+10 -4
View File
@@ -112,19 +112,25 @@ export default async function FicheAdherentPage({
width: 118,
height: 118,
borderRadius: 22,
background: member.logoUrl ? `url(${member.logoUrl})` : "#F6F2E8",
backgroundSize: "cover",
backgroundPosition: "center",
background: "#fff",
border: "4px solid #fff",
marginTop: -54,
flexShrink: 0,
display: "flex",
alignItems: "center",
justifyContent: "center",
overflow: "hidden",
boxShadow: "0 14px 30px -16px rgba(40,30,15,0.4)",
}}
>
{!member.logoUrl && (
{member.logoUrl ? (
// eslint-disable-next-line @next/next/no-img-element
<img
src={member.logoUrl}
alt={member.name}
style={{ maxWidth: "86%", maxHeight: "86%", objectFit: "contain", display: "block" }}
/>
) : (
<span className="font-display" style={{ fontWeight: 800, fontSize: 34, color: "#9a6638" }}>{initialsOf(member.name)}</span>
)}
</div>
+1 -1
View File
@@ -134,7 +134,7 @@ export default async function EditMemberPage({
<div className="grid grid-2" style={{ gap: 16, marginTop: 16 }}>
<ImageField name="coverUrl" label="Image d'entête (bannière)" defaultValue={member.coverUrl ?? ""} height={130} />
<ImageField name="logoUrl" label="Logo" defaultValue={member.logoUrl ?? ""} height={130} />
<ImageField name="logoUrl" label="Logo" defaultValue={member.logoUrl ?? ""} height={130} fit="contain" />
</div>
<div style={{ marginTop: 16 }}>
+1 -1
View File
@@ -126,7 +126,7 @@ export default async function EspacePage() {
<div className="grid grid-2" style={{ gap: 16, marginTop: 16 }}>
<ImageField name="coverUrl" label="Image d'entête (bannière)" defaultValue={profile.coverUrl ?? ""} height={130} />
<ImageField name="logoUrl" label="Logo" defaultValue={profile.logoUrl ?? ""} height={130} />
<ImageField name="logoUrl" label="Logo" defaultValue={profile.logoUrl ?? ""} height={130} fit="contain" />
</div>
<div style={{ marginTop: 16 }}>