From 97aa739b3ffe8ff79ddcf0b5a13c840152ccc726 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 2 Aug 2024 15:47:33 -0700 Subject: [PATCH] Use singular or plural taxonomy names depending on how many items are in the taxonomy for the page --- assets/css/099_taxonomy_list.css | 6 +----- layouts/partials/page/footer.html | 4 ++-- layouts/partials/page/taxonomy_list.html | 17 ++++++++++++++--- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/assets/css/099_taxonomy_list.css b/assets/css/099_taxonomy_list.css index a3e6017..cccf330 100644 --- a/assets/css/099_taxonomy_list.css +++ b/assets/css/099_taxonomy_list.css @@ -1,7 +1,3 @@ -{{/* - 099_taxonomy_list.css - Eryn Wells -*/}} @@ -23,7 +19,7 @@ &::before { color: var(--text-color-secondary); - content: attr(data-term) " ="; + content: attr(data-name) " ="; text-transform: uppercase; } diff --git a/layouts/partials/page/footer.html b/layouts/partials/page/footer.html index 113299b..39f3af7 100644 --- a/layouts/partials/page/footer.html +++ b/layouts/partials/page/footer.html @@ -1,2 +1,2 @@ -{{ partial "page/taxonomy_list.html" (dict "page" . "term" "categories") }} -{{ partial "page/taxonomy_list.html" (dict "page" . "term" "tags") }} +{{ partial "page/taxonomy_list.html" (dict "page" . "taxonomy" "categories") }} +{{ partial "page/taxonomy_list.html" (dict "page" . "taxonomy" "tags") }} diff --git a/layouts/partials/page/taxonomy_list.html b/layouts/partials/page/taxonomy_list.html index 7661c38..0fac27a 100644 --- a/layouts/partials/page/taxonomy_list.html +++ b/layouts/partials/page/taxonomy_list.html @@ -1,6 +1,17 @@ -{{- $terms := .page.GetTerms .term -}} -{{ with $terms }} -