update: "colorThemeSwitcher" defaults to "true"
This commit is contained in:
parent
87172dbdfc
commit
e7a93e2088
@ -22,14 +22,16 @@
|
|||||||
{{ partial "favicons.html" . }}
|
{{ partial "favicons.html" . }}
|
||||||
|
|
||||||
{{ $colorTheme := "light" }}
|
{{ $colorTheme := "light" }}
|
||||||
{{ $colorThemeSwitcher := false }}
|
{{ $colorThemeSwitcher := true }}
|
||||||
|
|
||||||
{{ if and (isset site.Params "colortheme") (ne site.Params.colortheme "") }}
|
{{ if and (isset site.Params "colortheme") (ne site.Params.colortheme "") }}
|
||||||
{{ $colorTheme = site.Params.colortheme | lower }}
|
{{ $colorTheme = site.Params.colortheme | lower }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if and (isset site.Params "colorthemeswitcher") }}
|
{{ if isset site.Params "colorthemeswitcher" }}
|
||||||
{{ $colorThemeSwitcher = site.Params.colorthemeswitcher }}
|
{{ $colorThemeSwitcher = site.Params.colorthemeswitcher }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $colorThemeSwitcher = true }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if or (eq $colorThemeSwitcher true) (eq $colorTheme "auto") }}
|
{{ if or (eq $colorThemeSwitcher true) (eq $colorTheme "auto") }}
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
{{ $colorTheme := "light" }}
|
{{ $colorTheme := "light" }}
|
||||||
{{ $colorThemeSwitcher := false }}
|
{{ $colorThemeSwitcher := true }}
|
||||||
|
|
||||||
{{ if and (isset site.Params "colortheme") (ne site.Params.colortheme "") }}
|
{{ if and (isset site.Params "colortheme") (ne site.Params.colortheme "") }}
|
||||||
{{ $colorTheme = site.Params.colortheme | lower }}
|
{{ $colorTheme = site.Params.colortheme | lower }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if and (isset site.Params "colorthemeswitcher") }}
|
{{ if isset site.Params "colorthemeswitcher" }}
|
||||||
{{ $colorThemeSwitcher = site.Params.colorthemeswitcher }}
|
{{ $colorThemeSwitcher = site.Params.colorthemeswitcher }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if or (eq $colorThemeSwitcher true) (eq $colorTheme "auto") }}
|
{{ if or (eq $colorThemeSwitcher true) (eq $colorTheme "auto") }}
|
||||||
{{ if site.Params.colorthemeswitcher }}
|
{{ if $colorThemeSwitcher }}
|
||||||
<div class="theme-switcher">
|
<div class="theme-switcher">
|
||||||
{{ partial "font-awesome.html" (dict "iconName" "theme-light" "custom" false) }}
|
{{ partial "font-awesome.html" (dict "iconName" "theme-light" "custom" false) }}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user