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/summary.html | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 layouts/book/summary.html (limited to 'layouts/book/summary.html') diff --git a/layouts/book/summary.html b/layouts/book/summary.html new file mode 100644 index 0000000..900fb87 --- /dev/null +++ b/layouts/book/summary.html @@ -0,0 +1,29 @@ +
+ {{ with resources.GetRemote .Params.image }} + {{ with .Err }} + {{ errorf "%s" . }} + {{ else }} + {{ $image := . }} + {{ $image := $image.Resize "150x" }} + Book cover of the book {{ .Title }} + {{ end }} + {{ else }} + {{ errorf "unable to get remote resource %q" .Params.image }} + {{ end }} +
+

+ + {{ .Title }} + +

+

Rating: {{ .Params.rating }} / 5

+ {{ with .Params.last_read }} +

Last Read: {{ . | time.Format ":date_full" }}

+ {{ end }} +
+
-- cgit v1.1