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:
9x9x9x 2022-11-10 02:00:40 +05:30 committed by Athul Cyriac Ajay
parent dbf65c9a03
commit f753261345

View file

@ -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>