First, last includes for body, footer, head, header, and main tags

This commit is contained in:
Will Faught
2023-01-26 17:43:56 -08:00
parent 3bc024bc9e
commit 246a650445
5 changed files with 59 additions and 10 deletions

View File

@@ -1,5 +1,17 @@
{{ if .Site.Menus.main }}
{{ $first := templates.Exists "partials/paige/header-first.html" }}
{{ $last := templates.Exists "partials/paige/header-last.html" }}
{{ $menu := .Site.Menus.main }}
{{ if or $first $last $menu }}
<header>
{{ partial "paige/menu.html" . }}
{{ if $first }}
{{ partial "paige/header-first.html" . }}
{{ end }}
{{ if $menu }}
{{ partial "paige/menu.html" . }}
{{ end }}
{{ if $last }}
{{ partial "paige/header-last.html" . }}
{{ end }}
</header>
{{ end }}