From f0607e7fae4e008b2fda3274c3d00c5338d3b9e0 Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Sat, 2 Jan 2021 01:00:29 +0100 Subject: [PATCH] New partial layouts to handle specifics of dennogumi.org's header --- layouts/partials/site-header.html | 43 +++++++++++++++++++++++++++ layouts/partials/site-navigation.html | 26 ++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100755 layouts/partials/site-header.html create mode 100644 layouts/partials/site-navigation.html diff --git a/layouts/partials/site-header.html b/layouts/partials/site-header.html new file mode 100755 index 0000000..a252b92 --- /dev/null +++ b/layouts/partials/site-header.html @@ -0,0 +1,43 @@ +{{ $featured_image := .Param "featured_image"}} +{{ if $featured_image }} + {{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}} + {{ $featured_image := (trim $featured_image "/") | absURL }} +
+
+ {{ partial "site-navigation.html" .}} +
+

+ {{ if not .Params.omit_header_text }} + {{ .Title | default .Site.Title }} + {{ else }} +   + {{ end }} +

+ {{ if not .Params.omit_header_text }} + {{ with .Params.description }} +

+ {{ . }} +

+ {{ end }} + {{ end }} +
+
+
+{{ else }} +
+
+ {{ partial "site-navigation.html" . }} +
+ +

+ {{ .Title | default .Site.Title }} +

+ {{ with .Params.description }} +

+ {{ . }} +

+ {{ end }} +
+
+
+{{ end }} diff --git a/layouts/partials/site-navigation.html b/layouts/partials/site-navigation.html new file mode 100644 index 0000000..565d99d --- /dev/null +++ b/layouts/partials/site-navigation.html @@ -0,0 +1,26 @@ +