From 5c086bc52fa3a226bcf706b1f420a5d98ea377dd Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Wed, 15 Dec 2021 10:45:58 +0100 Subject: Redo most of the blog in Hugo Missing posts will have to be added later --- layouts/_default/baseof.html | 47 ++++++++++++++++++++++++++++++++++++++ layouts/_default/section.html | 19 +++++++++++++++ layouts/_default/term.html | 19 +++++++++++++++ layouts/home.html | 21 +++++++++++++++++ layouts/posts/list.html | 20 ++++++++++++++++ layouts/posts/single.html | 20 ++++++++++++++++ layouts/shortcodes/admonition.html | 8 +++++++ layouts/shortcodes/quote.html | 10 ++++++++ 8 files changed, 164 insertions(+) create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/_default/section.html create mode 100644 layouts/_default/term.html create mode 100644 layouts/home.html create mode 100644 layouts/posts/list.html create mode 100644 layouts/posts/single.html create mode 100644 layouts/shortcodes/admonition.html create mode 100644 layouts/shortcodes/quote.html (limited to 'layouts') diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..a3478ab --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,47 @@ +{{- $cssMain := resources.Get "theme/main.scss" | resources.ToCSS | fingerprint -}} + + + + + + + + + + {{ range .AlternativeOutputFormats -}} + + {{ end }} + + {{ .Page.Title }} - {{ .Site.Title }} + + + {{ block "body" . }} + +
+
+ {{ block "main" . }}{{ end }} +
+
+ + {{ end }} + + diff --git a/layouts/_default/section.html b/layouts/_default/section.html new file mode 100644 index 0000000..144b79a --- /dev/null +++ b/layouts/_default/section.html @@ -0,0 +1,19 @@ +{{ define "main" }} +

{{ .Title }}

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

Posts tagged with #{{ .Title }}

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

+ {{ .Page.Title }} +

+ + +
+
+ {{ .Content }} +
+ +
+{{ end }} diff --git a/layouts/posts/list.html b/layouts/posts/list.html new file mode 100644 index 0000000..1bacf24 --- /dev/null +++ b/layouts/posts/list.html @@ -0,0 +1,20 @@ +{{ define "main" }} +

{{ .Title }}

+{{ .Content }} +{{ range .Sections }} +

{{ .Title }}

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

{{ .Title }}

+ {{- range .Params.tags }} + #{{ . }} + {{- end }} +
+
+ {{ .Content }} +
+ +
+{{ end }} diff --git a/layouts/shortcodes/admonition.html b/layouts/shortcodes/admonition.html new file mode 100644 index 0000000..f25b9ff --- /dev/null +++ b/layouts/shortcodes/admonition.html @@ -0,0 +1,8 @@ +
+
+ {{ .Get "title" }} +
+
+ {{ .Inner | .Page.RenderString }} +
+
diff --git a/layouts/shortcodes/quote.html b/layouts/shortcodes/quote.html new file mode 100644 index 0000000..f2d9c4c --- /dev/null +++ b/layouts/shortcodes/quote.html @@ -0,0 +1,10 @@ +
+
+
+ {{ .Inner | .Page.RenderString }} +
+
+
+ — {{ .Get "attribution" }} +
+
-- cgit v1.1