website/themes/datacoop2020/layouts/_default/baseof.html

36 lines
841 B
HTML
Raw Normal View History

<!doctype html>
<html lang="en">
{{ partial "head.html" . }}
<body>
<aside>
<header>
<a href="index.html"><img src="{{ printf "/static/img/logo_%s.svg" .Site.Language.Lang | absURL }}" alt="data coop logo"></a>
<button id="menu-toggle"></button>
</header>
{{ partial "nav.html" . }}
</aside>
<main>
<article>
{{ block "main" . }}{{ end }}
</article>
</main>
<script>
document.getElementById("menu-toggle").addEventListener("click", function() {
let d = document.getElementsByTagName("nav")[0];
let is_showing = (d.style.display == 'block');
d.style.display = is_showing ? 'none' : 'block';
document.getElementById("menu-toggle").innerHTML = is_showing ? '☰' : 'X' ;
});
</script>
</body>
</html>