aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/_default/home.authors.html
blob: db6756664e64103c8208527a9f6f277825ea31d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{{ define "title" }}Authors — {{ end }}
{{ define "description" }}This page contains a list of all authors — {{ end }}
{{ define "styles" }}
<style>
  {{ partial "styles-navigator.html" (dict "Link" "/authors/") | safeCSS }}
</style>
{{ end }}

{{ define "middle" }}

  {{ partial "navigator-middle.html"
    (dict
      "Title"      "Authors"
      "Subtitle"   (partial "count-authors.html" .)
      "Icon"       "arrow-left"
      "IconLabel"  "Back"
      "Href"       "/"
      "Id"         "back"
      "Context"    .
    )
  }}

  {{ $authors := slice }}

  {{- range $index, $data := .Site.Data -}}
    {{- $authors = $authors | append $data.user -}}
  {{- end -}}

  {{- range $author := (shuffle (uniq $authors)) -}}
    {{ $data := index $.Site.Data $author | default "default" }}
    {{ partial "author-card.html" (dict "Data" $data) }}
  {{ end }}

{{ end }}

{{ define "right" }}
  {{- partial "navigator-right-default.html" . -}}
{{ end }}