diff --git a/config.yml b/config.yml index f236e97..b1fbb56 100644 --- a/config.yml +++ b/config.yml @@ -85,5 +85,3 @@ params: defaultTheme: dark displayFullLangName: true hideFooter: true - - diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..a26b27a --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,147 @@ +{{- /* theme-toggle is enabled */}} +{{- if (not site.Params.disableThemeToggle) }} +{{- /* theme is light */}} +{{- if (eq site.Params.defaultTheme "light") }} + +{{- /* theme is dark */}} +{{- else if (eq site.Params.defaultTheme "dark") }} + +{{- else }} +{{- /* theme is auto */}} + +{{- end }} +{{- /* theme-toggle is disabled and theme is auto */}} +{{- else if (and (ne site.Params.defaultTheme "light") (ne site.Params.defaultTheme "dark"))}} + +{{- end }} + +
+ +