summaryrefslogtreecommitdiff
path: root/layouts/partials/footer.html
diff options
context:
space:
mode:
authorItay Cohen <itaycohen23@gmail.com>2020-11-04 10:34:45 +0200
committerGitHub <noreply@github.com>2020-11-04 14:04:45 +0530
commit3064e8cfc5fa7e41e80ecdcd57f80276391c4a15 (patch)
tree3882da18bb4dcccc4fe3f0070071c5d0dd16de0b /layouts/partials/footer.html
parent12b6b132e4c24c80813b726bd7191c83a5aead05 (diff)
theme-switch: Enable theme toggle unless specifically disabled (#69)
Co-authored-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Diffstat (limited to 'layouts/partials/footer.html')
-rw-r--r--layouts/partials/footer.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index f3baf82..3094209 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -50,7 +50,7 @@
localStorage.setItem("menu-scroll-position", document.getElementById('menu').scrollLeft);
}
</script>
-{{- if (and (not .Site.Params.disableThemeToggle) (not (or (eq .Site.Params.defaultTheme "light") (eq .Site.Params.defaultTheme "dark")))) }}
+{{- if (not .Site.Params.disableThemeToggle) }}
<script>
document.getElementById("theme-toggle").addEventListener("click", () => {
if (document.body.className.includes("dark")) {
@@ -63,7 +63,7 @@
})
</script>
{{- else -}}
-<!-- case where owner disables theme button after deployment, this resets the stored theme -->
+{{/* case where owner disables theme button after deployment, this resets the stored theme */}}
<script>
localStorage.removeItem("pref-theme");
</script>