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

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

      <div class='content'>
        {{- $rows := union (where .Pages "Params.active" true) (where .Pages "Params.active" nil) -}}
        {{- if len $rows -}}
          <h3 
            title='Current projects that are actively maintained.'
          >Current Projects</h3>

          <ul>
            {{- range $rows.ByTitle -}}
              {{- if (default true .Params.show) -}}
                {{- partial "project_summary" . -}}
              {{- end -}}
            {{- end -}}
          </ul>
        {{- end -}}

        {{- $rows := where .Pages.ByTitle "Params.active" false -}}
        {{- if len $rows -}}
          <h3
            title='Old projects that are no longer maintained.'
            aria-label='Old projects that are no longer maintained.'
          >Old Projects</h3>

          <ul>
            {{- range $rows.ByTitle -}}
              {{- if (default true .Params.show) -}}
                {{- partial "project_summary" . -}}
              {{- end -}}
            {{- end -}}
          </ul>
        {{- end -}}
      </div><!-- content -->
    </div><!-- section -->
  </div><!-- container -->
{{- end -}}