working on menu

This commit is contained in:
ebby 2026-08-20 09:10:13 +02:00
parent bec4d601e8
commit 82944c8fe6
2 changed files with 51 additions and 22 deletions

View file

@ -11,6 +11,8 @@
<a class="nav-link" href="/privacy-policy" style="#789">Datenschutz</a> <a class="nav-link" href="/privacy-policy" style="#789">Datenschutz</a>
</div> </div>
</nav> </nav>
<input type="checkbox" id="menu-toggle" class="only-mobile" />
<label for="menu-icon" class="only-mobile">☰</label>
</header> </header>
<style> <style>
@ -20,23 +22,7 @@
header { header {
padding: 32px; padding: 32px;
display: flex; display: flex;mobile
align-items: center;
background-color: #fff;
}
#name {
font-weight: bold;
font-size: 1.2rem;
flex-shrink: 0;
}
.vertical-line {
color: var(--primary-text);
border-right-width: 3px;
}
nav {
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
@ -53,7 +39,49 @@
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: end; justify-content: end;
} }
.only-mobile {
visibility: hidden;
display: none;
}
#menu-toggle {
appearance: none;
}
@media only screen and (max-width: 800px) {
.only-mobile {
visibility: visible;
display: block;
}
nav {
@include position(absolute, 0 null 0 0);
background: #ddd;
height: 100vw;
width: 66vw;
display: flex;
flex-direction: column;
align-items: start;
transform: translateX(0);
will-change: transform;
transition: 0.3s transform linear;
z-index: 1;
ul {
list-style: none;
padding: 20px 0;
margin: 0;
li {
padding: 10px 20px;
}
}
}
.nav-right {
flex-direction: column;
}
}
</style> </style>

View file

@ -9,7 +9,8 @@
/*font-size: 110%;*/ /*font-size: 110%;*/
} }
html, body { html,
body {
height: 100%; height: 100%;
margin: 0; margin: 0;
} }