blob: f8048d09aa86a000a9da9d5d39c1e7d38da1619b (
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
|
{{ define "styles" }}
<style>
{{ partial "styles-navigator.html" (dict "Link" "/tags/") | safeCSS }}
</style>
{{ end }}
{{ define "middle" }}
{{ $title := .Title }}
{{ if eq .Title "Tags" }}
{{- partial "navigator-middle.html"
(dict
"Title" "Tags"
"Subtitle" (partial "count-tags.html" .)
"Icon" "arrow-left"
"IconLabel" "Back"
"Href" "/"
"Id" "back"
"Context" .
)
-}}
{{- $page := 1 -}}
{{- $count := 0 -}}
{{ range .Paginator.Pages }}
{{ $title := lower .Title }}
<item-list>
<h1>
<a href="{{ .Site.BaseURL }}/tags/{{ $title }}">#{{ .Title }}</a>
</h1>
<ul>
{{ range first 3 .Pages }}
{{- $count = add $count 1 -}}
<li>
<a
title="{{ partial "meta-title.html" . }}"
href="{{ .Site.BaseURL }}/tags/{{ $title }}/{{ if gt $page 1 }}page/{{ $page }}/{{ end }}#{{ partial "card-id.html" . }}"
>
<span>
<code>{{ .Date.Format "02 Jan 2006" }}</code>
</span>
<span>{{ partial "meta-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>
</item-list>
{{ end }}
{{ partial "pagination.html" . }}
{{ end }}
{{ end }}
{{ define "right" }}
{{- partial "navigator-right.html" . -}}
{{ end }}
|