2023-03-04 13:48:57 +01:00
|
|
|
---
|
2023-12-25 18:39:44 +01:00
|
|
|
import { Image } from 'astro:assets';
|
|
|
|
import logo from '../assets/logo.svg'
|
2023-12-29 22:57:30 +01:00
|
|
|
import hamburger from 'iconoir/icons/menu.svg'
|
|
|
|
const hamburger_src_url = `url("${hamburger.src}")`;
|
2023-03-04 13:48:57 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
<header>
|
2023-03-09 11:44:18 +01:00
|
|
|
<a href="/" rel="noopener noreferrer" aria-label="Home">
|
2023-12-25 18:39:44 +01:00
|
|
|
<Image src={logo} alt="Website Logo"/>
|
2023-03-09 11:44:18 +01:00
|
|
|
</a>
|
|
|
|
<ul class="desktop">
|
|
|
|
<slot />
|
|
|
|
</ul>
|
2023-07-08 21:20:23 +02:00
|
|
|
<button class="mobile" aria-label="Navigation Button" tabindex="0" onclick="this.focus()">
|
2023-03-09 11:44:18 +01:00
|
|
|
<ul>
|
|
|
|
<slot />
|
2023-03-04 13:48:57 +01:00
|
|
|
</ul>
|
2023-03-09 11:44:18 +01:00
|
|
|
<div class="placeholder"></div>
|
2023-12-29 22:57:30 +01:00
|
|
|
<div class="icon"></div>
|
2023-03-09 11:44:18 +01:00
|
|
|
</button>
|
2023-03-04 13:48:57 +01:00
|
|
|
</header>
|
|
|
|
|
2023-12-29 22:57:30 +01:00
|
|
|
<style define:vars={{ hamburger_src_url }}>
|
2023-03-09 11:44:18 +01:00
|
|
|
header {
|
2023-03-14 18:55:58 +01:00
|
|
|
z-index: 1000;
|
|
|
|
position: sticky;
|
|
|
|
top: 0px;
|
2023-03-09 11:44:18 +01:00
|
|
|
background-color: var(--c-darkgray);
|
|
|
|
display: flex;
|
|
|
|
height: auto;
|
|
|
|
width: 100%;
|
|
|
|
align-items: flex-start;
|
|
|
|
line-height: 1.5em;
|
|
|
|
}
|
|
|
|
header > a {
|
|
|
|
padding-left: 16px;
|
|
|
|
padding-top: 8px;
|
|
|
|
display: block;
|
|
|
|
height: 48px;
|
|
|
|
width: 48px;
|
|
|
|
}
|
|
|
|
a > img {
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
|
|
|
object-fit: contain;
|
|
|
|
}
|
|
|
|
.desktop {
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-around;
|
|
|
|
display: none;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
flex-direction: row;
|
|
|
|
height: 64px;
|
|
|
|
width: 100%;
|
|
|
|
list-style-type: none;
|
|
|
|
row-gap: 0.5em;
|
|
|
|
column-gap: 0.5ch;
|
|
|
|
margin: 0px;
|
|
|
|
line-height: 1.5em;
|
|
|
|
}
|
|
|
|
.mobile > ul {
|
|
|
|
background-color: var(--c-darkgray);
|
|
|
|
align-items: center;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
flex-direction: column;
|
|
|
|
display: flex;
|
|
|
|
width: 100%;
|
|
|
|
list-style-type: none;
|
|
|
|
line-height: 3em;
|
|
|
|
}
|
2023-03-04 20:11:51 +01:00
|
|
|
|
2023-03-09 11:44:18 +01:00
|
|
|
.placeholder {
|
|
|
|
display: flex;
|
|
|
|
width: 100%;
|
|
|
|
}
|
2023-03-04 20:11:51 +01:00
|
|
|
|
2023-03-09 11:44:18 +01:00
|
|
|
.mobile {
|
|
|
|
display: flex;
|
|
|
|
background-color: var(--c-darkgray);
|
|
|
|
border: 0px;
|
|
|
|
width: 100%;
|
|
|
|
height: 64px;
|
|
|
|
}
|
2023-03-04 20:11:51 +01:00
|
|
|
|
2023-03-09 11:44:18 +01:00
|
|
|
.mobile > ul {
|
|
|
|
display: none;
|
|
|
|
padding: 0px;
|
|
|
|
}
|
2023-03-04 20:11:51 +01:00
|
|
|
|
2023-03-09 11:44:18 +01:00
|
|
|
.mobile:focus-within > ul {
|
|
|
|
display: flex;
|
|
|
|
}
|
2023-03-04 20:11:51 +01:00
|
|
|
|
2023-03-09 11:44:18 +01:00
|
|
|
.mobile:focus-within > .placeholder {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mobile:focus-within {
|
|
|
|
justify-content: top;
|
|
|
|
height: auto;
|
|
|
|
}
|
|
|
|
header:focus-within > a {
|
|
|
|
display: flex;
|
|
|
|
justify-self: top;
|
|
|
|
}
|
2023-03-04 20:11:51 +01:00
|
|
|
|
2023-12-29 22:57:30 +01:00
|
|
|
.icon {
|
|
|
|
mask: var(--hamburger_src_url) no-repeat center;
|
|
|
|
background-color: white;
|
|
|
|
width: 2em;
|
|
|
|
height: 2em;
|
|
|
|
position: static;
|
|
|
|
align-self: flex-start;
|
|
|
|
padding-right: 1em;
|
|
|
|
padding-top: 2.5em;
|
|
|
|
}
|
|
|
|
|
2023-07-08 15:02:07 +02:00
|
|
|
@media (min-width: 1140px) {
|
2023-03-09 11:44:18 +01:00
|
|
|
.mobile {
|
|
|
|
display: none;
|
2023-03-05 15:39:47 +01:00
|
|
|
}
|
2023-03-09 11:44:18 +01:00
|
|
|
.desktop {
|
|
|
|
display: flex;
|
2023-03-04 20:11:51 +01:00
|
|
|
}
|
|
|
|
|
2023-03-09 11:44:18 +01:00
|
|
|
header {
|
|
|
|
height: 64px;
|
|
|
|
align-items: center;
|
|
|
|
}
|
2023-03-05 15:39:47 +01:00
|
|
|
|
2023-03-09 11:44:18 +01:00
|
|
|
header > a {
|
|
|
|
padding-top: 0px;
|
2023-03-04 20:11:51 +01:00
|
|
|
}
|
2023-03-09 11:44:18 +01:00
|
|
|
}
|
|
|
|
</style>
|