From 088ff760327f0e7f3d1e4d734442cb1a6b151f64 Mon Sep 17 00:00:00 2001 From: tdro Date: Sat, 30 Dec 2023 16:39:52 -0500 Subject: config: Likes -> Marked --- themes/default/layouts/_default/section.likes.html | 58 ---------------------- themes/default/layouts/_default/section.marks.html | 58 ++++++++++++++++++++++ 2 files changed, 58 insertions(+), 58 deletions(-) delete mode 100644 themes/default/layouts/_default/section.likes.html create mode 100644 themes/default/layouts/_default/section.marks.html (limited to 'themes/default/layouts/_default') diff --git a/themes/default/layouts/_default/section.likes.html b/themes/default/layouts/_default/section.likes.html deleted file mode 100644 index 5626344..0000000 --- a/themes/default/layouts/_default/section.likes.html +++ /dev/null @@ -1,58 +0,0 @@ -{{- define "styles" -}} -{{- $author := partial "function-authors-data.html" . -}} -{{- $author = $author.user -}} - -{{- end -}} - -{{- define "header" -}} - {{- $author := partial "function-authors-data.html" . -}} - {{- $authors := where .Site.RegularPages "Section" $author.user -}} - {{- $likes := where .Site.RegularPages ".Params.liked" true -}} - {{- $filteredPages := $authors | intersect $likes -}} - {{- $paginator := .Paginate $filteredPages -}} - - {{- partial "navigator-middle.html" - (dict - "Context" . - "IconLabel" "Back" - "Id" "back" - "Title" "Likes" - "Icon" "arrow-left" - "Subtitle" (print (partial "count-likes.html" .) " " "Total") - "Href" (or (and (gt $paginator.PageNumber 1) ($paginator.Prev.URL | absURL)) "/") - ) - -}} - - {{- partial "profile.html" . -}} -{{- end -}} - -{{- define "middle" -}} - {{- range .Paginator.Pages -}} - {{- partial "render-embed.html" . -}} - {{- else -}} - - {{- end -}} -{{- end -}} - -{{- define "footer" -}} - {{- partial "pagination.html" . -}} - {{- partial "base-footer.html" . -}} -{{- end -}} - -{{- define "right" -}} - {{- partial "navigator-right.html" . -}} -{{- end -}} diff --git a/themes/default/layouts/_default/section.marks.html b/themes/default/layouts/_default/section.marks.html new file mode 100644 index 0000000..5b6cea0 --- /dev/null +++ b/themes/default/layouts/_default/section.marks.html @@ -0,0 +1,58 @@ +{{- define "styles" -}} +{{- $author := partial "function-authors-data.html" . -}} +{{- $author = $author.user -}} + +{{- end -}} + +{{- define "header" -}} + {{- $author := partial "function-authors-data.html" . -}} + {{- $authors := where .Site.RegularPages "Section" $author.user -}} + {{- $items := where .Site.RegularPages ".Params.marked" true -}} + {{- $filteredPages := $authors | intersect $items -}} + {{- $paginator := .Paginate $filteredPages -}} + + {{- partial "navigator-middle.html" + (dict + "Context" . + "IconLabel" "Back" + "Id" "back" + "Title" "Marks" + "Icon" "arrow-left" + "Subtitle" (print (partial "count-marks.html" .) " " "Total") + "Href" (or (and (gt $paginator.PageNumber 1) ($paginator.Prev.URL | absURL)) "/") + ) + -}} + + {{- partial "profile.html" . -}} +{{- end -}} + +{{- define "middle" -}} + {{- range .Paginator.Pages -}} + {{- partial "render-embed.html" . -}} + {{- else -}} + + {{- end -}} +{{- end -}} + +{{- define "footer" -}} + {{- partial "pagination.html" . -}} + {{- partial "base-footer.html" . -}} +{{- end -}} + +{{- define "right" -}} + {{- partial "navigator-right.html" . -}} +{{- end -}} -- cgit v1.2.3