diff --git a/app/templates/index.html b/app/templates/index.html index 9062909..f028a20 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -20,6 +20,10 @@ color: var(--color-darkgray); line-height: 1.6; background: var(--color-bg); + min-height: 100vh; + min-height: 100dvh; + display: flex; + flex-direction: column; } /* Header */ @@ -60,7 +64,8 @@ /* Main Layout */ .main-container { display: flex; - height: calc(100vh - 70px); + flex: 1; + min-height: 0; } /* Left Panel - List */ @@ -548,21 +553,85 @@ to { transform: rotate(360deg); } } + /* Mobile Back-to-List Button (nur Mobile sichtbar) */ + .btn-back-mobile { + display: none; + padding: 0.5rem 0.75rem; + background: var(--color-bg); + border: 1px solid var(--color-lightgray); + border-radius: 4px; + cursor: pointer; + margin-bottom: 1rem; + font-size: 0.85rem; + color: var(--color-darkgray); + } + /* Responsive */ @media (max-width: 900px) { + .header { + padding: 0.75rem 1rem; + gap: 0.5rem; + } + + .header h1 { + font-size: 1.2rem; + } + + .header .subtitle { + font-size: 0.8rem; + flex-basis: 100%; + order: 10; + } + + .mode-toggle { + margin-left: auto; + flex-wrap: wrap; + } + + .mode-btn { + padding: 0.4rem 0.6rem; + font-size: 0.85rem; + } + .main-container { flex-direction: column; - height: auto; + flex: 1; + min-height: 0; } - + .list-panel { width: 100%; + min-width: 0; + border-right: none; + border-bottom: 1px solid var(--color-lightgray); + } + + .list-content { max-height: 50vh; } - + .detail-panel { padding: 1rem; + overflow: visible; + flex: none; } + + .btn-back-mobile { + display: inline-block; + } + } + + @media (max-width: 600px) { + .header h1 { font-size: 1.1rem; } + .header .subtitle { display: none; } + .detail-card { padding: 1rem; } + .matrix-table { font-size: 0.7rem; } + .matrix-table th, .matrix-table td { padding: 0.25rem 0.3rem; } + .matrix-grid { grid-template-columns: 1fr; } + .upload-section { padding: 1rem; } + .file-drop { padding: 1.5rem; } + .score-big { font-size: 2.2rem; } + .detail-header { flex-wrap: wrap; gap: 0.5rem; } } /* Stats Bar */ @@ -1305,6 +1374,7 @@ document.getElementById('detail-panel').innerHTML = `
+
${item.title || 'Ohne Titel'}
@@ -1378,6 +1448,11 @@ 📥 GWÖ-Report als PDF
`; + + // Auf Mobile: zum Detail-Panel scrollen, damit der gewählte Antrag sichtbar wird + if (window.matchMedia('(max-width: 900px)').matches) { + document.getElementById('detail-panel').scrollIntoView({ behavior: 'smooth', block: 'start' }); + } } // Mode Toggle