update: "colorThemeSwitcher" defaults to "true"
This commit is contained in:
parent
87172dbdfc
commit
e7a93e2088
@ -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") }}
|
||||
|
@ -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 }}
|
||||
<div class="theme-switcher">
|
||||
{{ partial "font-awesome.html" (dict "iconName" "theme-light" "custom" false) }}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user