fix: no need to reload for theme change
Changing the theme using toggle does not require reloading the entire page using self-linking
This commit is contained in:
parent
dbf65c9a03
commit
f753261345
|
@ -7,7 +7,7 @@
|
|||
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
{{ if eq .Site.Params.mode "toggle" -}}
|
||||
| <a id="dark-mode-toggle" onclick="toggleTheme()" href=""></a>
|
||||
| <span id="dark-mode-toggle" onclick="toggleTheme()"></span>
|
||||
<script src="{{ .Site.BaseURL }}js/themetoggle.js"></script>
|
||||
{{ end }}
|
||||
</nav>
|
||||
|
|
Loading…
Reference in New Issue