176 lines
3.1 KiB
Text
176 lines
3.1 KiB
Text
---
|
|
import UserAction from "../islands/UserAction";
|
|
import Logo from "./Logo.astro";
|
|
---
|
|
|
|
<header>
|
|
<Logo />
|
|
<div id="user-action">
|
|
<UserAction client:load />
|
|
</div>
|
|
|
|
<nav>
|
|
<div class="nav-left">
|
|
<Logo />
|
|
<div id="menu-points">
|
|
<a href="/" class="menu-nav">Startseite</a>
|
|
<UserAction client:load />
|
|
</div>
|
|
</div>
|
|
<div class="nav-right">
|
|
<a href="/impressum" class="menu-nav">Impressum</a>
|
|
<a href="/privacy-policy" class="menu-nav">Datenschutz</a>
|
|
</div>
|
|
</nav>
|
|
|
|
<input type="checkbox" id="menu-toggle" class="menu-icon" />
|
|
<label for="menu-toggle" class="menu-icon" aria-label="Menü öffnen">
|
|
☰
|
|
</label>
|
|
|
|
<label for="menu-toggle" class="menu-backdrop"></label>
|
|
</header>
|
|
|
|
<style>
|
|
* {
|
|
box-sizing: border-box;
|
|
color: var(--primary-text);
|
|
}
|
|
|
|
header {
|
|
position: relative;
|
|
width: 100%;
|
|
padding: 32px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 20px;
|
|
}
|
|
|
|
nav {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
flex: 1;
|
|
}
|
|
|
|
.nav-right {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
}
|
|
|
|
#menu-toggle,
|
|
.menu-icon,
|
|
.menu-backdrop,
|
|
.nav-left {
|
|
display: none;
|
|
}
|
|
|
|
@media only screen and (max-width: 800px) {
|
|
* {
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
#user-action {
|
|
display: none;
|
|
}
|
|
|
|
.menu-icon {
|
|
display: block;
|
|
position: relative;
|
|
font-size: 1.6rem;
|
|
cursor: pointer;
|
|
z-index: 4;
|
|
}
|
|
|
|
#menu-toggle {
|
|
position: absolute;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.mobile-nav {
|
|
display: block;
|
|
}
|
|
|
|
nav {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 66vw;
|
|
min-width: 320px;
|
|
height: 100vh;
|
|
padding: 32px 0 0 32px;
|
|
background: var(--primary-color);
|
|
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
justify-content: flex-start;
|
|
|
|
transform: translateX(-100%);
|
|
transition: transform 0.3s ease;
|
|
z-index: 10;
|
|
|
|
a {
|
|
color: whitesmoke;
|
|
}
|
|
}
|
|
|
|
.nav-left,
|
|
.nav-right {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.nav-left {
|
|
gap: 16px;
|
|
margin-bottom: auto;
|
|
}
|
|
|
|
#menu-points {
|
|
display: flex;
|
|
gap: 16px;
|
|
flex-direction: column;
|
|
margin: 64px 0 auto 0;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.nav-right {
|
|
margin-bottom: 64px;
|
|
}
|
|
|
|
nav:has(~ #menu-toggle:checked) {
|
|
transform: translateX(0);
|
|
}
|
|
|
|
.menu-backdrop {
|
|
display: block;
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0, 0, 0, 0.25);
|
|
backdrop-filter: blur(6px);
|
|
-webkit-backdrop-filter: blur(6px);
|
|
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
pointer-events: none;
|
|
transition:
|
|
opacity 0.3s ease,
|
|
visibility 0.3s ease;
|
|
z-index: 9;
|
|
}
|
|
|
|
#menu-toggle:checked ~ .menu-backdrop {
|
|
opacity: 1;
|
|
visibility: visible;
|
|
pointer-events: auto;
|
|
}
|
|
}
|
|
|
|
.vertical-line {
|
|
visibility: hidden;
|
|
}
|
|
</style>
|