aboutsummaryrefslogtreecommitdiff
path: root/themes/hugo-pt2021/layouts/_default/archive.html
blob: 737fd9429e33b66cc7201ff728e0482aa9f13107 (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
{{- define "title" -}}
  {{- .Title -}}
{{- end -}}

{{- define "main" -}}
  <div class='container'>
    <div class='section is-small'>
      <h1 class='title'>
        {{- .Title -}}
      </h1><!-- title -->

      <div class='content'>
        {{- $posts := where .Site.RegularPages "Section" "posts" -}}
        {{- range $posts.GroupByDate "2006" -}}
          {{- $head := index .Pages 0 -}}
          {{- $year := $head.Date.Format "2006" -}}
          <h2 id='{{$year}}'>{{$year}}</h2>
          <ul>
            {{- range .Pages -}}
              <li>
                <a 
                  href='{{.Permalink}}'
                  title='{{.Title}}'
                  aria-label='{{.Title}}'
                >
                  {{- .Title -}}
                </a>
              </li>
            {{- end -}}
          </ul>
        {{- end -}}
      </div><!-- content -->
    </div><!-- section -->
  </div><!-- container -->
{{- end -}}