From e96aff653fe034a6c6e12280bd39c04197b501a9 Mon Sep 17 00:00:00 2001 From: Zach Berwaldt Date: Sun, 5 Nov 2023 14:46:24 -0500 Subject: modifications to css, layouts, and archetypes --- layouts/book/single.html | 59 ++++++++++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 25 deletions(-) (limited to 'layouts/book/single.html') diff --git a/layouts/book/single.html b/layouts/book/single.html index 9179523..f025d92 100644 --- a/layouts/book/single.html +++ b/layouts/book/single.html @@ -1,9 +1,7 @@ {{ define "main" }} -
-

{{ .Title }}

-
{{ .Date | time.Format ":date_full" }}
-
+
{{ if isset .Params "image" }} +
{{ with resources.GetRemote .Params.image }} {{ with .Err }} {{ errorf "%s" . }} @@ -20,28 +18,39 @@ {{ else }} {{ errorf "unable to get remote resource %q" .Params.image }} {{ end }} +
+
+
{{ end }} -
- Rating: - {{ if isset .Params "rating" }} - {{ $rating := .Params.rating }} - {{ range (seq $rating) }} - ⭐ - {{ end }} - {{ $diff := sub 5 $rating }} - {{ range (seq $diff) }} - ☆ - {{ end }} - {{ else }} -

N/A

- {{ end }} -
- {{ if isset .Params "amazon" }} -

- amazon -

- {{ end }} -
+
+
+

{{ .Title }}

+ {{ with .Params.last_read }} + {{ $last := index (.) 0 }} + {{/* if last_read is an array get the first item */}} +
Finished on: {{ $last | time.Format ":date_full" }}
+ {{ end }} +
Rating: + {{ if isset .Params "rating" }} + {{ $rating := .Params.rating }} + {{ range (seq $rating) }} + ⭐ + {{ end }} + {{ $diff := sub 5 $rating }} + {{ range (seq $diff) }} + ☆ + {{ end }} + {{ else }} + N/A + {{ end }} +
+ {{ if isset .Params "amazon" }} +
Links: + Amazon +
+ {{ end }} +
{{- .Content -}}
+
{{ end }} \ No newline at end of file -- cgit v1.1