blob: 4ba63dc02b9ed4f678c4135a8121ae502d63a935 (
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
|
{{ 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 }}
|