layouts/shortcodes/books.html (view raw)
1<div style="margin-top:2rem">
2 {{ $outbox := getJSON "https://bookwyrm.social/user/5ika/outbox?page=1" }}
3 {{ range $outbox.orderedItems }}
4 {{ if hasPrefix .content "<p>" }}
5 <div>
6 <a href='{{ .inReplyToBook }}' target="_blank">
7 {{ with index .attachment 0 }}
8 {{ (replaceRE ` \(.*?\)` "" (replaceRE `^(.*):` "<strong>$1</strong>" .name)) | safeHTML }}
9 {{ end}}
10 </a>
11 <div style="margin-top:8px"><span class='date'>{{ dateFormat "2 Jan 2006" .published }}</span></div>
12 <blockquote>{{ (replaceRE `<p>\(comment on .*</p>` "" .content) | safeHTML}}</blockquote>
13 </div>
14 {{ end }}
15 {{ end }}
16</div>