blob: d2ce8eefc84381f17da43de4270ff74ac603453f (
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
|
{{ define "main" }}
<section class="search-page">
<header class="all-posts__header">
<h1 class="all-posts__heading">
{{ .Title }}
</h1>
{{- with .Content }}
<div class="all-posts__description">
{{ . }}
</div>
{{- else }}
{{- $description := or .Description (lang.Translate "posts_all_description" | default "All posts on this website, from newest to oldest.") }}
<p class="all-posts__description">
{{ $description }}
</p>
{{- end }}
</header>
{{ $allPosts := where site.RegularPages "Params.excludeFromLists" "!=" true }}
{{- if $allPosts }}
<div class="all-posts__content">
<ul class="all-posts__list" role="list">
{{- range $allPosts.ByDate.Reverse }}
<li class="all-posts__list-item">
{{ partial "list/post-card.html" . }}
</li>
{{- end }}
</ul>
</div>
{{ else }}
<p class="all-posts__empty-message">
{{ lang.Translate "posts_empty" | default "This site does not have any posts yet." }}
</p>
{{- end }}
</section>
{{ end }}
|