aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2023-06-18 18:32:33 -0400
committertdro <tdro@noreply.example.com>2023-06-18 18:32:33 -0400
commitbc68ffb4294b80f9825d830b6c7fe857fe3589e5 (patch)
tree7fd82bf9d288d30294d950ee7618e4cbce38e2fb
parentfe545971fcd7db887c52f394f08ee2be0dd17894 (diff)
downloadcanory-bc68ffb4294b80f9825d830b6c7fe857fe3589e5.tar.gz
canory-bc68ffb4294b80f9825d830b6c7fe857fe3589e5.tar.bz2
canory-bc68ffb4294b80f9825d830b6c7fe857fe3589e5.zip
themes/default/layouts/_default/section.drafts: Track paginator
Media is not paginated
-rw-r--r--themes/default/layouts/_default/section.drafts.html22
-rw-r--r--themes/default/layouts/_default/section.media.html2
2 files changed, 11 insertions, 13 deletions
diff --git a/themes/default/layouts/_default/section.drafts.html b/themes/default/layouts/_default/section.drafts.html
index 468fd7e..d3dd2a4 100644
--- a/themes/default/layouts/_default/section.drafts.html
+++ b/themes/default/layouts/_default/section.drafts.html
@@ -17,26 +17,26 @@
{{- end -}}
{{- define "middle" -}}
+ {{- $author := partial "function-authors-data.html" . -}}
+ {{- $authors := where .Site.RegularPages "Section" $author.user -}}
+ {{- $drafts := where .Site.RegularPages "Draft" true -}}
+ {{- $filteredPages := $authors | intersect $drafts -}}
+ {{- $paginator := .Paginate $filteredPages -}}
+
{{- partial "navigator-middle.html"
(dict
- "Title" "Drafts"
- "Subtitle" (partial "count-drafts.html" .)
- "Icon" "arrow-left"
+ "Context" .
"IconLabel" "Back"
- "Href" "/"
"Id" "back"
- "Context" .
+ "Title" "Drafts"
+ "Icon" "arrow-left"
+ "Subtitle" (partial "count-drafts.html" .)
+ "Href" (or (and (gt $paginator.PageNumber 1) ($paginator.Prev.URL | absURL)) "/")
)
-}}
{{- partial "profile.html" . -}}
- {{- $author := partial "function-authors-data.html" . -}}
- {{- $authors := where .Site.RegularPages "Section" $author.user -}}
- {{- $drafts := where .Site.RegularPages "Draft" true -}}
- {{- $filteredPages := $authors | intersect $drafts -}}
- {{- $paginator := .Paginate $filteredPages -}}
-
{{- range $paginator.Pages -}}
{{- partial "render-embed.html" . -}}
{{- else -}}
diff --git a/themes/default/layouts/_default/section.media.html b/themes/default/layouts/_default/section.media.html
index 89e8262..9ed75df 100644
--- a/themes/default/layouts/_default/section.media.html
+++ b/themes/default/layouts/_default/section.media.html
@@ -56,8 +56,6 @@
<code>No media found!</code>
</footer>
{{- end -}}
-
- {{- partial "pagination.html" . -}}
{{- end -}}
{{- define "right" -}}