diff --git a/layouts/partials/head.html b/layouts/partials/head.html index f3d038e..ea2de2b 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -22,14 +22,16 @@ {{ partial "favicons.html" . }} {{ $colorTheme := "light" }} -{{ $colorThemeSwitcher := false }} +{{ $colorThemeSwitcher := true }} {{ if and (isset site.Params "colortheme") (ne site.Params.colortheme "") }} {{ $colorTheme = site.Params.colortheme | lower }} {{ end }} -{{ if and (isset site.Params "colorthemeswitcher") }} +{{ if isset site.Params "colorthemeswitcher" }} {{ $colorThemeSwitcher = site.Params.colorthemeswitcher }} +{{ else }} + {{ $colorThemeSwitcher = true }} {{ end }} {{ if or (eq $colorThemeSwitcher true) (eq $colorTheme "auto") }} diff --git a/layouts/partials/theme-switcher.html b/layouts/partials/theme-switcher.html index 647e053..73cf4ab 100644 --- a/layouts/partials/theme-switcher.html +++ b/layouts/partials/theme-switcher.html @@ -1,16 +1,16 @@ {{ $colorTheme := "light" }} -{{ $colorThemeSwitcher := false }} +{{ $colorThemeSwitcher := true }} {{ if and (isset site.Params "colortheme") (ne site.Params.colortheme "") }} {{ $colorTheme = site.Params.colortheme | lower }} {{ end }} -{{ if and (isset site.Params "colorthemeswitcher") }} +{{ if isset site.Params "colorthemeswitcher" }} {{ $colorThemeSwitcher = site.Params.colorthemeswitcher }} {{ end }} {{ if or (eq $colorThemeSwitcher true) (eq $colorTheme "auto") }} - {{ if site.Params.colorthemeswitcher }} + {{ if $colorThemeSwitcher }}