Fix+Feature: data-modal-close global fix, Breeder-Profil Logo+Galerie (SW by-v901)
This commit is contained in:
parent
b17706e7ba
commit
c417891546
7 changed files with 76 additions and 13 deletions
|
|
@ -3,7 +3,7 @@
|
|||
Router, State-Management, Navigation, Initialisierung.
|
||||
============================================================ */
|
||||
|
||||
const APP_VER = '900'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||
const APP_VER = '901'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||
const APP_VERSION = '1.5.1'; // ← semantische Version, wird bei make release gesetzt
|
||||
const IS_STAGING = location.hostname === 'staging.banyaro.app';
|
||||
// Cache-Bust-Parameter nach Update-Reload sofort entfernen
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ window.Page_breeder = (() => {
|
|||
<div style="display:flex;align-items:flex-start;gap:var(--space-3);flex-wrap:wrap">
|
||||
<div style="flex:1;min-width:0">
|
||||
<p style="margin:0 0 var(--space-1);font-size:var(--text-xs);opacity:.7;text-transform:uppercase;letter-spacing:.1em">
|
||||
Verifizierter Züchter
|
||||
${UI.icon('seal-check')} Verifizierter Züchter
|
||||
</p>
|
||||
<h1 style="margin:0 0 var(--space-2);font-size:clamp(1.3rem,4vw,1.9rem);font-weight:800;line-height:1.2;word-break:break-word">
|
||||
${_esc(p.zwingername)}
|
||||
|
|
@ -89,9 +89,16 @@ window.Page_breeder = (() => {
|
|||
${seit ? `<span style="opacity:.7;font-size:var(--text-xs)">Züchter seit ${_esc(seit)}</span>` : ''}
|
||||
</div>
|
||||
</div>
|
||||
<div style="background:rgba(255,255,255,.15);border-radius:50%;width:52px;height:52px;display:flex;align-items:center;justify-content:center;flex-shrink:0">
|
||||
<svg style="width:28px;height:28px" viewBox="0 0 256 256"><use href="/icons/phosphor.svg#seal-check"></use></svg>
|
||||
</div>
|
||||
${p.logo_url
|
||||
? `<img src="${_esc(p.logo_url)}" alt="Zwinger-Logo"
|
||||
style="width:72px;height:72px;border-radius:50%;object-fit:cover;
|
||||
border:3px solid rgba(255,255,255,.5);flex-shrink:0;box-shadow:0 2px 12px rgba(0,0,0,.25)"
|
||||
onerror="this.style.display='none'">`
|
||||
: `<div style="background:rgba(255,255,255,.15);border-radius:50%;width:64px;height:64px;
|
||||
display:flex;align-items:center;justify-content:center;flex-shrink:0">
|
||||
<svg style="width:32px;height:32px" viewBox="0 0 256 256"><use href="/icons/phosphor.svg#paw-print"></use></svg>
|
||||
</div>`
|
||||
}
|
||||
</div>
|
||||
|
||||
${!isOwnProfile ? `
|
||||
|
|
@ -192,8 +199,34 @@ window.Page_breeder = (() => {
|
|||
</dl>
|
||||
</div>
|
||||
|
||||
<!-- Fotos -->
|
||||
<div id="breeder-photos-section"></div>
|
||||
<!-- Fotos / Gallery -->
|
||||
${p.fotos?.length ? `
|
||||
<div style="margin-bottom:var(--space-4)">
|
||||
<h2 style="margin:0 0 var(--space-3);font-size:var(--text-base);font-weight:700;
|
||||
display:flex;align-items:center;gap:var(--space-2)">
|
||||
${UI.icon('images')} Galerie
|
||||
<span style="font-size:var(--text-xs);color:var(--c-text-muted);font-weight:400">${p.fotos.length} Fotos</span>
|
||||
</h2>
|
||||
<div style="display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-2)">
|
||||
${p.fotos.map((ph, i) => `
|
||||
<a href="${_esc(ph.url)}" target="_blank" rel="noopener noreferrer"
|
||||
style="display:block;border-radius:var(--radius-md);overflow:hidden;
|
||||
border:${ph.primary ? '2px solid var(--c-primary)' : '1px solid var(--c-border)'};
|
||||
aspect-ratio:1;position:relative">
|
||||
<img src="${_esc(ph.thumb)}" alt="${_esc(ph.caption)}"
|
||||
loading="${i < 6 ? 'eager' : 'lazy'}"
|
||||
style="width:100%;height:100%;object-fit:cover;display:block"
|
||||
onerror="this.parentElement.style.display='none'">
|
||||
${ph.primary ? `<span style="position:absolute;top:4px;left:4px;background:var(--c-primary);
|
||||
color:white;font-size:9px;font-weight:700;border-radius:999px;padding:1px 6px">Logo</span>` : ''}
|
||||
${ph.caption ? `<div style="position:absolute;bottom:0;left:0;right:0;
|
||||
background:linear-gradient(transparent,rgba(0,0,0,.6));
|
||||
color:white;font-size:10px;padding:12px 6px 4px;line-height:1.3">${_esc(ph.caption)}</div>` : ''}
|
||||
</a>`).join('')}
|
||||
</div>
|
||||
</div>` : ''}
|
||||
|
||||
<div id="breeder-photos-section" style="display:none"></div>
|
||||
|
||||
</div>`;
|
||||
|
||||
|
|
|
|||
|
|
@ -76,6 +76,9 @@ const UI = (() => {
|
|||
`;
|
||||
|
||||
overlay.querySelector('.modal-close-btn')?.addEventListener('click', close);
|
||||
overlay.addEventListener('click', e => {
|
||||
if (e.target.closest('[data-modal-close]')) close();
|
||||
});
|
||||
|
||||
document.getElementById('modal-container').appendChild(overlay);
|
||||
document.documentElement.classList.add('modal-open');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue