From 83784ddcdaaf2e2d0c8b92ca05a155a64f9cd99a Mon Sep 17 00:00:00 2001 From: Tamara Schmitz Date: Tue, 15 Aug 2023 11:39:48 +0200 Subject: [PATCH] no more language flags, name of language instead --- config.yml | 2 - layouts/partials/header.html | 147 +++++++++++++++++++++++++++++++++++ 2 files changed, 147 insertions(+), 2 deletions(-) create mode 100644 layouts/partials/header.html 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 }} + +
+ +