aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/_default/section.marks.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/layouts/_default/section.marks.html')
-rw-r--r--themes/default/layouts/_default/section.marks.html58
1 files changed, 58 insertions, 0 deletions
diff --git a/themes/default/layouts/_default/section.marks.html b/themes/default/layouts/_default/section.marks.html
new file mode 100644
index 0000000..def6c94
--- /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 -}}
+<style>
+ {{ partial "navigator.css.html" (dict "Link" "/") | safeCSS }}
+
+ tab-bar a[href^="{{ "" | absURL }}/{{ $author }}/marks"] {
+ color: #111;
+ color: var(--foreground);
+ font-weight: 700;
+ text-decoration-color: #014cc6;
+ text-decoration-color: var(--link);
+ text-decoration: underline;
+ border-bottom: 2px solid var(--background);
+ }
+</style>
+{{- 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 -}}
+ <footer>
+ <code>No items found!</code>
+ </footer>
+ {{- end -}}
+{{- end -}}
+
+{{- define "footer" -}}
+ {{- partial "pagination.html" . -}}
+ {{- partial "footer.html" . -}}
+{{- end -}}
+
+{{- define "right" -}}
+ {{- partial "navigator-right.html" . -}}
+{{- end -}}