diff --git a/css/layout.css b/css/layout.css index 7c62b29..baaa10b 100644 --- a/css/layout.css +++ b/css/layout.css @@ -1,16 +1,33 @@ /* Grundlegendes App-Layout: Header + Karte/Liste. Mobile-first; - Desktop-Anpassungen (>=1024px) siehe css/responsive.css. */ + Desktop-Anpassungen (>=1024px) siehe css/responsive.css. -.app-header { - height: var(--header-height); + body ist ein Flex-Container (Header + app-status + app-layout + untereinander). app-layout bekommt flex:1 und füllt damit immer den + verbleibenden Platz - unabhängig davon, wie hoch der Header gerade ist. + Das ist bewusst kein fixes calc(100vh - Header-Höhe) mehr, da der Header + jetzt wächst, sobald das Aktionen-Menü (.app-menu) geöffnet ist. */ + +body { display: flex; flex-direction: column; - justify-content: center; - padding: 0 var(--space-lg); + min-height: 100vh; +} + +.app-header { + flex-shrink: 0; + padding: var(--space-sm) var(--space-lg); background: var(--color-primary); color: #fff; } +.app-header__row { + display: flex; + align-items: center; + justify-content: space-between; + gap: var(--space-md); + min-height: 48px; +} + .app-header__title { font-size: 1.4rem; font-weight: 700; @@ -21,7 +38,36 @@ opacity: 0.9; } +.app-header__menu-toggle { + flex-shrink: 0; + width: 44px; + height: 44px; + border: none; + border-radius: var(--radius-sm); + background: rgba(255, 255, 255, 0.15); + color: #fff; + font-size: 1.3rem; + line-height: 1; +} + +.app-header__menu-toggle[aria-expanded="true"] { + background: rgba(255, 255, 255, 0.3); +} + +.app-menu { + display: flex; + flex-wrap: wrap; + gap: var(--space-sm); + padding-top: var(--space-md); +} + +.app-menu[hidden] { + display: none; +} + .app-layout { + flex: 1; + min-height: 0; display: flex; flex-direction: column; } @@ -34,16 +80,6 @@ flex-direction: column; } -.map-panel__toolbar { - position: absolute; - top: var(--space-sm); - left: var(--space-sm); - z-index: 1000; - display: flex; - flex-wrap: wrap; - gap: var(--space-sm); -} - .map-panel__map { flex: 1; width: 100%; @@ -57,7 +93,7 @@ .map-picking-hint { position: absolute; - top: calc(var(--space-sm) + 40px); + top: var(--space-sm); left: var(--space-sm); z-index: 1000; display: flex; diff --git a/css/responsive.css b/css/responsive.css index 91c7bb1..691e834 100644 --- a/css/responsive.css +++ b/css/responsive.css @@ -8,7 +8,9 @@ grid-template-areas: 'map filter' 'map list'; - height: calc(100vh - var(--header-height)); + /* Höhe ergibt sich aus flex:1 auf .app-layout (siehe css/layout.css) - + damit passt sich die Höhe automatisch an, egal ob der Header gerade + durch ein geöffnetes Menü höher ist. */ } .map-panel { diff --git a/css/variables.css b/css/variables.css index efc9caf..1b6faad 100644 --- a/css/variables.css +++ b/css/variables.css @@ -42,5 +42,4 @@ /* Layout */ --breakpoint-desktop: 1024px; - --header-height: 64px; } diff --git a/index.html b/index.html index bf8eda1..feb05d1 100644 --- a/index.html +++ b/index.html @@ -23,8 +23,46 @@
-

EventMap

-

Familienfreundliche Ausflugsziele auf der Karte

+
+
+

EventMap

+

Familienfreundliche Ausflugsziele auf der Karte

+
+ +
+ +