summaryrefslogtreecommitdiff
path: root/layouts/_default/section.html
blob: 9a0b6dcde6182e4aede7b7f7b7879b7b3f94f89e (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
40
41
42
43
44
45
46
47
48
49
50
51
52
{{ define "main" }}
    <article class="posts">
      {{ partial "header.html" . }}
      <div id="posts-archive" class="posts-list">
        {{ partial "components/heatmap.html" . }}
        <!-- Post Archive List -->
        {{ range (where site.RegularPages "Type" "in" site.Params.mainSections).GroupByDate "2006" -}}
          <section class="posts-year-archive">
            <h1 class="posts-year-title">
                {{ .Key }}
                <small class="font-mono">{{ T "archivePage.postCountAnnual" (len .Pages) }}</small>
            </h1>

              {{ range .Pages.GroupByDate "January" }}
              <details class="posts-month-archive">
                  <summary>
                      <h2 class="posts-month-title">
                          {{ .Key }}
                          <small class="font-mono">{{ T "archivePage.postCountMonthly" (len .Pages) }}</small>
                      </h2>
                  </summary>
                  <div class="term-list">
                      <ul>
                        {{ range .Pages }}
                          <li>
                            <div style="display: flex; gap: 1rem;">
                                <time class="font-mono">
                                    {{ .Date.Format "Jan 06" }}
                                </time>
                                <a href="{{ .Permalink }}">
                                    {{ .Title }}
                                </a>
                            </div>
                            <div class="posts-item-category">
                                {{ with .Params.categories }}
                                    <a href="/categories/{{ . }}">
                                        {{ . }}
                                    </a>
                                {{ end }}
                            </div>
                          </li>
                        {{ end }}
                      </ul>
                  </div>
              </details>
              {{ end }}

          </section>
        {{ end }}
      </div>
    </article>
{{ end }}