aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/_default/section.likes.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/layouts/_default/section.likes.html')
-rw-r--r--themes/default/layouts/_default/section.likes.html54
1 files changed, 54 insertions, 0 deletions
diff --git a/themes/default/layouts/_default/section.likes.html b/themes/default/layouts/_default/section.likes.html
new file mode 100644
index 0000000..ccd75fb
--- /dev/null
+++ b/themes/default/layouts/_default/section.likes.html
@@ -0,0 +1,54 @@
+{{ define "styles" }}
+{{ $author := partial "author-user.html" . }}
+<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" }}
+
+ {{ partial "navigator-middle.html"
+ (dict
+ "Title" "Likes"
+ "Subtitle" (partial "count-likes.html" .)
+ "Icon" "arrow-left"
+ "IconLabel" "Back"
+ "Href" "/"
+ "Id" "back"
+ "Context" .
+ )
+ }}
+
+ {{ partial "profile.html" . }}
+
+ {{- $author := partial "author-user.html" . -}}
+ {{- $users := where .Site.RegularPages "Section" $author -}}
+ {{- $likes := where .Site.RegularPages ".Params.liked" true -}}
+ {{- $filteredPages := $users | intersect $likes -}}
+ {{- $paginator := .Paginate $filteredPages }}
+
+ {{ 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 }}