aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/_default/section.drafts.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/layouts/_default/section.drafts.html')
-rw-r--r--themes/default/layouts/_default/section.drafts.html64
1 files changed, 33 insertions, 31 deletions
diff --git a/themes/default/layouts/_default/section.drafts.html b/themes/default/layouts/_default/section.drafts.html
index ad862c4..bb7485c 100644
--- a/themes/default/layouts/_default/section.drafts.html
+++ b/themes/default/layouts/_default/section.drafts.html
@@ -1,56 +1,58 @@
-{{ define "styles" }}
+{{- define "styles" -}}
{{- $author := partial "function-authors-data.html" . -}}
{{- $author = $author.user -}}
<style>
- {{ partial "styles-navigator.html" (dict "Link" "/") | safeCSS }}
+ {{ partial "navigator.css.html" (dict "Link" "/") | safeCSS }}
- tab-bar a[href="{{ .Site.BaseURL }}/{{ $author }}/drafts/"] {
+ tab-bar a[href^="{{ "" | absURL }}/{{ $author }}/drafts"] {
color: #111;
color: var(--foreground);
- display: inherit;
font-weight: 700;
text-decoration-color: #014cc6;
text-decoration-color: var(--link);
text-decoration: underline;
+ border-bottom: 2px solid var(--background);
}
</style>
-{{ end }}
+{{- end -}}
-{{ define "middle" }}
+{{- define "header" -}}
+ {{- $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"
+ {{- 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" (print (partial "count-drafts.html" .) " " "Total")
+ "Href" (or (and (gt $paginator.PageNumber 1) ($paginator.Paginator.Prev.URL | absURL)) "/")
)
- }}
-
- {{ partial "profile.html" . }}
+ -}}
- {{- $author := partial "function-authors-data.html" . -}}
- {{- $author = $author.user -}}
- {{- $users := where .Site.RegularPages "Section" $author -}}
- {{- $drafts := where .Site.RegularPages "Draft" true -}}
- {{- $filteredPages := $users | intersect $drafts -}}
- {{- $paginator := .Paginate $filteredPages }}
+ {{- partial "profile.html" . -}}
+{{- end -}}
- {{ range $paginator.Pages }}
- {{ .Render "summary" }}
- {{ else }}
+{{- define "middle" -}}
+ {{- range .Paginator.Pages -}}
+ {{- partial "render-embed.html" . -}}
+ {{- else -}}
<footer>
- <code>No drafts found!</code>
+ <code>No items found!</code>
</footer>
- {{ end }}
-
- {{ partial "pagination.html" . }}
+ {{- end -}}
+{{- end -}}
-{{ end }}
+{{- define "footer" -}}
+ {{- partial "pagination.html" . -}}
+ {{- partial "footer.html" . -}}
+{{- end -}}
-{{ define "right" }}
+{{- define "right" -}}
{{- partial "navigator-right.html" . -}}
-{{ end }}
+{{- end -}}