aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/_default/section.html
blob: 901ca1f077ec840bad23331b2c1ac27d36b0d067 (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
46
47
48
49
50
51
52
53
54
55
56
{{- define "styles" -}}
<style>
  {{ partial "navigator.css.html" (dict "Link" "/") | safeCSS }}

  tab-bar a[href="{{ .CurrentSection.Permalink }}"],
  tab-bar a[href^="{{ .CurrentSection.Permalink }}#"],
  tab-bar a[href="{{ strings.TrimRight "/" .CurrentSection.Permalink }}"] {
    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" . -}}

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

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