58 lines
2.4 KiB
HTML
58 lines
2.4 KiB
HTML
<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") }}
|
|
<!-- {{ $image := resources.Get "images/all_logos/horizontal_white_transparent.svg" }} -->
|
|
<!-- <img class="site-header__logo" -->
|
|
<!-- src="{{ $image.RelPermalink }}" /> -->
|
|
</a>
|
|
<nav class="site-header__nav desktop-nav">
|
|
{{ if eq .File.Dir "/" }}
|
|
<ul class="inline-menu-list">
|
|
<li><a href="#association">L'association</a></li>
|
|
<li><a href="#histoires">Histoire</a></li>
|
|
<li><a href="#images">Galerie</a></li>
|
|
<li><a href="#actualites">Actualités</a></li>
|
|
</ul>
|
|
{{ end }}
|
|
{{ if not (eq .File.Dir "/") }}
|
|
<ul class="inline-menu-list">
|
|
<li><a href="/actualites">Actualités</a></li>
|
|
<li><a href="/association">L'association</a></li>
|
|
<li><a href="/histoires">Histoire</a></li>
|
|
<li><a href="/images">Galerie</a></li>
|
|
</ul>
|
|
{{ end }}
|
|
</nav>
|
|
<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"> </span>
|
|
</label>
|
|
<div class="background"> </div>
|
|
<nav class="nav">
|
|
<ul class="list">
|
|
<li><a href="/actualites">Actualités</a></li>
|
|
<li><a href="/association">L'association</a></li>
|
|
<li><a href="/histoires">Histoire</a></li>
|
|
<li><a href="/images">Galerie</a></li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</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>
|