From de73c7901e925d84bb8fb0937a3c132692821b7b Mon Sep 17 00:00:00 2001 From: rene Date: Sat, 25 Apr 2026 09:27:19 +0200 Subject: [PATCH] =?UTF-8?q?Wiki:=20Hunde-Silhouette=20als=20Placeholder=20?= =?UTF-8?q?f=C3=BCr=20fehlende=20Rassenfotos=20(SW=20by-v362)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - _DOG_SILHOUETTE Phosphor-SVG als Modul-Konstante in wiki.js - Karten-Fallback zeigt SVG statt UI.icon('dog') - Detail-Ansicht zeigt 56px SVG + „Kein Foto verfügbar" wenn kein Foto - CSS: wiki-breed-photo-fallback mit Gradient, neue wiki-detail-photo-placeholder-Klasse - SW by-v362, APP_VER 347 --- backend/static/css/components.css | 36 ++++++++++++++++++++++++------- backend/static/js/app.js | 2 +- backend/static/js/pages/wiki.js | 13 +++++++---- backend/static/sw.js | 2 +- 4 files changed, 39 insertions(+), 14 deletions(-) diff --git a/backend/static/css/components.css b/backend/static/css/components.css index 33c67d1..3102262 100644 --- a/backend/static/css/components.css +++ b/backend/static/css/components.css @@ -4660,15 +4660,35 @@ html.modal-open { display: block; } .wiki-breed-photo-fallback { - font-size: 2.5rem; - line-height: 1; - display: flex; - align-items: center; + display: flex; + align-items: center; justify-content: center; - width: 100%; - height: 100%; - background: var(--c-bg); - color: var(--c-text-secondary); + width: 100%; + height: 100%; + background: linear-gradient(135deg, var(--c-surface-2) 0%, var(--c-bg) 100%); + color: var(--c-text-muted); + font-size: 2.8rem; + line-height: 1; +} +.wiki-detail-photo-placeholder { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: var(--space-2); + width: 100%; + height: 220px; + background: linear-gradient(135deg, var(--c-surface-2) 0%, var(--c-bg) 100%); + border-radius: var(--radius-lg); + color: var(--c-text-muted); + font-size: 3.5rem; +} +.wiki-detail-photo-placeholder span { + font-size: var(--text-xs); + color: var(--c-text-muted); + font-weight: var(--weight-medium); + letter-spacing: 0.05em; + text-transform: uppercase; } /* Card Body */ diff --git a/backend/static/js/app.js b/backend/static/js/app.js index df1b431..22217d2 100644 --- a/backend/static/js/app.js +++ b/backend/static/js/app.js @@ -3,7 +3,7 @@ Router, State-Management, Navigation, Initialisierung. ============================================================ */ -const APP_VER = '346'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '347'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const App = (() => { diff --git a/backend/static/js/pages/wiki.js b/backend/static/js/pages/wiki.js index 9e63226..5f72bf9 100644 --- a/backend/static/js/pages/wiki.js +++ b/backend/static/js/pages/wiki.js @@ -368,11 +368,13 @@ window.Page_wiki = (() => { } } + const _DOG_SILHOUETTE = ``; + function _breedCardHtml(r) { const photoHtml = r.foto_url ? `${_esc(r.name)}` : ''; - const fallbackHtml = `
${UI.icon('dog')}
`; + const fallbackHtml = `
${_DOG_SILHOUETTE}
`; return `
@@ -714,11 +716,14 @@ window.Page_wiki = (() => { ? rasse.temperament.split(',').map(t => `${_esc(t.trim())}`).join('') : ''; + const _dogSvgLg = _DOG_SILHOUETTE.replace('width="48" height="48"', 'width="56" height="56"'); const photoHtml = rasse.foto_url ? `
- ${_esc(rasse.name)} -
` - : ''; + ${_esc(rasse.name)} +
+ ` + : `
${_dogSvgLg}Kein Foto verfügbar
`; const berichteHtml = _renderBerichteHtml(rasse.berichte || [], slug); diff --git a/backend/static/sw.js b/backend/static/sw.js index 86351ed..3ba2ba5 100644 --- a/backend/static/sw.js +++ b/backend/static/sw.js @@ -3,7 +3,7 @@ Offline-Cache + Push Notifications + Tile-Cache ============================================================ */ -const CACHE_VERSION = 'by-v361'; +const CACHE_VERSION = 'by-v362'; const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten