diff --git a/backend/static/css/layout.css b/backend/static/css/layout.css index 902486a..f104ab0 100644 --- a/backend/static/css/layout.css +++ b/backend/static/css/layout.css @@ -641,6 +641,46 @@ white-space: nowrap; } + /* Gesundheit: Tabs auf 2 Zeilen */ + #page-health .by-tabs { + display: grid; + grid-template-columns: repeat(var(--health-tab-cols, 5), minmax(0, 1fr)); + overflow: visible; + gap: var(--space-1); + padding-bottom: var(--space-2); + } + #page-health .by-tabs .by-tab { + justify-content: center; + text-align: center; + white-space: nowrap; + } + + /* Admin: Tabs auf 2 Zeilen */ + #page-admin .adm-tabs { + display: grid; + grid-template-columns: repeat(var(--adm-tab-cols, 4), minmax(0, 1fr)); + overflow: visible; + gap: var(--space-1); + padding-bottom: var(--space-2); + } + #page-admin .adm-tabs .by-tab { + justify-content: center; + text-align: center; + white-space: nowrap; + } + + /* Karte: Legende auf 2 Zeilen */ + .map-legend { + display: grid; + grid-template-columns: repeat(var(--map-legend-cols, 8), minmax(0, 1fr)); + overflow: visible; + flex-wrap: wrap; + gap: var(--space-1); + } + .map-legend .map-legend-btn { + justify-content: center; + } + /* Suche + Threads volle Breite */ .forum-main-col { display: flex; diff --git a/backend/static/js/app.js b/backend/static/js/app.js index ffa6e82..c170753 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 = '319'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '320'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const App = (() => { diff --git a/backend/static/js/pages/admin.js b/backend/static/js/pages/admin.js index 8aa3add..03e3ad0 100644 --- a/backend/static/js/pages/admin.js +++ b/backend/static/js/pages/admin.js @@ -56,6 +56,8 @@ window.Page_admin = (() => {
`; + _container.querySelector('#adm-tabs') + ?.style.setProperty('--adm-tab-cols', Math.ceil(TABS.length / 2)); _container.querySelectorAll('#adm-tabs .by-tab').forEach(btn => { btn.addEventListener('click', () => { _tab = btn.dataset.tab; diff --git a/backend/static/js/pages/health.js b/backend/static/js/pages/health.js index c266981..5ffc78a 100644 --- a/backend/static/js/pages/health.js +++ b/backend/static/js/pages/health.js @@ -290,6 +290,8 @@ window.Page_health = (() => { ${t.icon} ${t.label} `).join(''); + const count = tabsEl.querySelectorAll('.by-tab').length; + tabsEl.style.setProperty('--health-tab-cols', Math.ceil(count / 2)); tabsEl.querySelectorAll('.by-tab').forEach(btn => { btn.addEventListener('click', () => { _activeTab = btn.dataset.tab; diff --git a/backend/static/js/pages/map.js b/backend/static/js/pages/map.js index 4f723c7..ba1bc79 100644 --- a/backend/static/js/pages/map.js +++ b/backend/static/js/pages/map.js @@ -231,6 +231,10 @@ window.Page_map = (() => { `; + const legendBtns = Object.keys(TYPEN).filter(k => k !== 'giftkoeder').length + 1; // +1 Alle-Btn + document.getElementById('map-legend') + ?.style.setProperty('--map-legend-cols', Math.ceil(legendBtns / 2)); + document.getElementById('map-legend').addEventListener('click', e => { const btn = e.target.closest('.map-legend-btn'); if (!btn) return; diff --git a/backend/static/sw.js b/backend/static/sw.js index 6e9bf0b..a5b5d91 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-v331'; +const CACHE_VERSION = 'by-v332'; const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten