blob: 7cb4681a212d9b45a7c077e7f46e935d77f87572 (
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
|
{{ define "main" }}
<article>
{{ partial "header.html" . }}
<div class="posts-list pagefind-exclude">
<!-- Post Archive List -->
{{ $remainingMonthsToOpen := 3 }}
{{ range (where site.RegularPages "Type" "eq" "posts").GroupByDate "2006" -}}
<section class="w-full">
<h1 class="border-b-2 border-b-solid border-[var(--border-color)]
py-2 text-6 sticky top-0 bg-[var(--background-color)] z-1
flex justify-between items-center">
{{ .Key }}
<small class="font-mono text-secondary text-3">{{ T "archivePage.postCountAnnual" (len .Pages) }}</small>
</h1>
{{ range .Pages.GroupByDate "January" }}
<details class="posts-month-archive"{{ if gt $remainingMonthsToOpen 0 }} open{{ end }}>
<summary class="flex items-center border-b border-b-dashed border-[var(--border-color)] py-2 px-1">
<h2 class="text-size-lg inline-block w-full m-0
flex justify-between items-center">
{{ .Key }}
<small class="font-mono text-secondary text-3">{{ T "archivePage.postCountMonthly" (len .Pages) }}</small>
</h2>
</summary>
<ul class="ps-0 flex flex-col gap-2 list-none leading-relaxed">
{{ range .Pages }}
{{ partial "items/post-small" . }}
{{ end }}
</ul>
</details>
{{ $remainingMonthsToOpen = sub $remainingMonthsToOpen 1 }}
{{ end }}
</section>
{{ end }}
</div>
</article>
{{ partial "footer.html" . }}
{{ end }}
|