From 511cbfbafde4ff463751fadf8dd15d3b7eb41cea Mon Sep 17 00:00:00 2001 From: Mark Powers Date: Thu, 24 Oct 2024 08:14:08 -0500 Subject: Refactor theme usage --- layouts/404.html | 0 layouts/_default/baseof.html | 9 +++++++++ layouts/_default/list.html | 22 ++++++++++++++++++++++ layouts/_default/single.html | 21 +++++++++++++++++++++ layouts/partials/footer.html | 3 +++ layouts/partials/head.html | 45 ++++++++++++++++++++++++++++++++++++++++++++ layouts/partials/header.html | 13 +++++++++++++ 7 files changed, 113 insertions(+) create mode 100644 layouts/404.html create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/_default/list.html create mode 100644 layouts/_default/single.html create mode 100644 layouts/partials/footer.html create mode 100644 layouts/partials/head.html create mode 100644 layouts/partials/header.html (limited to 'layouts') diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..5dc4b24 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,9 @@ + + + {{- partial "head.html" . -}} + + {{- partial "header.html" . -}} + {{- block "main" . }}{{- end }} + {{- partial "footer.html" . -}} + + diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..45c8631 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,22 @@ +{{ define "head" }} + +{{ end }} + +{{ define "main" }} +{{ if .Content }} +
+
+ {{ .Content }} +
+{{ else }} +
+ +{{ end}} +
+{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..52e9c13 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,21 @@ +{{ define "head" }} + +{{ end }} + +{{ define "main" }} +
+

{{ .Title }}

+
{{ .PublishDate.Format "January 2, 2006"}}
+
+ {{ .Content }} +
+ {{ if ne .Params.tags nil }} +
+ Keywords: + {{ range .Params.tags }} + #{{ . }} + {{ end }} +
+ {{ end }} +
+{{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..ecf9420 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,3 @@ +
+
Mark Powers <> © 2023
+
diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..29e9f49 --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + {{ if .Keywords }} + + {{ end }} + + + + + + {{ range .AlternativeOutputFormats -}} + {{ printf ` + ` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} + {{ end -}} + + + + + + {{ template "_internal/schema.html" . }} + + + + + + {{ if .IsHome }} + {{ .Site.Title }} + {{ else }} + {{ .Title }} - {{ .Site.Title }} + {{ end }} + + {{ block "head" . }}{{ end }} + diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..97fec62 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,13 @@ + -- cgit v1.2.3