From 2b4ca1a88e4df33269e0bd80b4b23ef40d276858 Mon Sep 17 00:00:00 2001 From: wires Date: Thu, 6 Mar 2025 23:30:44 -0500 Subject: first draft of theme --- layouts/_default/_markup/render-codeblock.html | 1 + layouts/_default/baseof.html | 29 ++++++++++++++++++++++++++ layouts/_default/list.html | 10 +++++++++ layouts/_default/single.html | 16 ++++++++++++++ layouts/index.html | 14 +++++++++++++ layouts/partials/footer.html | 5 +++++ layouts/partials/head.html | 28 +++++++++++++++++++++++++ layouts/partials/header.html | 0 layouts/partials/tags.html | 5 +++++ 9 files changed, 108 insertions(+) create mode 100644 layouts/_default/_markup/render-codeblock.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/index.html create mode 100644 layouts/partials/footer.html create mode 100644 layouts/partials/head.html create mode 100644 layouts/partials/header.html create mode 100644 layouts/partials/tags.html (limited to 'layouts') diff --git a/layouts/_default/_markup/render-codeblock.html b/layouts/_default/_markup/render-codeblock.html new file mode 100644 index 0000000..9bfc3b1 --- /dev/null +++ b/layouts/_default/_markup/render-codeblock.html @@ -0,0 +1 @@ +
{{ (transform.HighlightCodeBlock .).Inner }}
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..ecac3b1 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,29 @@ + + + + {{ partial "head.html" . }} + + +{{ range .AlternativeOutputFormats -}} +{{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} +{{ end -}} + + + + + +
+{{ block "main" . }}{{ end }} +
+{{ partial "footer.html" . }} + + diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..ea76a24 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,10 @@ +{{ define "main" }} +

{{ .Title }}

+ +{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..60d1b41 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,16 @@ +{{ define "main" }} +
+

{{ .Title }}

+ +
+ {{ if .Params.toc }} + + + {{ end }} + {{ .Content }} + {{ partial "tags.html" . }} +{{ end }} diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..fd3d675 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,14 @@ +{{ define "main" }} +{{ .Content }} +{{ with .Site.RegularPages }} +

Posts

+ +{{ end }} +{{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..99d42f9 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,5 @@ + diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..ce38afc --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,28 @@ + + +{{ with (or .Description .Site.Params.description) }} + +{{ end }} +{{ with .Keywords }}{{ end }} + + +{{- with resources.Get "style.css" }} + {{- if eq hugo.Environment "development" }} + + {{- else }} + {{- with . | minify | fingerprint }} + + {{- end }} + {{- end }} +{{- end }} +{{- with resources.Get "syntax.css" }} + {{- if eq hugo.Environment "development" }} + + {{- else }} + {{- with . | minify | fingerprint }} + + {{- end }} + {{- end }} +{{- end }} +{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }} + diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/partials/tags.html b/layouts/partials/tags.html new file mode 100644 index 0000000..8062534 --- /dev/null +++ b/layouts/partials/tags.html @@ -0,0 +1,5 @@ +{{ with .GetTerms "tags" }} +
+tags: +{{ range $i, $e := . }}{{- if $i -}}, {{ end -}}{{ with $e }}{{lower .Title}}{{end}}{{ end }} +{{ end }} -- cgit 1.4.1