aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/taxonomy/terms.html
blob: 75efd989cc5a0aa8799c8634d0a50428e69174e6 (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
{{ define "hero" }}
  {{ partial "hero.html" . }}
{{ end }}

{{ define "main" }}
  <section class="mw7 center">
    <section class="mt3">
      {{ range .Data.Terms.ByCount }}
        <a
          class="dib near-black link grow hover-bg-white-80 hover-near-black pa2 ba ma1 br2"
          href="#{{ .Name | urlize }}-list"
          data-tag="{{ .Name | lower }}"
        >
          {{ .Name }}
        </a>
      {{ end }}
    </section>

    <!-- EACH tag post -->
    <section class="">
      {{ range .Data.Terms.ByCount }}
        <div
          id="{{ .Name | urlize }}-list"
          class="pa1 pa2-ns bb"
          data-tag="{{ .Name | lower }}"
        >
          <h4 class="f4 bold center lh-title">
            <a class="link dim color-inherit" href="{{ .Name | urlize }}">
              {{ .Name }} ({{ .Pages | len }})
            </a>
          </h4>
          <ul class="list ph5">
            {{ range .Pages.ByDate }}
              <li class="lh-copy stripe-dark ph1 pv2">
                {{ $dateFormat := .Site.Params.dateFormat | default "Jan 2, 2006" }}
                <time
                  datetime="{{ .Date.Format "2006-01-02" }}"
                  class="f6 fw3 fr ml2"
                >
                  <i class="far fa-calendar"></i>
                  {{ .Date.Format $dateFormat }}
                </time>
                <a class="link dim color-inherit" href="{{ .Permalink }}">
                  {{ .Title }}
                </a>
              </li>
            {{ end }}
          </ul>
        </div>
      {{ end }}
    </section>
  </section>
{{ end }}