From 55ed353216554d6327984fa8f1cf707b70e06ac1 Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Tue, 23 Dec 2025 16:34:08 -0330 Subject: move layout from theme to site --- layouts/baseof.html | 20 ++++++++++++++++++++ layouts/home.html | 7 +++++++ layouts/page.html | 10 ++++++++++ layouts/section.html | 8 ++++++++ layouts/taxonomy.html | 7 +++++++ layouts/term.html | 7 +++++++ 6 files changed, 59 insertions(+) create mode 100644 layouts/baseof.html create mode 100644 layouts/home.html create mode 100644 layouts/page.html create mode 100644 layouts/section.html create mode 100644 layouts/taxonomy.html create mode 100644 layouts/term.html (limited to 'layouts') diff --git a/layouts/baseof.html b/layouts/baseof.html new file mode 100644 index 0000000..dd61d01 --- /dev/null +++ b/layouts/baseof.html @@ -0,0 +1,20 @@ + + + + {{ partial "head.html" . }} + + +
+
+ {{ partial "header.html" . }} +
+
+ {{ block "main" . }}{{ end }} +
+
+
+ {{ partial "footer.html" . }} +
+
+ + diff --git a/layouts/home.html b/layouts/home.html new file mode 100644 index 0000000..0df6597 --- /dev/null +++ b/layouts/home.html @@ -0,0 +1,7 @@ +{{ define "main" }} + {{ .Content }} + {{ range site.RegularPages }} +

{{ .LinkTitle }}

+ {{ .Summary }} + {{ end }} +{{ end }} diff --git a/layouts/page.html b/layouts/page.html new file mode 100644 index 0000000..7e286c8 --- /dev/null +++ b/layouts/page.html @@ -0,0 +1,10 @@ +{{ define "main" }} +

{{ .Title }}

+ + {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} + {{ $dateHuman := .Date | time.Format ":date_long" }} + + + {{ .Content }} + {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} +{{ end }} diff --git a/layouts/section.html b/layouts/section.html new file mode 100644 index 0000000..50fc92d --- /dev/null +++ b/layouts/section.html @@ -0,0 +1,8 @@ +{{ define "main" }} +

{{ .Title }}

+ {{ .Content }} + {{ range .Pages }} +

{{ .LinkTitle }}

+ {{ .Summary }} + {{ end }} +{{ end }} diff --git a/layouts/taxonomy.html b/layouts/taxonomy.html new file mode 100644 index 0000000..c2e7875 --- /dev/null +++ b/layouts/taxonomy.html @@ -0,0 +1,7 @@ +{{ define "main" }} +

{{ .Title }}

+ {{ .Content }} + {{ range .Pages }} +

{{ .LinkTitle }}

+ {{ end }} +{{ end }} diff --git a/layouts/term.html b/layouts/term.html new file mode 100644 index 0000000..c2e7875 --- /dev/null +++ b/layouts/term.html @@ -0,0 +1,7 @@ +{{ define "main" }} +

{{ .Title }}

+ {{ .Content }} + {{ range .Pages }} +

{{ .LinkTitle }}

+ {{ end }} +{{ end }} -- cgit v1.2.3