diff options
author | Zach Berwaldt <zberwaldt@tutamail.com> | 2023-10-23 19:29:28 -0400 |
---|---|---|
committer | Zach Berwaldt <zberwaldt@tutamail.com> | 2023-10-23 19:29:28 -0400 |
commit | ae5fbeb8af153d358b4d13d7e2bdd16061ca5524 (patch) | |
tree | 0c4d95f65ba7fbbaf26b8e187818c259c3f03886 /layouts | |
parent | 6bfd84ae2c7aad006c3bc84cdce9aebf894cbe62 (diff) |
update layouts, readme, config
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/single.html | 2 | ||||
-rw-r--r-- | layouts/book/list.html | 7 | ||||
-rw-r--r-- | layouts/book/single.html | 23 | ||||
-rw-r--r-- | layouts/book/summary.html | 4 |
4 files changed, 25 insertions, 11 deletions
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 @@ | |||
1 | {{ define "main" }} | 1 | {{ define "main" }} |
2 | <hgroup> | 2 | <hgroup> |
3 | <h1>{{- .Title -}}</h1> | 3 | <h1>{{- .Title -}}</h1> |
4 | <p>Some dude on the internet with—like—opinions and stuff</p> | 4 | <p>Some dude on the internet with–like–opinions and stuff</p> |
5 | </hgroup> | 5 | </hgroup> |
6 | <section class="content"> | 6 | <section class="content"> |
7 | {{- .Content -}} | 7 | {{- .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 @@ | |||
1 | {{ define "main" }} | 1 | {{ define "main" }} |
2 | <h1>{{ .Title }}</h1> | 2 | <hgroup> |
3 | <h1>{{ .Title }}</h1> | ||
4 | <p>Books I have read. Rated with the five star system.</p> | ||
5 | </hgroup> | ||
3 | {{ if .Content }} | 6 | {{ if .Content }} |
4 | <p>{{- .Content -}}</p> | 7 | <p>{{- .Content -}}</p> |
5 | {{ end }} | 8 | {{ end }} |
@@ -28,4 +31,4 @@ | |||
28 | {{ end }} | 31 | {{ end }} |
29 | {{ end }} | 32 | {{ end }} |
30 | </section> | 33 | </section> |
31 | {{ end }} \ No newline at end of file | 34 | {{ 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 @@ | |||
21 | {{ errorf "unable to get remote resource %q" .Params.image }} | 21 | {{ errorf "unable to get remote resource %q" .Params.image }} |
22 | {{ end }} | 22 | {{ end }} |
23 | {{ end }} | 23 | {{ end }} |
24 | {{ if isset .Params "amazon" }} | 24 | <div class="flex row gap-1"> |
25 | <p> | 25 | <strong>Rating:</strong> |
26 | <a href="{{ .Params.amazon }}" target="_blank">amazon</a> | ||
27 | </p> | ||
28 | {{ end }} | ||
29 | <div> | ||
30 | <p>Rating: </p> | ||
31 | {{ if isset .Params "rating" }} | 26 | {{ if isset .Params "rating" }} |
32 | {{ $rating := .Params.rating }} | 27 | {{ $rating := .Params.rating }} |
33 | {{ range $i, $num := (seq $rating) }} | 28 | {{ range (seq $rating) }} |
34 | ⭐ | 29 | ⭐ |
35 | {{ end }} | 30 | {{ end }} |
31 | {{ $diff := sub 5 $rating }} | ||
32 | {{ range (seq $diff) }} | ||
33 | ☆ | ||
34 | {{ end }} | ||
36 | {{ else }} | 35 | {{ else }} |
37 | <p>N/A</p> | 36 | <p>N/A</p> |
38 | {{ end }} | 37 | {{ end }} |
39 | </div> | 38 | </div> |
39 | {{ if isset .Params "amazon" }} | ||
40 | <p> | ||
41 | <a href="{{ .Params.amazon }}" target="_blank">amazon</a> | ||
42 | </p> | ||
43 | {{ end }} | ||
44 | <div> | ||
45 | {{- .Content -}} | ||
46 | </div> | ||
40 | {{ end }} \ No newline at end of file | 47 | {{ 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 @@ | |||
17 | {{ end }} | 17 | {{ end }} |
18 | <hgroup> | 18 | <hgroup> |
19 | <h3 class="f3 near-black"> | 19 | <h3 class="f3 near-black"> |
20 | {{ if .Content }} | ||
20 | <a href="{{ .RelPermalink }}" class="link black dim"> | 21 | <a href="{{ .RelPermalink }}" class="link black dim"> |
21 | {{ .Title }} | 22 | {{ .Title }} |
22 | </a> | 23 | </a> |
24 | {{ else }} | ||
25 | {{ .Title }} | ||
26 | {{ end }} | ||
23 | </h3> | 27 | </h3> |
24 | <p>Rating: {{ .Params.rating }} / 5</p> | 28 | <p>Rating: {{ .Params.rating }} / 5</p> |
25 | {{ with .Params.last_read }} | 29 | {{ with .Params.last_read }} |