blob: 201c0a5f6d391e5cb76b7672f5df54a7c8f0092b (
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
|
{{- define "styles" -}}
{{- $author := partial "function-authors-data.html" . -}}
{{- $author = $author.user -}}
<style>
{{ partial "styles-navigator.html" (dict "Link" "/") | safeCSS }}
tab-bar a[href="{{ .Site.BaseURL }}/{{ $author }}/likes/"] {
color: #111;
color: var(--foreground);
display: inherit;
font-weight: 700;
text-decoration-color: #014cc6;
text-decoration-color: var(--link);
text-decoration: underline;
}
</style>
{{- end -}}
{{- define "middle" -}}
{{- $author := partial "function-authors-data.html" . -}}
{{- $author = $author.user -}}
{{- $users := where .Site.RegularPages "Section" $author -}}
{{- $likes := where .Site.RegularPages ".Params.liked" true -}}
{{- $filteredPages := $users | intersect $likes -}}
{{- $paginator := .Paginate $filteredPages -}}
{{- partial "navigator-middle.html"
(dict
"Context" .
"IconLabel" "Back"
"Id" "back"
"Title" "Likes"
"Icon" "arrow-left"
"Subtitle" (partial "count-likes.html" .)
"Href" (or (and (gt $paginator.PageNumber 1) ($paginator.Prev.URL | absURL)) "/")
)
-}}
{{- partial "profile.html" . -}}
{{- range $paginator.Pages -}}
{{- .Render "summary" -}}
{{- else -}}
<footer>
<code>No likes found!</code>
</footer>
{{- end -}}
{{- partial "pagination.html" . -}}
{{- end -}}
{{- define "right" -}}
{{- partial "navigator-right.html" . -}}
{{- end -}}
|