aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/_default/section.html
blob: b653a879bcb094c2e5986b68f7228cc3da83015f (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
39
40
41
42
43
44
45
{{- define "styles" -}}
  <style>
    {{ partial "navigator.css.html" (dict "Link" "/")                  | safeCSS }}
    {{ partial "tabbar.css.html"    (dict "Context" . "Hash" "#posts") | safeCSS }}
  </style>
{{- end -}}

{{- define "header" -}}
  {{- $author := partial "function-authors-data.html" . -}}

  {{- partial "navigator-middle.html"
    (dict
      "Context"    .
      "IconLabel"  "Back"
      "Id"         "back"
      "Title"      $author.name
      "Icon"       "arrow-left"
      "Subtitle"   (print (lang.FormatNumberCustom 0 .Paginator.TotalNumberOfElements) " " "Total")
      "Href"       (or (and (gt .Paginator.PageNumber 1) (.Paginator.Prev.URL | relURL)) ("" | relURL))
    )
  -}}

  {{- partial "author-section-picture.html" . -}}

  {{- 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 -}}