feat(nav): add hamburger menu for mobile navigation (Fix #27)
All checks were successful
Deploy Feature Branch to Test / deploy (push) Successful in 24s

- Hamburger button with animated X toggle (CSS-only icon)
- Slide-down mobile nav on ≤900px with 44px+ tap targets
- Semi-transparent overlay when menu is open
- Escape key + outside click + link click closes menu
- Auto-close on resize to desktop
- Desktop navigation unchanged
- Pure vanilla JS toggle, no jQuery dependency
This commit is contained in:
2026-05-14 17:40:20 +00:00
parent 51d4f96b20
commit 565c8b304d
3 changed files with 180 additions and 0 deletions

View File

@@ -64,6 +64,9 @@
<body>
<nav id="navbar">
<div class="nav-logo">Bahnhofstraße 10</div>
<button class="nav-hamburger" aria-label="Navigation öffnen" aria-expanded="false">
<span></span>
</button>
<ul class="nav-links">
<li><a href="#galerie">Galerie</a></li>
<li><a href="#grundriss">Grundriss</a></li>
@@ -77,6 +80,7 @@
Jetzt anfragen
</button>
</nav>
<div class="nav-mobile-overlay" aria-hidden="true"></div>
<section class="hero" id="hero">
<div