finished moving "style" to "colorTheme, colorThemeSwitcher"
This commit is contained in:
parent
80298828e7
commit
4bd6cadc3b
@ -21,12 +21,18 @@
|
|||||||
|
|
||||||
{{ partial "favicons.html" . }}
|
{{ partial "favicons.html" . }}
|
||||||
|
|
||||||
{{ $colorTheme := "light-without-switcher" }}
|
{{ $colorTheme := "light" }}
|
||||||
|
{{ $colorThemeSwitcher := false }}
|
||||||
|
|
||||||
{{ 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 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") }}
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
{{ $colorTheme := "light-without-switcher" }}
|
{{ $colorTheme := "light" }}
|
||||||
|
{{ $colorThemeSwitcher := false }}
|
||||||
|
|
||||||
{{ 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 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") }}
|
||||||
{{ if site.Params.colorthemeswitcher }}
|
{{ if site.Params.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) }}
|
||||||
|
Loading…
Reference in New Issue
Block a user