aboutsummaryrefslogtreecommitdiff
path: root/generators/hugo/themes/tdro/layouts/_default/archive.html
blob: 152de1976bc2fe3b7af4de010928406b88f73a00 (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
{{ define "main" }}
<section class="section is-fullheight" itemscope itemtype="https://schema.org/WebPage">
  <div class="container">
    <div class="columns is-centered">
      <div class="column is-7">

      {{ $type := .Type }}
      {{ $.Scratch.Set "count" 1 }}

        {{ range (.Site.RegularPages.GroupByDate "2006") }}
          {{ if (gt .Key 2000) }}

            {{ range (where .Pages "Type" $type) }}
              {{ if (eq ($.Scratch.Get "count") 1) }}
                {{ $.Scratch.Set "count" 0 }}
                <h1 class="title is-4 has-text-weight-normal has-padding-left-md has-margin-bottom-lg">{{ .Date.Format "2006" }}</h1>
              {{ end }}
            {{ end }}

            {{ $.Scratch.Set "count" 1 }}

              <ul class="article__list">
              {{ range (where .Pages "Type" $type) }}
                {{ if (ne .Params.hidden true) }}
                  <li>
                    <a class="is-block" href="{{ .RelPermalink }}">
                      <span class="has-text-grey-dark">{{ .Date.Format "02 Jan" }}</span>{{ .Title }}
                    </a>
                  </li>
                {{ end }}
              {{ end }}

            </ul>
            <br>

        {{ end }}
      {{ end }}

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