Routenübersicht: immer Karten-Preview statt erstem Foto, Kamera-Badge bei Routen mit Bildern
Bisher: wenn eine Route Fotos hatte, zeigte die Karten-Übersicht das erste Foto statt der Mini-Map → kein Vergleich der Tracks auf einen Blick möglich. Jetzt: die Mini-Map ist immer da, ein kleiner Kamera-Badge oben rechts zeigt die Anzahl Fotos an (analog zum Tagebuch). Die Fotos sind weiter unverändert in der Route-Detail-Ansicht zu sehen. CSS: .rk-card-preview bekommt position:relative für das Badge.
This commit is contained in:
parent
4cfce1051f
commit
f934560a12
7 changed files with 40 additions and 22 deletions
|
|
@ -1411,12 +1411,29 @@ window.Page_routes = (() => {
|
|||
const paws = HUNDE_LABEL[r.hunde_tauglichkeit] || '';
|
||||
const dist = r.distanz_km ? `${r.distanz_km.toFixed(1)} km` : '';
|
||||
const dur = r.dauer_min ? _fmtDur(r.dauer_min) : '';
|
||||
const firstPhoto = (r.foto_urls || [])[0];
|
||||
const previewContent = firstPhoto
|
||||
? `<img src="${UI.escape(firstPhoto)}" style="width:100%;height:100%;object-fit:cover">`
|
||||
: `<div class="rk-mini-map" data-id="${r.id}"
|
||||
data-track='${JSON.stringify(r.preview_track||[])}'
|
||||
style="width:100%;height:100%"></div>`;
|
||||
// Immer die Karte zeigen — Fotos erst beim Öffnen der Route.
|
||||
// Bei Routen mit Fotos einen kleinen Kamera-Marker oben rechts
|
||||
// einblenden (analog zum Tagebuch).
|
||||
const photoCount = (r.foto_urls || []).length;
|
||||
const photoBadge = photoCount > 0
|
||||
? `<div class="rk-photo-badge"
|
||||
style="position:absolute;top:6px;right:6px;z-index:2;
|
||||
display:flex;align-items:center;gap:3px;
|
||||
padding:3px 7px;border-radius:999px;
|
||||
background:rgba(0,0,0,0.55);color:#fff;
|
||||
font-size:11px;font-weight:600;
|
||||
backdrop-filter:blur(4px);
|
||||
-webkit-backdrop-filter:blur(4px);
|
||||
pointer-events:none">
|
||||
<svg class="ph-icon" aria-hidden="true" style="width:12px;height:12px"><use href="/icons/phosphor.svg#camera"></use></svg>
|
||||
${photoCount}
|
||||
</div>`
|
||||
: '';
|
||||
const previewContent = `
|
||||
${photoBadge}
|
||||
<div class="rk-mini-map" data-id="${r.id}"
|
||||
data-track='${JSON.stringify(r.preview_track||[])}'
|
||||
style="width:100%;height:100%"></div>`;
|
||||
|
||||
const authorLine = isDiscover
|
||||
? `<div class="rk-card-creator">${UI.icon('user')} ${UI.escape(r.user_name||'Anonym')}</div>`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue