From 6416a7cb1adb60c7dd142abb0204f3751ab36a1f Mon Sep 17 00:00:00 2001 From: Zach Berwaldt Date: Sun, 14 May 2023 17:57:10 -0400 Subject: tweak css, layouts, add new archetype --- layouts/_default/list.html | 24 ++++++++++++------------ layouts/_default/single.html | 13 ++++++++++--- layouts/book/single.html | 26 ++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 15 deletions(-) create mode 100644 layouts/book/single.html (limited to 'layouts') diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 5d1370f..cf36155 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,12 +1,12 @@ -{{ define "main" }} -
-
{{- .Content -}}
-
- {{ range .Paginator.Pages }} -
- {{ .Render "summary" }} -
- {{ end }} -
-
-{{ end }} +{{ define "main" }} +
+
{{- .Content -}}
+
+ {{ range .Paginator.Pages }} +
+ {{ .Render "summary" }} +
+ {{ end }} +
+
+{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 3e48693..306df48 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,4 +1,11 @@ -{{ define "main" }} -

{{ .Title }}

- {{- .Content -}} +{{ define "main" }} +
+
+

{{ .Title }}

+
{{ .Date | time.Format ":date_full" }}
+
+
+ {{- .Content -}} +
+
{{ end }} \ No newline at end of file diff --git a/layouts/book/single.html b/layouts/book/single.html new file mode 100644 index 0000000..3ffb236 --- /dev/null +++ b/layouts/book/single.html @@ -0,0 +1,26 @@ +{{ define "main" }} +
+

{{ .Title }}

+

{{ .Params.author }}

+
{{ .Date | time.Format ":date_full" }}
+ {{ if isset .Params "image" }} + Book cover of the book {{ .Title }} + {{ end }} + {{ if isset .Params "amazon" }} +

+ amazon +

+ {{ end }} +
+

Rating:

+ {{ if isset .Params "rating" }} + {{ $rating := .Params.rating }} + {{ range $i, $num := (seq $rating) }} + ⭐ + {{ end }} + {{ else }} +

N/A

+ {{ end }} +
+
+{{ end }} \ No newline at end of file -- cgit v1.1