From 649e9b6490e3cc3d67fd2f657c655f2f0da0982a Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 22 Nov 2025 16:12:02 +0100 Subject: [PATCH] WIP:refactor: display terms as term/number-buttons --- .../thymeleaf/layouts/_partials/terms.html | 44 ++++++++++--------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/hugo/themes/thymeleaf/layouts/_partials/terms.html b/hugo/themes/thymeleaf/layouts/_partials/terms.html index 8a6ebec2..6fd26540 100644 --- a/hugo/themes/thymeleaf/layouts/_partials/terms.html +++ b/hugo/themes/thymeleaf/layouts/_partials/terms.html @@ -1,23 +1,27 @@ -{{- /* -For a given taxonomy, renders a list of terms assigned to the page. +{{- define "main" }} -@context {page} page The current page. -@context {string} taxonomy The taxonomy. - -@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} -*/}} +{{- if .Title }} + +{{- end }} -{{- $page := .page }} -{{- $taxonomy := .taxonomy }} + -{{- with $page.GetTerms $taxonomy }} - {{- $label := (index . 0).Parent.LinkTitle }} -
-
{{ $label }}:
- -
-{{- end }} +{{- end }}{{/* end main */ -}} -- 2.39.5