From 14fca032762fc1c92c3e6798aa1c628b1151d443 Mon Sep 17 00:00:00 2001
From: tdro
Date: Sat, 9 Sep 2023 19:12:32 -0400
Subject: themes/default/layouts/_default/baseof: More granularity with header
---
themes/default/layouts/_default/baseof.html | 13 +-
themes/default/layouts/_default/home.archives.html | 26 ++--
themes/default/layouts/_default/home.authors.html | 34 ++---
themes/default/layouts/_default/home.sources.html | 43 ++++---
themes/default/layouts/_default/home.xslt.rss.xsl | 143 ++++++++++-----------
.../default/layouts/_default/home.xslt.sitemap.xsl | 67 +++++-----
themes/default/layouts/_default/index.html | 4 +-
.../default/layouts/_default/section.drafts.html | 8 +-
themes/default/layouts/_default/section.feeds.html | 4 +-
themes/default/layouts/_default/section.html | 4 +-
themes/default/layouts/_default/section.likes.html | 6 +-
themes/default/layouts/_default/section.media.html | 4 +-
themes/default/layouts/_default/single.html | 4 +-
themes/default/layouts/_default/taxonomy.html | 7 +-
themes/default/layouts/_default/term.html | 4 +-
15 files changed, 195 insertions(+), 176 deletions(-)
(limited to 'themes/default/layouts/_default')
diff --git a/themes/default/layouts/_default/baseof.html b/themes/default/layouts/_default/baseof.html
index e9f8550..a582805 100644
--- a/themes/default/layouts/_default/baseof.html
+++ b/themes/default/layouts/_default/baseof.html
@@ -34,12 +34,13 @@
-
- {{- block "middle" . -}}
-
- {{- end -}}
- {{- partial "base-footer.html" . -}}
-
+ {{- block "header" . -}}{{- end -}}
+
+ {{- block "middle" . -}}
+
+ {{- end -}}
+
+ {{- partial "base-footer.html" . -}}
diff --git a/themes/default/layouts/_default/home.archives.html b/themes/default/layouts/_default/home.archives.html
index 7fb5a78..0a04d41 100644
--- a/themes/default/layouts/_default/home.archives.html
+++ b/themes/default/layouts/_default/home.archives.html
@@ -1,14 +1,13 @@
-{{ define "title" }}Message Archive — {{ end }}
-{{ define "description" }}This page contains an archive of all messages — {{ end }}
-{{ define "styles" }}
+{{- define "title" -}}Message Archive — {{- end -}}
+{{- define "description" -}}This page contains an archive of all messages — {{- end -}}
+{{- define "styles" -}}
-{{ end }}
+{{- end -}}
-{{ define "middle" }}
-
- {{ partial "navigator-middle.html"
+{{- define "header" -}}
+ {{- partial "navigator-middle.html"
(dict
"Context" .
"IconLabel" "Back"
@@ -18,8 +17,10 @@
"Subtitle" (partial "count-total-messages.html" .)
"Href" (or (and (gt .Paginator.PageNumber 1) (.Paginator.Prev.URL | absURL)) "/")
)
- }}
+ -}}
+{{- end -}}
+{{- define "middle" -}}
{{ range (.Paginator.Pages.GroupByDate "2006") }}
@@ -47,10 +48,9 @@
- {{ partial "pagination.html" . }}
-
-{{ end }}
+ {{- partial "pagination.html" . -}}
+{{- end -}}
-{{ define "right" }}
+{{- define "right" -}}
{{- partial "navigator-right.html" . -}}
-{{ end }}
+{{- end -}}
diff --git a/themes/default/layouts/_default/home.authors.html b/themes/default/layouts/_default/home.authors.html
index 17dcf59..ee24585 100644
--- a/themes/default/layouts/_default/home.authors.html
+++ b/themes/default/layouts/_default/home.authors.html
@@ -1,16 +1,13 @@
-{{ define "title" }}Authors — {{ end }}
-{{ define "description" }}This page contains a list of all authors — {{ end }}
-{{ define "styles" }}
+{{- define "title" -}}Authors — {{- end -}}
+{{- define "description" -}}This page contains a list of all authors — {{- end -}}
+{{- define "styles" -}}
-{{ end }}
+{{- end -}}
-{{ define "middle" }}
-
- {{- partial "generate-authors" . -}}
-
- {{ partial "navigator-middle.html"
+{{- define "header" -}}
+ {{- partial "navigator-middle.html"
(dict
"Title" "Authors"
"Subtitle" (partial "count-authors.html" .)
@@ -20,22 +17,25 @@
"Id" "back"
"Context" .
)
- }}
+ -}}
+{{- end -}}
- {{ $authors := partial "function-authors-slice.html" . }}
+{{- define "middle" -}}
+ {{- partial "generate-authors" . -}}
+
+ {{- $authors := partial "function-authors-slice.html" . -}}
{{- range $author := $authors -}}
- {{ $data := index $.Site.Data $author | default "default" }}
+ {{- $data := index $.Site.Data $author | default "default" -}}
{{- $date := (index (first 1 (where $.Site.Pages.ByDate.Reverse "Section" $author)) 0).Date -}}
{{- partial "author-card.html" (dict
"Data" $data
"Date" $date
)
-}}
- {{ end }}
-
-{{ end }}
+ {{- end -}}
+{{- end -}}
-{{ define "right" }}
+{{- define "right" -}}
{{- partial "navigator-right.html" . -}}
-{{ end }}
+{{- end -}}
diff --git a/themes/default/layouts/_default/home.sources.html b/themes/default/layouts/_default/home.sources.html
index b498f4a..cea3826 100644
--- a/themes/default/layouts/_default/home.sources.html
+++ b/themes/default/layouts/_default/home.sources.html
@@ -1,28 +1,27 @@
-{{ define "title" }}Sources — {{ end }}
-{{ define "description" }}This page contains a list of all source files — {{ end }}
-{{ define "styles" }}
+{{- define "title" -}}Sources — {{- end -}}
+{{- define "description" -}}This page contains a list of all source files — {{- end -}}
+{{- define "styles" -}}
-{{ end }}
+{{- end -}}
-{{ define "middle" }}
+{{- define "header" -}}
+ {{- $_default := readDir (print "/themes/default/layouts/_default") -}}
+ {{- $_markup := readDir (print "/themes/default/layouts/_default/_markup") -}}
+ {{- $partials := readDir (print "/themes/default/layouts/partials") -}}
+ {{- $shortcodes := readDir (print "/themes/default/layouts/shortcodes") -}}
- {{ $_default := readDir (print "/themes/default/layouts/_default") }}
- {{ $_markup := readDir (print "/themes/default/layouts/_default/_markup") }}
- {{ $partials := readDir (print "/themes/default/layouts/partials") }}
- {{ $shortcodes := readDir (print "/themes/default/layouts/shortcodes") }}
-
- {{ $fileCount := add
+ {{- $fileCount := add
(add
(sub (len $_default) 1)
(len $_markup))
(add
(len $partials)
(len $shortcodes))
- }}
+ -}}
- {{ partial "navigator-middle.html"
+ {{- partial "navigator-middle.html"
(dict
"Title" "Sources"
"Subtitle" (print $fileCount " " "Files")
@@ -32,11 +31,17 @@
"Id" "back"
"Context" .
)
- }}
+ -}}
+{{- end -}}
+
+{{- define "middle" -}}
+ {{- $_default := readDir (print "/themes/default/layouts/_default") -}}
+ {{- $_markup := readDir (print "/themes/default/layouts/_default/_markup") -}}
+ {{- $partials := readDir (print "/themes/default/layouts/partials") -}}
+ {{- $shortcodes := readDir (print "/themes/default/layouts/shortcodes") -}}
-
Defaults
{{ range sort $_default ".ModTime" "desc" }}
@@ -109,11 +114,9 @@
· Fuzzy Sort by Stephen Kamenar: MIT License
-
+{{- end -}}
-{{ end }}
-
-{{ define "right" }}
+{{- define "right" -}}
{{- partial "navigator-right.html" . -}}
-{{ end }}
+{{- end -}}
diff --git a/themes/default/layouts/_default/home.xslt.rss.xsl b/themes/default/layouts/_default/home.xslt.rss.xsl
index d345af9..9d5e8ee 100644
--- a/themes/default/layouts/_default/home.xslt.rss.xsl
+++ b/themes/default/layouts/_default/home.xslt.rss.xsl
@@ -18,88 +18,87 @@
-
-
-
+ {{ end }}
+
+
-
-
-
-
-
-
-
- Published:
-
-
-
+
+
+
+
+
+
+
+ Published:
+
+
+
-
-
+
+