Nouveau thème pour 2026
This commit is contained in:
7
themes/2026/layouts/_partials/asides/comments.html
Normal file
7
themes/2026/layouts/_partials/asides/comments.html
Normal 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 -}}
|
||||
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 -}}
|
||||
10
themes/2026/layouts/_partials/asides/oeuvres.html
Normal file
10
themes/2026/layouts/_partials/asides/oeuvres.html
Normal 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 -}}
|
||||
30
themes/2026/layouts/_partials/asides/toc.html
Normal file
30
themes/2026/layouts/_partials/asides/toc.html
Normal 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 -}}
|
||||
Reference in New Issue
Block a user