diff options
author | Zach Berwaldt <zberwaldt@tutamail.com> | 2023-05-14 17:57:10 -0400 |
---|---|---|
committer | Zach Berwaldt <zberwaldt@tutamail.com> | 2023-05-14 17:57:10 -0400 |
commit | 6416a7cb1adb60c7dd142abb0204f3751ab36a1f (patch) | |
tree | 97dc775cec10158a6d6559ee9f5bb08f9b2775b3 /layouts | |
parent | 59b4fc0d0e761238f51f27658d116b90c0abb528 (diff) |
tweak css, layouts, add new archetype
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/list.html | 24 | ||||
-rw-r--r-- | layouts/_default/single.html | 13 | ||||
-rw-r--r-- | layouts/book/single.html | 26 |
3 files changed, 48 insertions, 15 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 5d1370f..cf36155 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html | |||
@@ -1,12 +1,12 @@ | |||
1 | {{ define "main" }} | 1 | {{ define "main" }} |
2 | <article> | 2 | <article> |
3 | <section>{{- .Content -}}</section> | 3 | <section>{{- .Content -}}</section> |
4 | <section> | 4 | <section> |
5 | {{ range .Paginator.Pages }} | 5 | {{ range .Paginator.Pages }} |
6 | <div> | 6 | <div> |
7 | {{ .Render "summary" }} | 7 | {{ .Render "summary" }} |
8 | </div> | 8 | </div> |
9 | {{ end }} | 9 | {{ end }} |
10 | </section> | 10 | </section> |
11 | </article> | 11 | </article> |
12 | {{ end }} | 12 | {{ end }} |
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 3e48693..306df48 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html | |||
@@ -1,4 +1,11 @@ | |||
1 | {{ define "main" }} | 1 | {{ define "main" }} |
2 | <h1>{{ .Title }}</h1> | 2 | <article> |
3 | {{- .Content -}} | 3 | <section> |
4 | <h1>{{ .Title }}</h1> | ||
5 | <h6>{{ .Date | time.Format ":date_full" }}</h6> | ||
6 | </section> | ||
7 | <section> | ||
8 | {{- .Content -}} | ||
9 | </section> | ||
10 | </article> | ||
4 | {{ end }} \ No newline at end of file | 11 | {{ end }} \ No newline at end of file |
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 @@ | |||
1 | {{ define "main" }} | ||
2 | <article> | ||
3 | <h1>{{ .Title }}</h1> | ||
4 | <h4>{{ .Params.author }}</h4> | ||
5 | <h6>{{ .Date | time.Format ":date_full" }}</h6> | ||
6 | {{ if isset .Params "image" }} | ||
7 | <img src="{{ .Params.image }}" alt="Book cover of the book {{ .Title }}" /> | ||
8 | {{ end }} | ||
9 | {{ if isset .Params "amazon" }} | ||
10 | <p> | ||
11 | <a href="{{ .Params.amazon }}" target="_blank">amazon</a> | ||
12 | </p> | ||
13 | {{ end }} | ||
14 | <div> | ||
15 | <p>Rating: </p> | ||
16 | {{ if isset .Params "rating" }} | ||
17 | {{ $rating := .Params.rating }} | ||
18 | {{ range $i, $num := (seq $rating) }} | ||
19 | ⭐ | ||
20 | {{ end }} | ||
21 | {{ else }} | ||
22 | <p>N/A</p> | ||
23 | {{ end }} | ||
24 | </div> | ||
25 | </article> | ||
26 | {{ end }} \ No newline at end of file | ||