Skip to content

Commit 032789a

Browse files
committed
Use lower case for names of identities on site
1 parent 15aed92 commit 032789a

File tree

3 files changed

+45
-53
lines changed

3 files changed

+45
-53
lines changed

site/layouts/identities/list.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
</div>
88
<div class="docs-content col-lg-11 mx-xl-auto">
99
<div class="artifact-list-title">
10-
<h1 class="text-center">{{ .Title | title }}</h1>
11-
<p class="lead text-center">Artifacts involving {{ .Title }} people</p>
10+
<h1 class="text-center">{{ .Title | lower }}</h1>
11+
<p class="lead text-center">Artifacts involving {{ .Title | lower }} people</p>
1212
{{ $metadata := resources.Get "metadata.json" | transform.Unmarshal }}
1313
{{ $allTags := index $metadata "tags" }}
1414
{{ $tagsOfKind := where $allTags "kind" "identity" }}

site/layouts/partials/archive/category-menu.html

Lines changed: 32 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,57 +2,40 @@
22
{{- $parentId := .id -}}
33
{{- $infoRef := .infoRef -}}
44
{{- $infoText := .infoText -}}
5+
{{- $useLowerCase := .useLowerCase }}
56
{{- with .ctx -}}
67

7-
{{- $currentPage := . -}}
8+
{{- $currentPage := . -}}
89

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 -}}
5625
</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>
5841
{{- end }}

site/layouts/partials/archive/sidebar.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,21 @@
55
{{- $currentPage := . -}}
66

77
<ul class="list-unstyled collapsible-sidebar">
8-
{{ partial "archive/category-menu.html" (dict "ctx" . "id" $parentId "category" "collections") }}
9-
{{ partial "archive/category-menu.html" (dict "ctx" . "id" $parentId "category" "decades") }}
8+
{{ partial "archive/category-menu.html" (dict
9+
"ctx" .
10+
"id" $parentId
11+
"category" "collections"
12+
) }}
13+
{{ partial "archive/category-menu.html" (dict
14+
"ctx" .
15+
"id" $parentId
16+
"category" "decades"
17+
) }}
1018
{{ partial "archive/category-menu.html" (dict
1119
"ctx" .
1220
"id" $parentId
1321
"category" "identities"
22+
"useLowerCase" true
1423
"infoRef" "docs/contributing/best-practices#labels"
1524
"infoText" "Some of these terms are outdated. Why?"
1625
) }}

0 commit comments

Comments
 (0)