aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/_default/section.marks.html
blob: bc35c50a8040d70e22b567c57c112066d426d31e (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
57
58
{{- define "styles" -}}
{{- $author := partial "function-authors-data.html" . -}}
{{- $author = $author.user -}}
<style>
  {{ partial "navigator.css.html" (dict "Link" "/") | safeCSS }}

  tab-bar a[href*="{{ $author | relURL }}/marks"] {
    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" . -}}
  {{- $authors := where .Site.RegularPages "Section" $author.user -}}
  {{- $items := where .Site.RegularPages ".Params.marked" true -}}
  {{- $filteredPages := $authors | intersect $items -}}
  {{- $paginator := .Paginate $filteredPages -}}

  {{- partial "navigator-middle.html"
    (dict
      "Context"    .
      "IconLabel"  "Back"
      "Id"         "back"
      "Title"      "Marks"
      "Icon"       "arrow-left"
      "Subtitle"   (print (partial "count-marks.html" .) " " "Total")
      "Href"       (or (and (gt .Paginator.PageNumber 1) (.Paginator.Prev.URL | relURL)) ("" | relURL))
    )
  -}}

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