fix: no need to reload for theme change Changing the theme using toggle does not require reloading the entire page using self-linking
9x9x9x 87396719+9x9x9x@users.noreply.github.com
Thu, 10 Nov 2022 02:00:40 +0530
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
layouts/partials/head.html
→
layouts/partials/head.html
@@ -7,7 +7,7 @@ {{ range .Site.Menus.main }}
<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>