feat: add responsive mobile hamburger menu and fix horizontal overflow
This commit is contained in:
+217
-1
@@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
html {
|
html {
|
||||||
scroll-behavior: smooth;
|
scroll-behavior: smooth;
|
||||||
|
overflow-x: hidden;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
@@ -32,6 +34,9 @@ body {
|
|||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
overflow-x: hidden;
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
@@ -49,6 +54,7 @@ header.site-header {
|
|||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 50;
|
z-index: 50;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-wrapper {
|
.nav-wrapper {
|
||||||
@@ -66,6 +72,7 @@ header.site-header {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo span {
|
.logo span {
|
||||||
@@ -91,6 +98,51 @@ nav.main-nav a.active {
|
|||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Mobile Hamburger Toggle */
|
||||||
|
.mobile-toggle {
|
||||||
|
display: none;
|
||||||
|
background: transparent;
|
||||||
|
border: 1px solid var(--border-color);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 8px;
|
||||||
|
width: 44px;
|
||||||
|
height: 44px;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
gap: 5px;
|
||||||
|
z-index: 100;
|
||||||
|
transition: background 0.2s, border-color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-toggle:hover, .mobile-toggle:focus-visible {
|
||||||
|
background: rgba(255, 255, 255, 0.08);
|
||||||
|
border-color: var(--accent);
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-toggle .bar {
|
||||||
|
width: 22px;
|
||||||
|
height: 2px;
|
||||||
|
background-color: var(--text-main);
|
||||||
|
border-radius: 2px;
|
||||||
|
transition: transform 0.25s ease, opacity 0.25s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-toggle.open .bar:nth-child(1) {
|
||||||
|
transform: translateY(7px) rotate(45deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-toggle.open .bar:nth-child(2) {
|
||||||
|
opacity: 0;
|
||||||
|
transform: scaleX(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-toggle.open .bar:nth-child(3) {
|
||||||
|
transform: translateY(-7px) rotate(-45deg);
|
||||||
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -152,6 +204,7 @@ nav.main-nav a.active {
|
|||||||
line-height: 1.15;
|
line-height: 1.15;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
letter-spacing: -0.02em;
|
letter-spacing: -0.02em;
|
||||||
|
overflow-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hero h1 .highlight {
|
.hero h1 .highlight {
|
||||||
@@ -173,6 +226,7 @@ nav.main-nav a.active {
|
|||||||
padding: 2px 8px;
|
padding: 2px 8px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
font-size: 0.95em;
|
font-size: 0.95em;
|
||||||
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hero-actions {
|
.hero-actions {
|
||||||
@@ -208,7 +262,7 @@ section.features, section.steps, section.contact {
|
|||||||
|
|
||||||
.grid-3 {
|
.grid-3 {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
|
||||||
gap: 24px;
|
gap: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -376,3 +430,165 @@ footer.site-footer {
|
|||||||
.footer-links a:hover {
|
.footer-links a:hover {
|
||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ================= RESPONSIVE MOBILE STYLES ================= */
|
||||||
|
@media (max-width: 820px) {
|
||||||
|
.mobile-toggle {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav.main-nav {
|
||||||
|
display: none;
|
||||||
|
position: fixed;
|
||||||
|
top: 72px;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: calc(100vh - 72px);
|
||||||
|
background: rgba(11, 15, 25, 0.97);
|
||||||
|
backdrop-filter: blur(20px);
|
||||||
|
-webkit-backdrop-filter: blur(20px);
|
||||||
|
border-bottom: 1px solid var(--border-color);
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 24px 20px 40px;
|
||||||
|
gap: 14px;
|
||||||
|
overflow-y: auto;
|
||||||
|
z-index: 90;
|
||||||
|
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
|
||||||
|
align-items: stretch;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav.main-nav.open {
|
||||||
|
display: flex;
|
||||||
|
animation: fadeInNav 0.22s ease forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav.main-nav a {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
padding: 12px 14px;
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
display: block;
|
||||||
|
text-align: left;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav.main-nav a:hover,
|
||||||
|
nav.main-nav a.active {
|
||||||
|
background: rgba(56, 189, 248, 0.12);
|
||||||
|
border-color: rgba(56, 189, 248, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
nav.main-nav .btn {
|
||||||
|
margin-top: 8px;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
padding: 12px;
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
padding: 0 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero {
|
||||||
|
padding: 48px 0 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero-badge {
|
||||||
|
font-size: 0.78rem;
|
||||||
|
padding: 5px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero h1 {
|
||||||
|
font-size: 1.95rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero p {
|
||||||
|
font-size: 1rem;
|
||||||
|
margin-bottom: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero-actions {
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero-actions .btn {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.features {
|
||||||
|
padding: 40px 0 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-header {
|
||||||
|
margin-bottom: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-header h2 {
|
||||||
|
font-size: 1.6rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid-3 {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
padding: 22px 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.steps {
|
||||||
|
padding: 40px 0 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contact-cta {
|
||||||
|
padding: 50px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cta-box {
|
||||||
|
padding: 30px 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cta-box h2 {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cta-box p {
|
||||||
|
font-size: 0.95rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-section {
|
||||||
|
padding: 36px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-box {
|
||||||
|
padding: 22px 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-box h1 {
|
||||||
|
font-size: 1.7rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-content {
|
||||||
|
flex-direction: column;
|
||||||
|
text-align: center;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-links {
|
||||||
|
justify-content: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fadeInNav {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(-8px);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+32
-3
@@ -15,11 +15,19 @@
|
|||||||
<a href="index.html" class="logo">
|
<a href="index.html" class="logo">
|
||||||
🥨 <span>Waiswuaschd</span>.de
|
🥨 <span>Waiswuaschd</span>.de
|
||||||
</a>
|
</a>
|
||||||
<nav class="main-nav">
|
<button class="mobile-toggle" aria-label="Menü öffnen" id="mobileMenuBtn" aria-expanded="false">
|
||||||
|
<span class="bar"></span>
|
||||||
|
<span class="bar"></span>
|
||||||
|
<span class="bar"></span>
|
||||||
|
</button>
|
||||||
|
<nav class="main-nav" id="mainNav">
|
||||||
<a href="index.html">Startseite</a>
|
<a href="index.html">Startseite</a>
|
||||||
|
<a href="index.html#features">Funktionen</a>
|
||||||
|
<a href="index.html#schritte">So geht's</a>
|
||||||
|
<a href="index.html#kontakt">Portal anfragen</a>
|
||||||
<a href="impressum.html">Impressum</a>
|
<a href="impressum.html">Impressum</a>
|
||||||
<a href="datenschutz.html" class="active">Datenschutz</a>
|
<a href="datenschutz.html" class="active">Datenschutz</a>
|
||||||
<a href="https://demo.dev.waiswuaschd.de" class="btn btn-outline">Zum Portal</a>
|
<a href="https://demo.dev.waiswuaschd.de" class="btn btn-outline" target="_blank" rel="noopener">Live-Demo (Schmankerl)</a>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
@@ -84,7 +92,7 @@
|
|||||||
<!-- Footer -->
|
<!-- Footer -->
|
||||||
<footer class="site-footer">
|
<footer class="site-footer">
|
||||||
<div class="container footer-content">
|
<div class="container footer-content">
|
||||||
<p>© 2026 Waiswuaschd.de</p>
|
<p>© 2026 Waiswuaschd.de – Die Brotzeit-Plattform für Teams.</p>
|
||||||
<div class="footer-links">
|
<div class="footer-links">
|
||||||
<a href="index.html">Startseite</a>
|
<a href="index.html">Startseite</a>
|
||||||
<a href="impressum.html">Impressum</a>
|
<a href="impressum.html">Impressum</a>
|
||||||
@@ -93,5 +101,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const mobileBtn = document.getElementById('mobileMenuBtn');
|
||||||
|
const mainNav = document.getElementById('mainNav');
|
||||||
|
if (mobileBtn && mainNav) {
|
||||||
|
mobileBtn.addEventListener('click', () => {
|
||||||
|
const isOpen = mainNav.classList.toggle('open');
|
||||||
|
mobileBtn.classList.toggle('open', isOpen);
|
||||||
|
mobileBtn.setAttribute('aria-expanded', isOpen);
|
||||||
|
document.body.style.overflow = isOpen ? 'hidden' : '';
|
||||||
|
});
|
||||||
|
mainNav.querySelectorAll('a').forEach(link => {
|
||||||
|
link.addEventListener('click', () => {
|
||||||
|
mainNav.classList.remove('open');
|
||||||
|
mobileBtn.classList.remove('open');
|
||||||
|
mobileBtn.setAttribute('aria-expanded', 'false');
|
||||||
|
document.body.style.overflow = '';
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
+32
-3
@@ -15,11 +15,19 @@
|
|||||||
<a href="index.html" class="logo">
|
<a href="index.html" class="logo">
|
||||||
🥨 <span>Waiswuaschd</span>.de
|
🥨 <span>Waiswuaschd</span>.de
|
||||||
</a>
|
</a>
|
||||||
<nav class="main-nav">
|
<button class="mobile-toggle" aria-label="Menü öffnen" id="mobileMenuBtn" aria-expanded="false">
|
||||||
|
<span class="bar"></span>
|
||||||
|
<span class="bar"></span>
|
||||||
|
<span class="bar"></span>
|
||||||
|
</button>
|
||||||
|
<nav class="main-nav" id="mainNav">
|
||||||
<a href="index.html">Startseite</a>
|
<a href="index.html">Startseite</a>
|
||||||
|
<a href="index.html#features">Funktionen</a>
|
||||||
|
<a href="index.html#schritte">So geht's</a>
|
||||||
|
<a href="index.html#kontakt">Portal anfragen</a>
|
||||||
<a href="impressum.html" class="active">Impressum</a>
|
<a href="impressum.html" class="active">Impressum</a>
|
||||||
<a href="datenschutz.html">Datenschutz</a>
|
<a href="datenschutz.html">Datenschutz</a>
|
||||||
<a href="https://demo.dev.waiswuaschd.de" class="btn btn-outline">Zum Portal</a>
|
<a href="https://demo.dev.waiswuaschd.de" class="btn btn-outline" target="_blank" rel="noopener">Live-Demo (Schmankerl)</a>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
@@ -66,7 +74,7 @@
|
|||||||
<!-- Footer -->
|
<!-- Footer -->
|
||||||
<footer class="site-footer">
|
<footer class="site-footer">
|
||||||
<div class="container footer-content">
|
<div class="container footer-content">
|
||||||
<p>© 2026 Waiswuaschd.de</p>
|
<p>© 2026 Waiswuaschd.de – Die Brotzeit-Plattform für Teams.</p>
|
||||||
<div class="footer-links">
|
<div class="footer-links">
|
||||||
<a href="index.html">Startseite</a>
|
<a href="index.html">Startseite</a>
|
||||||
<a href="impressum.html">Impressum</a>
|
<a href="impressum.html">Impressum</a>
|
||||||
@@ -75,5 +83,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const mobileBtn = document.getElementById('mobileMenuBtn');
|
||||||
|
const mainNav = document.getElementById('mainNav');
|
||||||
|
if (mobileBtn && mainNav) {
|
||||||
|
mobileBtn.addEventListener('click', () => {
|
||||||
|
const isOpen = mainNav.classList.toggle('open');
|
||||||
|
mobileBtn.classList.toggle('open', isOpen);
|
||||||
|
mobileBtn.setAttribute('aria-expanded', isOpen);
|
||||||
|
document.body.style.overflow = isOpen ? 'hidden' : '';
|
||||||
|
});
|
||||||
|
mainNav.querySelectorAll('a').forEach(link => {
|
||||||
|
link.addEventListener('click', () => {
|
||||||
|
mainNav.classList.remove('open');
|
||||||
|
mobileBtn.classList.remove('open');
|
||||||
|
mobileBtn.setAttribute('aria-expanded', 'false');
|
||||||
|
document.body.style.overflow = '';
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
+27
-1
@@ -16,7 +16,12 @@
|
|||||||
<a href="index.html" class="logo">
|
<a href="index.html" class="logo">
|
||||||
🥨 <span>Waiswuaschd</span>.de
|
🥨 <span>Waiswuaschd</span>.de
|
||||||
</a>
|
</a>
|
||||||
<nav class="main-nav">
|
<button class="mobile-toggle" aria-label="Menü öffnen" id="mobileMenuBtn" aria-expanded="false">
|
||||||
|
<span class="bar"></span>
|
||||||
|
<span class="bar"></span>
|
||||||
|
<span class="bar"></span>
|
||||||
|
</button>
|
||||||
|
<nav class="main-nav" id="mainNav">
|
||||||
<a href="index.html" class="active">Startseite</a>
|
<a href="index.html" class="active">Startseite</a>
|
||||||
<a href="#features">Funktionen</a>
|
<a href="#features">Funktionen</a>
|
||||||
<a href="#schritte">So geht's</a>
|
<a href="#schritte">So geht's</a>
|
||||||
@@ -155,5 +160,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const mobileBtn = document.getElementById('mobileMenuBtn');
|
||||||
|
const mainNav = document.getElementById('mainNav');
|
||||||
|
if (mobileBtn && mainNav) {
|
||||||
|
mobileBtn.addEventListener('click', () => {
|
||||||
|
const isOpen = mainNav.classList.toggle('open');
|
||||||
|
mobileBtn.classList.toggle('open', isOpen);
|
||||||
|
mobileBtn.setAttribute('aria-expanded', isOpen);
|
||||||
|
document.body.style.overflow = isOpen ? 'hidden' : '';
|
||||||
|
});
|
||||||
|
mainNav.querySelectorAll('a').forEach(link => {
|
||||||
|
link.addEventListener('click', () => {
|
||||||
|
mainNav.classList.remove('open');
|
||||||
|
mobileBtn.classList.remove('open');
|
||||||
|
mobileBtn.setAttribute('aria-expanded', 'false');
|
||||||
|
document.body.style.overflow = '';
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user