-
+ {{- range $taxonomy, $terms := $ctx.Site.Taxonomies -}}
+ {{ with $ctx.Site.GetPage $taxonomy }}
+
- + {{ .Title }} + {{ len $terms }} + + {{- end }} + {{ end }} +
diff --git a/themes/42/assets/css/keywords.css b/themes/42/assets/css/keywords.css index 4bb0520e..1a3b414e 100644 --- a/themes/42/assets/css/keywords.css +++ b/themes/42/assets/css/keywords.css @@ -9,4 +9,9 @@ ul.keywords { max-width: var(--width-content-max); width: 100%; font-size: 1rem; + + li { + display: block; + white-space: nowrap; + } } \ No newline at end of file diff --git a/themes/42/assets/css/variables/structure.css b/themes/42/assets/css/variables/structure.css index 98cb8bf9..28103459 100644 --- a/themes/42/assets/css/variables/structure.css +++ b/themes/42/assets/css/variables/structure.css @@ -8,6 +8,7 @@ --padding-hero-panel: var(--padding-panel); --footer-padding: var(--padding); --list-padding: var(--padding-double); + --padding-keyword: var(--padding-half); --gap: 1.5rem; --gap-half: 0.75rem; @@ -40,4 +41,4 @@ --grid-columns: 4; --width-card-min: 300px; -} +} \ No newline at end of file diff --git a/themes/42/layouts/_partials/breadcrumbs.html b/themes/42/layouts/_partials/breadcrumbs.html index 79901b47..c6edfc69 100644 --- a/themes/42/layouts/_partials/breadcrumbs.html +++ b/themes/42/layouts/_partials/breadcrumbs.html @@ -1,10 +1,20 @@ {{- $page := . -}} {{- with .Page }}{{ $page = . }}{{ end -}} +{{- $taxonomiesRoot := site.GetPage "section" "taxonomies" -}} {{- $trail := slice -}} {{- if $page }} + {{- $isTaxonomy := or (eq $page.Kind "taxonomy") (eq $page.Kind "term") -}} + {{- if and $isTaxonomy $taxonomiesRoot -}} + {{- if not (in $trail $taxonomiesRoot) -}} + {{- $trail = $trail | append $taxonomiesRoot -}} + {{- end -}} + {{- end -}} + {{- range $page.Ancestors.Reverse -}} {{- if ne .RelPermalink "/" -}} - {{- $trail = $trail | append . -}} + {{- if not (in $trail .) -}} + {{- $trail = $trail | append . -}} + {{- end -}} {{- end -}} {{- end -}} @@ -21,10 +31,12 @@ {{- $trail = $trail | append . -}} {{- end -}} {{- end -}} - {{- else if and (eq $page.Kind "taxonomy") (eq (len $trail) 0) }} - {{- with site.Home }} - {{- if ne .RelPermalink "/" -}} - {{- $trail = $trail | append . -}} + {{- else if eq $page.Kind "taxonomy" }} + {{- if and (eq (len $trail) 0) (not $taxonomiesRoot) }} + {{- with site.Home }} + {{- if ne .RelPermalink "/" -}} + {{- $trail = $trail | append . -}} + {{- end -}} {{- end -}} {{- end -}} {{- end }} diff --git a/themes/42/layouts/_partials/keywords.html b/themes/42/layouts/_partials/keywords.html index 46b01ec4..1249fa13 100644 --- a/themes/42/layouts/_partials/keywords.html +++ b/themes/42/layouts/_partials/keywords.html @@ -3,11 +3,19 @@