From 158f9d1d5d129fe2490a0bdef1cdae0d23d8f87e Mon Sep 17 00:00:00 2001 From: Will Faught Date: Sun, 11 Dec 2022 01:00:28 -0800 Subject: [PATCH] Split baseof.html into more templates --- README.md | 6 +- layouts/_default/baseof.html | 74 ++----------------- layouts/_default/list.html | 2 +- layouts/_default/single.html | 2 +- layouts/_default/taxonomy.html | 2 +- layouts/_default/term.html | 2 +- layouts/partials/paige_footer.html | 5 ++ layouts/partials/paige_head.html | 9 +++ layouts/partials/paige_header.html | 5 ++ layouts/partials/paige_link.html | 8 ++ layouts/partials/paige_meta.html | 13 ++++ .../{paige_content.html => paige_page.html} | 0 layouts/partials/paige_script.html | 8 ++ layouts/partials/paige_style.html | 15 ++++ layouts/partials/paige_title.html | 7 ++ 15 files changed, 83 insertions(+), 75 deletions(-) create mode 100644 layouts/partials/paige_footer.html create mode 100644 layouts/partials/paige_head.html create mode 100644 layouts/partials/paige_header.html create mode 100644 layouts/partials/paige_link.html create mode 100644 layouts/partials/paige_meta.html rename layouts/partials/{paige_content.html => paige_page.html} (100%) create mode 100644 layouts/partials/paige_script.html create mode 100644 layouts/partials/paige_style.html create mode 100644 layouts/partials/paige_title.html diff --git a/README.md b/README.md index 376cf11f..9fc09cde 100644 --- a/README.md +++ b/README.md @@ -85,9 +85,9 @@ Single pages use the `link` page parameter, if any, as the reference for an anchor around the page title, if any. If the page or site parameter `math` is set to true, math typesetting is enabled with KaTeX. -If `partials/head.html` exists in the site, it is included at the end of -the head tag. If `partials/body.html` exists in the site, it is included -at the end of the body tag. +If `partials/paige_head_last.html` exists in the site, it is included at +the end of the head tag. If `partials/paige_body_last.html` exists in +the site, it is included at the end of the body tag. Bootstrap 5.2.2 CSS and JavaScript and Bootstrap Icons 1.10.2 are loaded from the Bootstrap CDN for every page. diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 37557dc0..a47b5311 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,85 +1,23 @@ - - - {{ if .Site.Author.name }} - - {{ end }} - {{ if .Description }} - - {{ end }} - {{ if or .Keywords .Params.tags .Params.categories }} - - {{ end }} - - {{ template "_internal/opengraph.html" . }} - {{ template "_internal/twitter_cards.html" . }} - {{ if and (and .Title .Site.Title) (or (not (eq .Title .Site.Title)) (not .IsHome)) }} - {{ .Title | markdownify | plainify | htmlUnescape }} · {{ .Site.Title | markdownify | plainify | htmlUnescape }} - {{ else if .Title }} - {{ .Title | markdownify | plainify | htmlUnescape }} - {{ else if .Site.Title }} - {{ .Site.Title | markdownify | plainify | htmlUnescape }} - {{ end }} - - - {{ if or .Site.Params.math .Params.math }} - - {{ end }} - {{ range .AlternativeOutputFormats }} - - {{ end }} - - {{ if templates.Exists "partials/head.html" }} - {{ partial "head.html" . }} - {{ end }} - + {{ partial "paige_head.html" . }}
- {{ if .Site.Menus.main }} -
- {{ partial "paige_menu.html" . }} -
- {{ end }} + {{ partial "paige_header.html" . }}
{{ block "main" . }}{{ end }}
- {{ if .Site.Copyright }} -
-

{{ .Site.Copyright | markdownify }}

-
- {{ end }} + {{ partial "paige_footer.html" . }}
- - {{ if or .Site.Params.math .Params.math }} - - - {{ end }} - {{ if .Site.GoogleAnalytics }} - {{ template "_internal/google_analytics.html" . }} - {{ end }} - {{ if templates.Exists "partials/body.html" }} - {{ partial "body.html" . }} + {{ partial "paige_script.html" . }} + {{ if templates.Exists "partials/paige_body_last.html" }} + {{ partial "paige_body_last.html" . }} {{ end }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index e843e294..6990666d 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,4 +1,4 @@ {{ define "main" }} -{{ partial "paige_content.html" . }} +{{ partial "paige_page.html" . }} {{ partial "paige_pages.html" . }} {{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 9c052dc2..a87712d5 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,3 +1,3 @@ {{ define "main" }} -{{ partial "paige_content.html" . }} +{{ partial "paige_page.html" . }} {{ end }} diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html index d01b5d87..bcd1ad90 100644 --- a/layouts/_default/taxonomy.html +++ b/layouts/_default/taxonomy.html @@ -1,5 +1,5 @@ {{ define "main" }} -{{ partial "paige_content.html" . }} +{{ partial "paige_page.html" . }} {{ if .Pages }}