blob: a86ef3adff4d0aa292162f435e606ab011ceb402 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
{{ define "main" }}
<article>
<h1>{{ .Title }}</h1>
<section>
{{ range sort (.Paginator 3).Pages "Date" "desc" }}
<div>{{ .Render "summary" }}</div>
{{ end }}
{{ with .Paginator }}
<div class="grid">
<div class='flex'>
{{ if .HasPrev }}
<a href="{{ .Prev.URL }}">prev</a>
{{ end }}
<p>{{ .PageNumber }} of {{ .TotalPages }}</p>
{{ if .HasNext }}
<a href="{{ .Next.URL }}">next</a>
{{ end }}
</div>
</div>
{{ end }}
</section>
</article>
{{ end }}
|