aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/_default/home.authors.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/layouts/_default/home.authors.html')
-rw-r--r--themes/default/layouts/_default/home.authors.html49
1 files changed, 26 insertions, 23 deletions
diff --git a/themes/default/layouts/_default/home.authors.html b/themes/default/layouts/_default/home.authors.html
index db67566..0662285 100644
--- a/themes/default/layouts/_default/home.authors.html
+++ b/themes/default/layouts/_default/home.authors.html
@@ -1,38 +1,41 @@
-{{ define "title" }}Authors — {{ end }}
-{{ define "description" }}This page contains a list of all authors — {{ end }}
-{{ define "styles" }}
+{{- define "title" -}}Authors — {{ end -}}
+{{- define "description" -}}A list of all authors — {{ end -}}
+{{- define "styles" -}}
<style>
- {{ partial "styles-navigator.html" (dict "Link" "/authors/") | safeCSS }}
+ {{ partial "navigator.css.html" (dict "Link" "/authors/") | safeCSS }}
</style>
-{{ end }}
+{{- end -}}
-{{ define "middle" }}
-
- {{ partial "navigator-middle.html"
+{{- define "header" -}}
+ {{- partial "navigator-middle.html"
(dict
"Title" "Authors"
- "Subtitle" (partial "count-authors.html" .)
+ "Subtitle" (print (partial "count-authors.html" .) " " "Total")
"Icon" "arrow-left"
"IconLabel" "Back"
"Href" "/"
"Id" "back"
"Context" .
)
- }}
-
- {{ $authors := slice }}
+ -}}
+{{- end -}}
- {{- range $index, $data := .Site.Data -}}
- {{- $authors = $authors | append $data.user -}}
- {{- end -}}
+{{- define "middle" -}}
+ {{- partial "generate-authors" . -}}
- {{- range $author := (shuffle (uniq $authors)) -}}
- {{ $data := index $.Site.Data $author | default "default" }}
- {{ partial "author-card.html" (dict "Data" $data) }}
- {{ end }}
+ {{- $authors := partial "function-authors-slice.html" . -}}
-{{ end }}
+ {{- range $author := $authors -}}
+ {{- $data := index $.Site.Data.authors $author -}}
+ {{- $date := (index (first 1 (where $.Site.Pages.ByDate.Reverse "Section" $author)) 0).Date -}}
+ {{- partial "author-card.html" (dict
+ "Data" $data
+ "Date" $date
+ )
+ -}}
+ {{- end -}}
+{{- end -}}
-{{ define "right" }}
- {{- partial "navigator-right-default.html" . -}}
-{{ end }}
+{{- define "right" -}}
+ {{- partial "navigator-right.html" . -}}
+{{- end -}}