mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2023-12-21 10:22:58 +01:00
Revert "theme-switch-button: improve logic"
This reverts commit 0eed773e6d
.
This commit is contained in:
@ -50,7 +50,7 @@
|
||||
localStorage.setItem("menu-scroll-position", document.getElementById('menu').scrollLeft);
|
||||
}
|
||||
</script>
|
||||
{{- if (and (not .Site.Params.disableThemeToggle) (not (eq .Site.Params.defaultTheme "auto"))) }}
|
||||
{{- if (and (not .Site.Params.disableThemeToggle) (not (or (eq .Site.Params.defaultTheme "light") (eq .Site.Params.defaultTheme "dark")))) }}
|
||||
<script>
|
||||
document.getElementById("theme-toggle").addEventListener("click", () => {
|
||||
if (document.body.className.includes("dark")) {
|
||||
|
Reference in New Issue
Block a user