Rétablit les asides d'article du thème 2026
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
{{- $ctx := . -}}
|
||||
{{- $scratch := newScratch -}}
|
||||
{{- $scratch.Set "blocks" 0 -}}
|
||||
{{- $taxonomyNames := slice -}}
|
||||
{{- range $taxonomy, $_ := $ctx.Site.Taxonomies -}}
|
||||
{{- $taxonomyNames = $taxonomyNames | append $taxonomy -}}
|
||||
{{- end -}}
|
||||
{{- range sort $taxonomyNames -}}
|
||||
{{- $taxonomy := . -}}
|
||||
{{- with $ctx.Page.GetTerms $taxonomy -}}
|
||||
{{- $scratch.Add "blocks" 1 -}}
|
||||
{{- end -}}
|
||||
@@ -13,26 +18,27 @@
|
||||
{{- end -}}
|
||||
|
||||
{{- if gt ($scratch.Get "blocks") 0 -}}
|
||||
<section>
|
||||
<details>
|
||||
<summary>Taxonomies</summary>
|
||||
{{- range $taxonomy, $_ := $ctx.Site.Taxonomies -}}
|
||||
<section class="article-aside-block article-taxonomies">
|
||||
<h2>Taxonomies</h2>
|
||||
<div class="article-taxonomies-groups">
|
||||
{{- range sort $taxonomyNames -}}
|
||||
{{- $taxonomy := . -}}
|
||||
{{- with $ctx.Page.GetTerms $taxonomy -}}
|
||||
<section>
|
||||
{{- $taxonomyPage := $ctx.Site.GetPage "taxonomy" $taxonomy -}}
|
||||
<h2>{{ with $taxonomyPage }}{{ .Title }}{{ else }}{{ humanize $taxonomy }}{{ end }}</h2>
|
||||
<details class="article-taxonomy-group">
|
||||
<summary class="ui-button">{{ with $taxonomyPage }}{{ .Title }}{{ else }}{{ humanize $taxonomy }}{{ end }}</summary>
|
||||
{{- partial "keywords.html" . -}}
|
||||
</section>
|
||||
</details>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- with $ctx.Params.keywords -}}
|
||||
{{- if gt (len .) 0 -}}
|
||||
<section>
|
||||
<h2>Mots-clés libres</h2>
|
||||
<details class="article-taxonomy-group">
|
||||
<summary class="ui-button">Mots-clés libres</summary>
|
||||
{{- partial "keywords.html" . -}}
|
||||
</section>
|
||||
</details>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</details>
|
||||
</div>
|
||||
</section>
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user