mirror of
https://github.com/fruworg/themu.git
synced 2024-11-16 07:07:16 +03:00
f753261345
Changing the theme using toggle does not require reloading the entire page using self-linking
15 lines
385 B
HTML
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>
|