website/layouts/partials/header.html

56 lines
2.2 KiB
HTML
Raw Permalink Normal View History

<header class="site-header">
<div class="site-header__content page-container">
<a class="site-header__title" href="/">
{{ partial "helpers/svg" (dict "path" "all_logos/horizontal_white_transparent" "class" "site-header__logo") }}
</a>
2023-04-10 17:25:39 +00:00
<nav class="site-header__nav desktop-nav">
{{ with .File }}
<ul class="inline-menu-list">
<li><a href="/actualites">Actualités</a></li>
<li><a href="/association">L'association</a></li>
<li><a href="/documentation">Documentation</a></li>
<li>
<a
href="/adhesion"
class="button button-transparent membership-header-button"
>
Adhérer
</a>
</li>
</ul>
2023-07-06 20:28:16 +00:00
{{ end }}
</nav>
2023-04-10 17:25:39 +00:00
<div class="burger-menu">
<div class="burger-button-container">
<input type="checkbox" id="navi-toggle" class="checkbox" />
<label for="navi-toggle" class="burger-button">
<span class="icon">&nbsp;</span>
</label>
<div class="background">&nbsp;</div>
<nav class="nav">
<ul class="list">
<li><a href="/">Accueil</a></li>
2023-04-10 17:25:39 +00:00
<li><a href="/actualites">Actualités</a></li>
<li><a href="/association">L'association</a></li>
<li><a href="/documentation">Documentation</a></li>
<li><a href="/adhesion">Adhérer</a></li>
2023-04-10 17:25:39 +00:00
</ul>
</nav>
</div>
</div>
</div>
2022-09-28 20:49:59 +00:00
</header>
<script>
// workaround to limit the page scroll if the mobile nav is opened
const nav_button = document.getElementById("navi-toggle")
nav_button.addEventListener("change", event => {
if (event.target.checked) {
document.body.style.overflow = "hidden";
}
if (!event.target.checked) {
document.body.style.overflow = "initial";
}
})
</script>