blob: 900fb8758310966441cc27a24ab22d36cfc9cbac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
<section class="flex row gap-1">
{{ with resources.GetRemote .Params.image }}
{{ with .Err }}
{{ errorf "%s" . }}
{{ else }}
{{ $image := . }}
{{ $image := $image.Resize "150x" }}
<img
src="{{ $image.RelPermalink }}"
width="{{ $image.Width }}"
height="{{ $image.Height }}"
alt="Book cover of the book {{ .Title }}"
/>
{{ end }}
{{ else }}
{{ errorf "unable to get remote resource %q" .Params.image }}
{{ end }}
<hgroup>
<h3 class="f3 near-black">
<a href="{{ .RelPermalink }}" class="link black dim">
{{ .Title }}
</a>
</h3>
<p>Rating: {{ .Params.rating }} / 5</p>
{{ with .Params.last_read }}
<p>Last Read: {{ . | time.Format ":date_full" }}</p>
{{ end }}
</hgroup>
</section>
|