diff --git a/v4/assets/js/check-theme-prefer.js b/v4/assets/js/check-theme-prefer.js index a13accbac..b54907c45 100644 --- a/v4/assets/js/check-theme-prefer.js +++ b/v4/assets/js/check-theme-prefer.js @@ -1,6 +1,5 @@ const darkStore = localStorage.getItem("dark-store"); const docEle = document.documentElement; - console.log(darkStore); const prefersDark = window.matchMedia("(prefers-color-scheme: dark)"); if (darkStore === "true") { docEle.classList.add("dark-mode"); diff --git a/v4/layouts/partials/check-theme-prefer.html b/v4/layouts/partials/check-theme-prefer.html index f48f2b5e8..16c55c729 100644 --- a/v4/layouts/partials/check-theme-prefer.html +++ b/v4/layouts/partials/check-theme-prefer.html @@ -1,6 +1,4 @@ -{{ $jsToConcat := resources.Get "js/check-theme-prefer.js" }} -{{ $checkThemePrefer := slice $jsToConcat | resources.Concat "check-theme-prefer.js" }} - +{{ $checkThemePrefer := resources.Get "js/check-theme-prefer.js" }} {{ if or (.Site.IsServer) (eq hugo.Environment "development") }} {{ else }} diff --git a/v4/layouts/partials/header.html b/v4/layouts/partials/header.html index 8f4f2d25b..575f33b5a 100644 --- a/v4/layouts/partials/header.html +++ b/v4/layouts/partials/header.html @@ -37,7 +37,7 @@

{{ end }}
- {{ if .Site.Params.enableLightDarkMode | default false }} + {{ if .Site.Params.enableLightDarkTheme | default false }}
diff --git a/v4/tests/exampleSite/config.toml b/v4/tests/exampleSite/config.toml index 7f3299a41..9468f46ef 100644 --- a/v4/tests/exampleSite/config.toml +++ b/v4/tests/exampleSite/config.toml @@ -26,7 +26,7 @@ disqusShortname = "bilberry-hugo-theme" css_modules = [] js_modules = [] - enableLightDarkThemeMode = true + enableLightDarkTheme = true # Description and meta data for the search engines author = "Lednerb"