From c633cbf5bcb88d6ad4434127bc356432b2b01a52 Mon Sep 17 00:00:00 2001 From: Roland Thomas Date: Sat, 10 Jun 2023 20:46:37 -0400 Subject: [PATCH] Change header.html --- hugo.toml | 2 +- layouts/partials/header.html | 141 +++++++++++++++++++++++++++++++++++ 2 files changed, 142 insertions(+), 1 deletion(-) create mode 100644 layouts/partials/header.html diff --git a/hugo.toml b/hugo.toml index 6b26e67..ebe3ba9 100644 --- a/hugo.toml +++ b/hugo.toml @@ -63,7 +63,7 @@ weight = 1 [[languages.en.menu.main]] name = "Archive" -url = "archives" +url = "archives/" weight = 5 [[languages.en.menu.main]] diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..adefc2a --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,141 @@ +{{- /* 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 }} + +
+ +