mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2026-11-20 18:37:50 +01:00
theme-switch: Improve theme switch logic (#86)
- removes unnecessary local-storage item removal - less inline script on build - assumes `defaultTheme as auto when value is not `dark` or `light` - should work according to table at docs
This commit is contained in:
1 parent
678b5d82fc
commit
b301d60f03
2 files changed
+16
-16
No files matched your search
@@ -64,11 +64,5 @@
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
{{- else -}}
|
||||
{{/* case where owner disables theme button after deployment, this resets the stored theme */}}
|
||||
<script>
|
||||
localStorage.removeItem("pref-theme");
|
||||
|
||||
</script>
|
||||
{{- end }}
|
||||
Reference in new issue
Block a user