blob: fb53b401305889768e51a568054b7ec1660c45c8 (
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
30
31
32
33
34
35
36
37
38
39
|
{{- define "main" }}
<section class="list-page">
<header class="list-page__header">
<h1 class="list-page__headline">
{{ .Title }}
</h1>
{{- with .Content }}
<div class="list-page__description">
{{ . }}
</div>
{{- else }}
{{- $description := or .Description .Summary (lang.Translate "list_description" .Title | default (printf "All posts in %s" .Title)) }}
<p class="list-page__description">
{{ $description }}
</p>
{{- end }}
</header>
<section class="list-page__content" aria-label="{{ lang.Translate "posts" | default "Posts" }}">
{{- /* 15 posts per site */ -}}
{{- $paginator := .Paginate .Pages 15 }}
{{- with $paginator.Pages }}
<ul class="list-page__posts-list">
{{- range . }}
<li class="list-page__post">
{{- partial "list/post-card.html" . }}
</li>
{{- end }}
</ul>
{{ else }}
<p class="list-page__empty-message">
{{ lang.Translate "list_empty" | default "No posts found in this section." }}
</p>
{{- end }}
</section>
{{- partial "list/pagination.html" $paginator }}
</section>
{{- end }}
|