aboutsummaryrefslogtreecommitdiff
path: root/generators/hugo/themes/tdro/layouts/_default/taxonomy.html
blob: a0090e16977a41461198c01ea04b0581e7e3c1e2 (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{{ define "main" }}
{{ $sidenote := "<span class=\"marginnote rightnote\">See an archive of all taxonomies <a href=\"/archives/tags/\">here.</a></span>" }}
<section class="section is-fullheight" itemscope itemtype="http://schema.org/AboutPage">
  <div class="container">
    <div class="columns is-centered">
      <div class="column is-7">
        {{ $title := .Title }}
        {{ if eq $title "Tags" }}
          <article class="content">
          <h1 class="article__list title is-3">Taxonomies</h1>
          {{ safeHTML $sidenote }}
          {{ range .Paginator.Pages }}
            {{ $title := .Title }}
            <h1 class="article__list smallcaps title">{{ .Title | title }}</h1>
            {{ range $taxonomy := .Site.Taxonomies }}
              {{ range $tag, $article := $taxonomy }}
                {{ if eq $tag $title }}
                <ul class="article__list">
                  {{ range $article.Pages }}
                  <li>
                    <a title="{{ .Title }}" class="is-block" href="{{ .RelPermalink }}">
                      <span class="article__list__date monospace has-text-grey-dark">{{ .Date.Format "02 Jan 2006" }}</span>{{ .Title }}
                    </a>
                  </li>
                  {{ end }}
                </ul>
                {{ end }}
              {{ end }}
            {{ end }}
          {{ end }}
          </article>
          {{ partial "pagination.html" . }}
        {{ else  }}
          <article class="content">
          <h1 class="smallcaps title">
            {{ if ne $title "Tags" }} <a href="/{{ .Data.Plural }}/">Tags</a> <span>&mdash;</span> <span>{{ end }}{{ .Title | title }}</span>
          </h1>
          {{ safeHTML $sidenote }}
            {{ range $taxonomy := .Site.Taxonomies }}
              {{ range $tag, $article := $taxonomy }}
                {{ if eq $tag $title }}
                <ul class="article__list">
                  {{ range $article.Pages }}
                  <li>
                    <a title="{{ .Title }}" class="is-block" href="{{ .RelPermalink }}">
                      <span class="article__list__date monospace has-text-grey-dark">
                        {{- .Date.Format "02 Jan 2006" -}}
                      </span>
                      {{- .Title | markdownify -}}
                    </a>
                  </li>
                  {{ end }}
                </ul>
                {{ end }}
              {{ end }}
            {{ end }}
          </article>
        {{ end }}
      </div>
    </div>
  </div>
</section>
{{ end }}