layouts/shortcodes/activity.html (view raw)
1<h3 style="margin-top:2rem">Activité récente</h3>
2<div class="activity-grid">
3 <h4>Dernière publication</h4>
4 <div>
5 {{ range first 1 (where site.RegularPages "Section" "posts") }}
6 <a href="{{ .RelPermalink }}">{{ .LinkTitle }} ({{ .Date | time.Format "Jan 2006" }})</a>
7 {{end}}
8 </div>
9
10 <h4>Lecture en cours</h4>
11 <div>
12 {{ $outbox := getJSON "https://bookwyrm.social/user/5ika/outbox?page=1" }}
13 {{ with index $outbox.orderedItems 0 }}
14 <a href='{{ .id }}' target="_blank">
15 {{ with index .attachment 0 }}
16 {{ .name }}</a>
17 {{ end }}
18 </a>
19 {{ end }}
20 </div>
21</div>