1
Files
2025/themes/2026/layouts/_partials/articles-list.html
2026-02-21 01:50:39 +01:00

39 lines
1.3 KiB
HTML

{{- $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 -}}