From ae5fbeb8af153d358b4d13d7e2bdd16061ca5524 Mon Sep 17 00:00:00 2001 From: Zach Berwaldt Date: Mon, 23 Oct 2023 19:29:28 -0400 Subject: update layouts, readme, config --- layouts/_default/single.html | 2 +- layouts/book/list.html | 7 +++++-- layouts/book/single.html | 23 +++++++++++++++-------- layouts/book/summary.html | 4 ++++ 4 files changed, 25 insertions(+), 11 deletions(-) (limited to 'layouts') diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 49137fb..518e6e2 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,7 +1,7 @@ {{ define "main" }}

{{- .Title -}}

-

Some dude on the internet with—like—opinions and stuff

+

Some dude on the internet with–like–opinions and stuff

{{- .Content -}} diff --git a/layouts/book/list.html b/layouts/book/list.html index 25976dd..dcca1f9 100644 --- a/layouts/book/list.html +++ b/layouts/book/list.html @@ -1,5 +1,8 @@ {{ define "main" }} -

{{ .Title }}

+
+

{{ .Title }}

+

Books I have read. Rated with the five star system.

+
{{ if .Content }}

{{- .Content -}}

{{ end }} @@ -28,4 +31,4 @@ {{ end }} {{ end }}
-{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/book/single.html b/layouts/book/single.html index baedf32..9179523 100644 --- a/layouts/book/single.html +++ b/layouts/book/single.html @@ -21,20 +21,27 @@ {{ errorf "unable to get remote resource %q" .Params.image }} {{ end }} {{ end }} - {{ if isset .Params "amazon" }} -

- amazon -

- {{ end }} -
-

Rating:

+
+ Rating: {{ if isset .Params "rating" }} {{ $rating := .Params.rating }} - {{ range $i, $num := (seq $rating) }} + {{ range (seq $rating) }} ⭐ {{ end }} + {{ $diff := sub 5 $rating }} + {{ range (seq $diff) }} + ☆ + {{ end }} {{ else }}

N/A

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

+ amazon +

+ {{ end }} +
+ {{- .Content -}} +
{{ end }} \ No newline at end of file diff --git a/layouts/book/summary.html b/layouts/book/summary.html index 900fb87..56f2ea7 100644 --- a/layouts/book/summary.html +++ b/layouts/book/summary.html @@ -17,9 +17,13 @@ {{ end }}

+ {{ if .Content }} {{ .Title }} + {{ else }} + {{ .Title }} + {{ end }}

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

{{ with .Params.last_read }} -- cgit v1.1