Nouveau thème pour 2026
This commit is contained in:
38
themes/2026/layouts/_partials/asides/keywords.html
Normal file
38
themes/2026/layouts/_partials/asides/keywords.html
Normal file
@@ -0,0 +1,38 @@
|
||||
{{- $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 -}}
|
||||
<section>
|
||||
<details>
|
||||
<summary>Taxonomies</summary>
|
||||
{{- range $taxonomy, $_ := $ctx.Site.Taxonomies -}}
|
||||
{{- with $ctx.Page.GetTerms $taxonomy -}}
|
||||
<section>
|
||||
{{- $taxonomyPage := $ctx.Site.GetPage "taxonomy" $taxonomy -}}
|
||||
<h2>{{ with $taxonomyPage }}{{ .Title }}{{ else }}{{ humanize $taxonomy }}{{ end }}</h2>
|
||||
{{- partial "keywords.html" . -}}
|
||||
</section>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- with $ctx.Params.keywords -}}
|
||||
{{- if gt (len .) 0 -}}
|
||||
<section>
|
||||
<h2>Mots-clés libres</h2>
|
||||
{{- partial "keywords.html" . -}}
|
||||
</section>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</details>
|
||||
</section>
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user