From 0f68eb4b2dbe670d3999177b401bf41a0a06424c Mon Sep 17 00:00:00 2001 From: Richard Dern Date: Wed, 5 Nov 2025 11:29:45 +0100 Subject: [PATCH] =?UTF-8?q?Partial=20pour=20les=20listes=20de=20mots-cl?= =?UTF-8?q?=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../42/layouts/_partials/asides/keywords.html | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 themes/42/layouts/_partials/asides/keywords.html diff --git a/themes/42/layouts/_partials/asides/keywords.html b/themes/42/layouts/_partials/asides/keywords.html new file mode 100644 index 00000000..19ba7387 --- /dev/null +++ b/themes/42/layouts/_partials/asides/keywords.html @@ -0,0 +1,37 @@ +{{- $ctx := . -}} +{{- $scratch := newScratch -}} +{{- $scratch.Set "blocks" 0 -}} +{{- range $taxonomy, $_ := $ctx.Site.Taxonomies -}} + {{- with $ctx.Page.GetTerms $taxonomy -}} + {{- $scratch.Add "blocks" 1 -}} + {{- end -}} +{{- end -}} +{{- with $ctx.Params.keywords -}} + {{- if gt (len .) 0 -}} + {{- $scratch.Add "blocks" 1 -}} + {{- end -}} +{{- end -}} +{{- if gt ($scratch.Get "blocks") 0 }} + +{{- end }}