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/book/single.html | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 layouts/book/single.html (limited to 'layouts/book/single.html') 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 From d0e7f43601e90229b95191a1cdc85039e233b622 Mon Sep 17 00:00:00 2001 From: Zach Berwaldt Date: Mon, 9 Oct 2023 21:08:24 -0400 Subject: add icons, refine styles, update layouts --- layouts/book/single.html | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'layouts/book/single.html') diff --git a/layouts/book/single.html b/layouts/book/single.html index 3ffb236..0bbd265 100644 --- a/layouts/book/single.html +++ b/layouts/book/single.html @@ -4,7 +4,20 @@

{{ .Params.author }}

{{ .Date | time.Format ":date_full" }}
{{ if isset .Params "image" }} - Book cover of the book {{ .Title }} + {{ with resources.GetRemote .Params.image }} + {{ with .Err }} + {{ errorf "%s" . }} + {{ else }} + Book cover of the book {{ .Title }} + {{ end }} + {{ else }} + {{ errorf "unable to get remote resource %q" .Params.image }} + {{ end }} {{ end }} {{ if isset .Params "amazon" }}

-- cgit v1.1 From 6e6412e4a693ddc2da5e4611363fb882ad6497be Mon Sep 17 00:00:00 2001 From: Zach Berwaldt Date: Thu, 12 Oct 2023 08:08:37 -0400 Subject: Switch to light theme. remove articles. --- layouts/book/single.html | 61 ++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 31 deletions(-) (limited to 'layouts/book/single.html') diff --git a/layouts/book/single.html b/layouts/book/single.html index 0bbd265..66456e1 100644 --- a/layouts/book/single.html +++ b/layouts/book/single.html @@ -1,39 +1,38 @@ {{ define "main" }} -

+

{{ .Title }}

-

{{ .Params.author }}

{{ .Date | time.Format ":date_full" }}
- {{ if isset .Params "image" }} - {{ with resources.GetRemote .Params.image }} - {{ with .Err }} - {{ errorf "%s" . }} - {{ else }} - Book cover of the book {{ .Title }} - {{ end }} +
+ {{ if isset .Params "image" }} + {{ with resources.GetRemote .Params.image }} + {{ with .Err }} + {{ errorf "%s" . }} {{ else }} - {{ errorf "unable to get remote resource %q" .Params.image }} + Book cover of the book {{ .Title }} {{ end }} + {{ else }} + {{ errorf "unable to get remote resource %q" .Params.image }} + {{ end }} + {{ end }} + {{ if isset .Params "amazon" }} +

+ amazon +

+ {{ end }} +
+

Rating:

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

- amazon -

+ {{ else }} +

N/A

{{ 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 From 6bfd84ae2c7aad006c3bc84cdce9aebf894cbe62 Mon Sep 17 00:00:00 2001 From: user Date: Fri, 20 Oct 2023 22:49:31 -0400 Subject: add summary for books --- layouts/book/single.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'layouts/book/single.html') diff --git a/layouts/book/single.html b/layouts/book/single.html index 66456e1..baedf32 100644 --- a/layouts/book/single.html +++ b/layouts/book/single.html @@ -8,12 +8,14 @@ {{ with .Err }} {{ errorf "%s" . }} {{ else }} - Book cover of the book {{ .Title }} + {{ $image := . }} + {{ $image := $image.Resize "250x" }} + Book cover of the book {{ .Title }} {{ end }} {{ else }} {{ errorf "unable to get remote resource %q" .Params.image }} -- cgit v1.1