This commit is contained in:
retoor 2025-11-16 02:03:16 +01:00
parent 9be6a8b40e
commit f2b2f4930b
2 changed files with 127 additions and 4 deletions

View File

@ -17,7 +17,12 @@
<span class="logo-icon"></span> <span class="logo-icon"></span>
<span class="logo-text">My<span class="logo-webdav">Webdav</span></span> <span class="logo-text">My<span class="logo-webdav">Webdav</span></span>
</div> </div>
<ul class="nav-menu"> <button class="hamburger" id="hamburger" aria-label="Toggle menu">
<span></span>
<span></span>
<span></span>
</button>
<ul class="nav-menu" id="navMenu">
<li><a href="/">Home</a></li> <li><a href="/">Home</a></li>
<li><a href="/features">Features</a></li> <li><a href="/features">Features</a></li>
<li><a href="/pricing">Pricing</a></li> <li><a href="/pricing">Pricing</a></li>
@ -47,6 +52,22 @@
</div> </div>
</footer> </footer>
<script>
const hamburger = document.getElementById('hamburger');
const navMenu = document.getElementById('navMenu');
hamburger.addEventListener('click', () => {
hamburger.classList.toggle('active');
navMenu.classList.toggle('active');
});
navMenu.querySelectorAll('a').forEach(link => {
link.addEventListener('click', () => {
hamburger.classList.remove('active');
navMenu.classList.remove('active');
});
});
</script>
{% block extra_js %}{% endblock %} {% block extra_js %}{% endblock %}
</body> </body>
</html> </html>

View File

@ -66,6 +66,37 @@ body {
color: #1565c0; color: #1565c0;
} }
.hamburger {
display: none;
flex-direction: column;
gap: 4px;
background: none;
border: none;
cursor: pointer;
padding: 8px;
z-index: 1001;
}
.hamburger span {
width: 25px;
height: 3px;
background: #1976d2;
border-radius: 2px;
transition: all 0.3s ease;
}
.hamburger.active span:nth-child(1) {
transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
opacity: 0;
}
.hamburger.active span:nth-child(3) {
transform: rotate(-45deg) translate(7px, -6px);
}
.hero-section { .hero-section {
flex: 1; flex: 1;
display: flex; display: flex;
@ -189,9 +220,49 @@ body {
} }
@media (max-width: 768px) { @media (max-width: 768px) {
.nav-container {
padding: 0 1rem;
}
.hamburger {
display: flex;
}
.nav-menu {
position: fixed;
left: -100%;
top: 0;
flex-direction: column;
background-color: white;
width: 70%;
max-width: 300px;
height: 100vh;
padding: 5rem 2rem 2rem;
gap: 1.5rem;
box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
transition: left 0.3s ease;
z-index: 1000;
}
.nav-menu.active {
left: 0;
}
.nav-menu li {
width: 100%;
}
.nav-menu a {
display: block;
padding: 0.75rem 0;
font-size: 1.125rem;
}
.hero-section { .hero-section {
flex-direction: column; flex-direction: column;
text-align: center; text-align: center;
padding: 2rem 1rem;
gap: 2rem;
} }
.hero-title { .hero-title {
@ -202,17 +273,48 @@ body {
font-size: 3rem; font-size: 3rem;
} }
.hero-subtitle {
font-size: 1rem;
}
.hero-actions { .hero-actions {
justify-content: center; justify-content: center;
flex-wrap: wrap; flex-wrap: wrap;
} }
.nav-menu { .footer {
gap: 1rem; padding: 1.5rem 1rem;
} }
.footer-links { .footer-links {
flex-direction: column; flex-direction: column;
gap: 0.5rem; gap: 0.75rem;
}
}
@media (max-width: 480px) {
.logo {
font-size: 1.25rem;
}
.logo-icon {
font-size: 1.5rem;
}
.hero-title {
font-size: 1.5rem;
}
.hero-price {
font-size: 2.5rem;
}
.btn {
padding: 0.75rem 1.5rem;
font-size: 0.875rem;
}
.nav-menu {
width: 80%;
} }
} }