diff --git a/layouts/partials/head.html b/layouts/partials/head.html index b0c0768..a902d73 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -21,12 +21,18 @@ {{ partial "favicons.html" . }} -{{ $colorTheme := "light-without-switcher" }} +{{ $colorTheme := "light" }} +{{ $colorThemeSwitcher := false }} + {{ if and (isset site.Params "colortheme") (ne site.Params.colortheme "") }} {{ $colorTheme = site.Params.colortheme | lower }} {{ end }} -{{ if not (in (slice "light-without-switcher" "dark-without-switcher") $colorTheme) }} +{{ if and (isset site.Params "colorthemeswitcher") }} + {{ $colorThemeSwitcher = site.Params.colorthemeswitcher }} +{{ end }} + +{{ if or (eq $colorThemeSwitcher true) (eq $colorTheme "auto") }}