themu/layouts/partials/head.html
9x9x9x f753261345 fix: no need to reload for theme change
Changing the theme using toggle does not require reloading the entire page using self-linking
2022-11-14 10:37:54 +05:30

15 lines
385 B
HTML

<header>
<div class="main">
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
</div>
<nav>
{{ range .Site.Menus.main }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
{{ if eq .Site.Params.mode "toggle" -}}
| <span id="dark-mode-toggle" onclick="toggleTheme()"></span>
<script src="{{ .Site.BaseURL }}js/themetoggle.js"></script>
{{ end }}
</nav>
</header>