diff options
| author | Zach Berwaldt <zberwaldt@tutamail.com> | 2023-10-09 21:08:24 -0400 |
|---|---|---|
| committer | Zach Berwaldt <zberwaldt@tutamail.com> | 2023-10-09 21:08:24 -0400 |
| commit | d0e7f43601e90229b95191a1cdc85039e233b622 (patch) | |
| tree | 873074bb67ef58311067209434243b421d7f675e /layouts/book/single.html | |
| parent | 4e30ae95eaf52a7f427bdf020d118f40e00ab291 (diff) | |
add icons, refine styles, update layouts
Diffstat (limited to 'layouts/book/single.html')
| -rw-r--r-- | layouts/book/single.html | 15 |
1 files changed, 14 insertions, 1 deletions
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 @@ | |||
| 4 | <h4>{{ .Params.author }}</h4> | 4 | <h4>{{ .Params.author }}</h4> |
| 5 | <h6>{{ .Date | time.Format ":date_full" }}</h6> | 5 | <h6>{{ .Date | time.Format ":date_full" }}</h6> |
| 6 | {{ if isset .Params "image" }} | 6 | {{ if isset .Params "image" }} |
| 7 | <img src="{{ .Params.image }}" alt="Book cover of the book {{ .Title }}" /> | 7 | {{ with resources.GetRemote .Params.image }} |
| 8 | {{ with .Err }} | ||
| 9 | {{ errorf "%s" . }} | ||
| 10 | {{ else }} | ||
| 11 | <img | ||
| 12 | src="{{ .RelPermalink }}" | ||
| 13 | width="{{ .Width }}" | ||
| 14 | height="{{ .Height }}" | ||
| 15 | alt="Book cover of the book {{ .Title }}" | ||
| 16 | /> | ||
| 17 | {{ end }} | ||
| 18 | {{ else }} | ||
| 19 | {{ errorf "unable to get remote resource %q" .Params.image }} | ||
| 20 | {{ end }} | ||
| 8 | {{ end }} | 21 | {{ end }} |
| 9 | {{ if isset .Params "amazon" }} | 22 | {{ if isset .Params "amazon" }} |
| 10 | <p> | 23 | <p> |
