aboutsummaryrefslogtreecommitdiff
path: root/themes/hugo-pt2021/layouts/articles/list.html
blob: f9c747b9ed272f7fb03ffd2ca06421b1ab57a6b4 (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
{{- define "title" -}}
  Articles
{{- end -}}

{{- define "main" -}}
  {{/* get visible articles */}}
  {{- $rows := union (where .Pages "Params.show" true) (where .Pages "Params.show" nil) -}}

  <div class='container'>
    <div class='section is-small'>
      <h1 class='title' title='{{.Title}}' aria-label='{{.Title}}'>
        Articles
      </h1>

      <div class='content'>
        <ul>
          {{- range $rows.ByTitle -}}
            <li>
              <a
                href='{{.Permalink}}'
                title='{{.Title}}'
                aria-label='{{.Title}}'
              >
                {{- .Title -}}
              </a>
            </li>
          {{- else -}}
            <li>No articles.</li>
          {{- end -}}
        </ul>
      </div><!-- content -->
    </div><!-- section -->
  </div><!-- container -->
{{- end -}}