aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/_default/home.archive-tags.html
blob: 7fec9254459c716bd4b3b133f9ff700236be5f90 (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
{{ define "title" }}Tags Archive  — {{ end }}
{{ define "description" }}This page contains an archive of all tags — {{ end }}
{{ define "styles" }}
<style>
  {{ partial "styles-navigator.html" (dict "Link" "/archives/tags/") | safeCSS }}
</style>
{{ end }}

{{ define "middle" }}

{{ partial "navigator-middle.html"
  (dict
    "Title"     "Records"
    "Subtitle"  (partial "count-tags.html" .)
    "Icon"      "arrow-left"
    "IconLabel" "Back"
    "Href"      "/"
    "Id"        "back"
    "Context"   .
  )
}}

{{- $page  := 1 -}}
{{- $count := 0 -}}

<item-list>
  {{ range $taxonomy := .Site.Taxonomies }}
    {{ range $tag, $article := $taxonomy }}
      <h1><a href="{{ $.Site.BaseURL }}/tags/{{ $tag }}/">#{{ $tag }}</a></h1>
      <ul>
        {{ range $article.Pages -}}
        {{- $count = add $count 1 -}}
          <li>
            <a
              title="{{ partial "title.html" . }}"
              href="{{ .Site.BaseURL }}/tags/{{ $tag }}/{{ if gt $page 1 }}page/{{ $page }}/{{ end }}#{{ partial "card-id.html" . }}">
              <span><code>{{ .Date.Format "02 Jan 2006" }}</code></span>
              <span>{{ partial "title.html" . }}</span>
              <span>@{{ partial "author-user.html" . }}</span>
            </a>
          </li>
        {{ if eq (mod $count $.Paginator.PageSize) 0 }}
          {{ $page = add $page 1 }}
        {{- end -}}
        {{- end -}}
       {{- $page  = 1 -}}
       {{- $count = 0 -}}
      </ul>
    {{ end }}
  {{ end }}
</item-list>
{{ end }}

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