1

Nouveau thème pour 2026

This commit is contained in:
2026-02-21 01:50:39 +01:00
parent 27dd5f86e6
commit a7f539ceb4
67 changed files with 6137 additions and 21 deletions

View File

@@ -0,0 +1,7 @@
{{- $url := .Params.comments_url -}}
{{- if $url -}}
<section>
<h2>Échanger autour de ce texte</h2>
<p>Si vous souhaitez réagir publiquement, <a href="{{ $url }}" target="_blank" rel="noopener">un fil dédié vous attend ici</a>.</p>
</section>
{{- end -}}

View 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 -}}

View File

@@ -0,0 +1,10 @@
{{- $page := . -}}
{{- with $page.Params.oeuvres -}}
{{- range . -}}
{{- if eq . "L'Anankéisme" -}}
{{- partial "oeuvres/l-anankeisme.html" $page -}}
{{- else if eq . "L'Humain, cette espèce primitive" -}}
{{- partial "oeuvres/l-humain-cette-espece-primitive.html" $page -}}
{{- end -}}
{{- end -}}
{{- end -}}

View File

@@ -0,0 +1,30 @@
{{- $toc := .TableOfContents -}}
{{- $hasTOC := gt (len (findRE "<li>" $toc)) 0 -}}
{{- $dossierSummary := partial "dossier-summary.html" (dict "Page" .) -}}
{{- $hasDossierSummary := ne (strings.TrimSpace $dossierSummary) "" -}}
{{- if or $hasDossierSummary $hasTOC -}}
{{- $tocMarkup := "" -}}
{{- if $hasTOC -}}
{{- $tocMarkup = replace $toc `<nav id="TableOfContents">` `<div class="article-toc-list">` -}}
{{- $tocMarkup = replace $tocMarkup `</nav>` `</div>` -}}
{{- end -}}
<aside class="article-toc">
{{- if $hasDossierSummary -}}
<details class="article-toc-drawer article-toc-drawer-dossier">
<summary class="ui-button ui-button--vertical"><span>Dossier</span></summary>
<div class="article-toc-drawer-panel">
{{- $dossierSummary | safeHTML -}}
</div>
</details>
{{- end -}}
{{- if $hasTOC -}}
<details class="article-toc-drawer article-toc-drawer-outline">
<summary class="ui-button ui-button--vertical"><span>Sommaire</span></summary>
<div class="article-toc-drawer-panel">
<h2>Sommaire</h2>
{{- $tocMarkup | safeHTML -}}
</div>
</details>
{{- end -}}
</aside>
{{- end -}}