aboutsummaryrefslogtreecommitdiff
path: root/generators/hugo/themes/tdro/layouts/_default/archive.html
blob: 4d9d9106ea752a959ea3efc88b9c93a874cb1e44 (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 "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 }}

        {{ range (.Site.RegularPages.GroupByDate "2006") }}
          {{ $articles := (where .Pages "Type" $type) }}
          {{ if and (gt .Key 1) (gt (where .Pages "Type" $type) 0) }}

            {{ range (first 1 $articles) }}
            <h1 class="article__list title is-4 has-text-weight-normal has-margin-bottom-lg">{{ .Date.Format "2006" }}</h1>
            {{ end }}

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

          {{ end }}
        {{ end }}

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