From 9c616364a98f1550cab2d9e738e913c263be96d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Sun, 6 Feb 2022 13:51:54 +0100 Subject: [PATCH] theme: realign HTML header and DRY out stylesheet declarations --- layouts/404.html | 23 ++------------- layouts/partials/favicon.html | 16 +++++------ layouts/partials/header.html | 49 +++++++++++--------------------- layouts/partials/menu.html | 2 ++ layouts/partials/meta.html | 29 +++++++------------ layouts/partials/search.html | 2 -- layouts/partials/stylesheet.html | 31 ++++++++++++++++++++ 7 files changed, 69 insertions(+), 83 deletions(-) create mode 100644 layouts/partials/stylesheet.html diff --git a/layouts/404.html b/layouts/404.html index fc2bf44ad7..4b8d5287b8 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,11 +1,7 @@ - - - {{ hugo.Generator -}} {{- partial "meta.html" . }} - {{ partial "favicon.html" . }} {{- .Scratch.Add "title" "" }} {{- if eq .Site.Data.titles .Title }} {{- .Scratch.Set "title" (index .Site.Data.titles .Title).title }} @@ -14,24 +10,9 @@ {{- end }} {{ .Scratch.Get "title" }} {{ default "::" .Site.Params.titleSeparator }} {{ .Site.Title }} - {{- $assetBusting := not .Site.Params.disableAssetsBusting }} - - - - - - {{- with .Site.Params.themeVariant }} - - - {{- end }} - - {{- range .Site.Params.custom_css }} - - {{- end }} + {{- partial "favicon.html" . }} + {{- partial "stylesheet.html" . }} + + {{- partial "favicon.html" . }} + {{- partial "stylesheet.html" . }} {{- partial "custom-header.html" . }} diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html index b950b1894e..c616521e93 100644 --- a/layouts/partials/menu.html +++ b/layouts/partials/menu.html @@ -1,4 +1,6 @@ + {{ "" | safeHTML }} + {{ "" | safeHTML }} - {{ "" | safeHTML }} - {{ "" | safeHTML }} \ No newline at end of file diff --git a/layouts/partials/stylesheet.html b/layouts/partials/stylesheet.html new file mode 100644 index 0000000000..32de928521 --- /dev/null +++ b/layouts/partials/stylesheet.html @@ -0,0 +1,31 @@ + {{- $assetBusting := not .Site.Params.disableAssetsBusting }} + + + + + + + {{- with .Site.Params.themeVariant }} + + + {{- end }} + + {{- range .Site.Params.custom_css }} + + {{- end }} + + \ No newline at end of file