blob: 4d5e1724655c4d678f0fcd0daa23e1ecdcafe1eb (
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
{{- define "styles" -}}
<style>
{{ partial "styles-navigator.html" (dict "Link" "/") | safeCSS }}
</style>
{{- end -}}
{{- define "middle" -}}
{{- partial "navigator-middle.html"
(dict
"Title" "Message"
"Subtitle" "Thread"
"Icon" "arrow-left"
"IconLabel" "Back"
"Href" "/"
"Id" "back"
"Context" .
)
-}}
<micro-thread>
{{ .Render "summary" }}
{{- $nextHref := "" -}}
{{- $prevHref := "" -}}
{{- $nextTitle := "" -}}
{{- $prevTitle := "" -}}
{{- $nextInvisible := "data-invisible" -}}
{{- $prevInvisible := "data-invisible" -}}
{{- with .Next -}}
{{- $nextHref = $.Next.Permalink -}}
{{- $nextTitle = $.Next.Summary -}}
{{- $nextInvisible = "" -}}
{{- end -}}
{{- with .Prev -}}
{{- $prevHref = $.Prev.Permalink -}}
{{- $prevTitle = $.Prev.Summary -}}
{{- $prevInvisible = "" -}}
{{- end -}}
{{- with or .Next .Prev -}}
<paginator-navigation>
<a {{ $nextInvisible | safeHTMLAttr }} href="{{ $nextHref }}" title="{{ $nextTitle }}">
{{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/arrow-left.svg")) }}
Newer
</a>
<a {{ $prevInvisible | safeHTMLAttr }} href="{{ $prevHref }}" title="{{ $prevTitle }}">
Older
{{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/arrow-right.svg")) }}
</a>
</paginator-navigation>
{{- end -}}
{{- $filteredPages := partial "function-filters-content.html" (.Site.RegularPages.Related .) -}}
{{- $related := $filteredPages | first 3 -}}
{{- with $related -}}
<related-content>
<footer>
<samp>
Related Tags
{{- with $.Params.tags -}}
{{- range $tag := first 1 $.Params.tags -}}
{{- $link := print ("tags/" | relURL) ($tag | urlize) "/" }}
{{ print "---" " " "[#" $tag "](" $link ")" | markdownify -}}
{{- end -}}
{{- end -}}
</samp>
</footer>
</related-content>
{{- range $related -}}
{{- .Render "summary" -}}
{{- end -}}
{{- end -}}
</micro-thread>
{{- end -}}
{{- define "right" -}}
{{- partial "navigator-right.html" . -}}
{{- end -}}
|