54 lines
1.5 KiB
HTML
54 lines
1.5 KiB
HTML
{{ define "base" }}
|
|
<!DOCTYPE html>
|
|
<html lang="de">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{{.Title}}</title>
|
|
<script src="https://unpkg.com/htmx.org@1.9.9"
|
|
integrity="sha384-QFjmbokDn2DjBjq+fM+8LUIVrAgqcNW2s0PjAxHETgRn9l4fvX31ZxDxvwQnyMOX"
|
|
crossorigin="anonymous"></script>
|
|
<link id="customStylesheet" rel="stylesheet" href="/static/darkly_bulmawatch.css">
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
|
</head>
|
|
|
|
<body>
|
|
<div class="container is-widescreen">
|
|
{{ template "header" . }}
|
|
</div>
|
|
<div class="container is-widescreen">
|
|
{{ template "main" . }}
|
|
</div>
|
|
|
|
<div class="container is-widescreen">
|
|
{{ template "footer" . }}
|
|
</div>
|
|
|
|
</body>
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
// Get all "navbar-burger" elements
|
|
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
|
|
|
|
// Add a click event on each of them
|
|
$navbarBurgers.forEach(el => {
|
|
el.addEventListener('click', () => {
|
|
|
|
// Get the target from the "data-target" attribute
|
|
const target = el.dataset.target;
|
|
const $target = document.getElementById(target);
|
|
|
|
// Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu"
|
|
el.classList.toggle('is-active');
|
|
$target.classList.toggle('is-active');
|
|
|
|
});
|
|
});
|
|
|
|
});
|
|
</script>
|
|
|
|
</html>
|
|
{{ end }}
|