Nouveau thème pour 2026
This commit is contained in:
38
themes/2026/layouts/_partials/articles-list.html
Normal file
38
themes/2026/layouts/_partials/articles-list.html
Normal file
@@ -0,0 +1,38 @@
|
||||
{{- $pages := slice -}}
|
||||
{{- $showDossierBeforeTitle := false -}}
|
||||
{{- $showInterestingLinksMeta := false -}}
|
||||
{{- $externalLinksReport := dict -}}
|
||||
{{- if reflect.IsMap . -}}
|
||||
{{- with .Pages -}}
|
||||
{{- $pages = . -}}
|
||||
{{- end -}}
|
||||
{{- if isset . "ShowDossierBeforeTitle" -}}
|
||||
{{- $showDossierBeforeTitle = index . "ShowDossierBeforeTitle" -}}
|
||||
{{- end -}}
|
||||
{{- if isset . "ShowInterestingLinksMeta" -}}
|
||||
{{- $showInterestingLinksMeta = index . "ShowInterestingLinksMeta" -}}
|
||||
{{- end -}}
|
||||
{{- if isset . "ExternalLinksReport" -}}
|
||||
{{- $externalLinksReport = index . "ExternalLinksReport" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if gt (len $pages) 0 -}}
|
||||
<nav class="articles-list" aria-label="Liste d articles">
|
||||
<ol>
|
||||
{{- range $index, $page := $pages -}}
|
||||
{{- $thumbnailSize := "small" -}}
|
||||
{{- $positionInBlock := mod (add $index 1) 10 -}}
|
||||
{{- if or (eq $positionInBlock 5) (eq $positionInBlock 6) -}}
|
||||
{{- $thumbnailSize = "large" -}}
|
||||
{{- end -}}
|
||||
<li>{{ partial "card.html" (dict
|
||||
"Page" $page
|
||||
"ShowDossierBeforeTitle" $showDossierBeforeTitle
|
||||
"ShowInterestingLinksMeta" $showInterestingLinksMeta
|
||||
"ExternalLinksReport" $externalLinksReport
|
||||
"ThumbnailSize" $thumbnailSize
|
||||
) }}</li>
|
||||
{{- end -}}
|
||||
</ol>
|
||||
</nav>
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user