aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/_default/taxonomy.html
blob: 5c8e2ba3aea9e9a032581fff1e6d4af248a34a5c (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
64
65
66
67
68
69
70
71
{{- define "styles" -}}
<style>
  {{ partial "navigator.css.html" (dict "Link" "/tags/") | safeCSS }}
</style>
{{- end -}}

{{- define "header" -}}
  {{- partial "navigator-middle.html"
    (dict
      "Context"    .
      "IconLabel"  "Back"
      "Id"         "back"
      "Title"      "Tags"
      "Icon"       "arrow-left"
      "Subtitle"   (print (partial "count-tags.html" .) " " "Total")
      "Href"       (or (and (gt .Paginator.PageNumber 1) (.Paginator.Prev.URL | absURL)) "/")
    )
  -}}
{{- end -}}

{{- define "middle" -}}
  <tag-deck>
    {{- range .Paginator.Pages -}}
      {{- $count := lang.FormatNumberCustom 0 (len .Data.Pages) -}}
      {{- $title := lower .Title -}}

      {{- range first 1 .Pages -}}
      {{- $author := partial "function-authors-data.html" . -}}
        <tag-card>
         <article>
          <h2>
            <code>
              {{ $count }} in
              <a data-hover href="{{ "" | absURL }}/tags/{{ $title }}/">
                #{{ $title }}
              </a>
            </code>
          </h2>
          <figure>
            <a href="{{ print ("" | absURL)  "/tags/" $title "/#"  (partial "card-id.html" .) }}">
              <picture>
                {{ partial "author-picture" . }}
              </picture>
            </a>
          </figure>
          <time
            datetime="{{ .Date | time.Format "2006-01-02T15:04:05Z" }}"
            title="{{ .Date | time.Format "Posted: Monday, January 2, 2006 at 15:04:05 MST" }}"
          >
            {{ .Date | time.Format "02 Jan 2006" }}
          </time>
          <p>
            <a data-hover href="{{ print ("" | absURL)  "/tags/" $title "/#"  (partial "card-id.html" .) }}">
              {{ partial "meta-title.html" . }}
            </a>
          </p>
         </article>
        </tag-card>
      {{- end -}}
    {{- end -}}
  </tag-deck>
{{- end -}}

{{- define "footer" -}}
  {{- partial "pagination.html" . -}}
  {{- partial "footer.html" . -}}
{{- end -}}

{{- define "right" -}}
  {{- partial "navigator-right.html" . -}}
{{- end -}}