|
2 | 2 | {{- $parentId := .id -}} |
3 | 3 | {{- $infoRef := .infoRef -}} |
4 | 4 | {{- $infoText := .infoText -}} |
| 5 | +{{- $useLowerCase := .useLowerCase }} |
5 | 6 | {{- with .ctx -}} |
6 | 7 |
|
7 | | - {{- $currentPage := . -}} |
| 8 | +{{- $currentPage := . -}} |
8 | 9 |
|
9 | | - <li class="mb-2"> |
10 | | - {{- $active := eq .Section $category -}} |
11 | | - <button |
12 | | - aria-controls="{{ $parentId }}-{{ $category }}-menu" |
13 | | - aria-expanded="true" |
14 | | - class="btn btn-toggle align-items-center rounded" |
15 | | - data-bs-target="#{{ $parentId }}-{{ $category }}-menu" |
16 | | - data-bs-toggle="collapse" |
17 | | - > |
18 | | - <div class="d-flex align-items-center gap-2"> |
19 | | - {{ humanize $category }} |
20 | | - {{- if (and $infoRef $infoText) }} |
21 | | - <a |
22 | | - id="{{ $parentId }}-{{ $category }}-info-link" |
23 | | - aria-label="Info" |
24 | | - href="{{ ref . $infoRef }}" |
25 | | - data-bs-toggle="tooltip" |
26 | | - data-bs-placement="top" |
27 | | - title="{{ $infoText }}" |
28 | | - class="d-flex" |
29 | | - > |
30 | | - <svg |
31 | | - height="14" |
32 | | - width="14" |
33 | | - fill="currentColor" |
34 | | - aria-hidden="true" |
35 | | - > |
36 | | - {{ partial "use-icon.html" "info-circle" }} |
37 | | - </svg> |
38 | | - </a> |
39 | | - {{ end -}} |
40 | | - </div> |
41 | | - </button> |
42 | | - <div class="collapse show pe-lg-4" id="{{ $parentId }}-{{ $category }}-menu"> |
43 | | - <ul class="btn-toggle-nav list-unstyled"> |
44 | | - {{ range (index .Site.Taxonomies $category) }} |
45 | | - {{ $active := eq .Page.Title $currentPage.Title -}} |
46 | | - <li> |
47 | | - <a class="category-link d-flex {{ if $active }}active{{ end }}" href="{{ .Page.Permalink }}" |
48 | | - ><span>{{ .Page.Title | title }}</span |
49 | | - ><span class="badge bg-light text-dark fw-normal ms-auto my-auto" |
50 | | - >{{ .Count }}</span |
51 | | - ></a |
52 | | - > |
53 | | - </li> |
54 | | - {{ end }} |
55 | | - </ul> |
| 10 | +<li class="mb-2"> |
| 11 | + {{- $active := eq .Section $category -}} |
| 12 | + <button aria-controls="{{ $parentId }}-{{ $category }}-menu" aria-expanded="true" |
| 13 | + class="btn btn-toggle align-items-center rounded" data-bs-target="#{{ $parentId }}-{{ $category }}-menu" |
| 14 | + data-bs-toggle="collapse"> |
| 15 | + <div class="d-flex align-items-center gap-2"> |
| 16 | + {{ humanize $category }} |
| 17 | + {{- if (and $infoRef $infoText) }} |
| 18 | + <a id="{{ $parentId }}-{{ $category }}-info-link" aria-label="Info" href="{{ ref . $infoRef }}" |
| 19 | + data-bs-toggle="tooltip" data-bs-placement="top" title="{{ $infoText }}" class="d-flex"> |
| 20 | + <svg height="14" width="14" fill="currentColor" aria-hidden="true"> |
| 21 | + {{ partial "use-icon.html" "info-circle" }} |
| 22 | + </svg> |
| 23 | + </a> |
| 24 | + {{ end -}} |
56 | 25 | </div> |
57 | | - </li> |
| 26 | + </button> |
| 27 | + <div class="collapse show pe-lg-4" id="{{ $parentId }}-{{ $category }}-menu"> |
| 28 | + <ul class="btn-toggle-nav list-unstyled"> |
| 29 | + {{ range (index .Site.Taxonomies $category) }} |
| 30 | + {{ $active := eq .Page.Title $currentPage.Title -}} |
| 31 | + <li> |
| 32 | + <a class="category-link d-flex {{ if $active }}active{{ end }}" href="{{ .Page.Permalink }}"> |
| 33 | + <span>{{ if $useLowerCase }}{{ .Page.Title | lower }}{{ else }}{{ .Page.Title }}{{ end }}</span> |
| 34 | + <span class="badge bg-light text-dark fw-normal ms-auto my-auto">{{ .Count }}</span> |
| 35 | + </a> |
| 36 | + </li> |
| 37 | + {{ end }} |
| 38 | + </ul> |
| 39 | + </div> |
| 40 | +</li> |
58 | 41 | {{- end }} |
0 commit comments