blob: 68d9ff0e14a572f5e6a4629af8ca837662d96005 (
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
|
{{ define "main" }}
{{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
<main class="index">
{{ if .Content }}
<article>
<h1>{{ .Title | emojify }}</h1>
{{ .Content }}
</article>
{{ else }}
<h1>{{ T "posts" }}</h1>
<ul class="posts">
{{ range $paginator.Pages }}
<li>
<a class="btn" href="{{ .Permalink }}">
<p>{{ .LinkTitle | emojify }}</p>
{{ if not .Date.IsZero }}<time datetime="{{ .Date | dateFormat "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>{{ end }}
</a>
</li>
{{ end }}
</ul>
{{ partial "pagination" . }}
{{ end }}
</main>
{{ end }}
|