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
|
{{ define "main" }}
{{ $years := .Pages.GroupByDate "2006" }}
<div class="page-index column">
<header class="post-header rise">
<h1 class="post-title">{{ .Title }}</h1>
<hr class="post-rule">
</header>
<div class="index-body">
{{ range $i, $year := $years }}
<section class="year rise" style="--i: {{ add $i 1 }}">
<h2 class="year__label">
{{ $year.Key }}
<span class="count">{{ i18n "postsCount" (dict "Count" (len $year.Pages)) }}</span>
</h2>
<ul class="year__list">
{{ range $year.Pages }}
<li class="entry">
<span class="date">{{ .Date.Format "Jan 02" }}</span>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>
</section>
{{ end }}
</div>
</div>
{{ end }}
|