1

Ajoute les articles relatifs et harmonise la page 404

This commit is contained in:
2026-04-03 00:17:38 +02:00
parent ba651ee4cd
commit 1160242e72
6 changed files with 275 additions and 27 deletions

View File

@@ -1,9 +1,15 @@
{{ define "main" }}
{{- $recentPages := first 6 (site.RegularPages.ByDate.Reverse) -}}
<header>
{{ partialCached "header-brand.html" .Site .Site.Title (.Site.Params.logo | default "logo-large.png") }}
<h1>Page introuvable</h1>
</header>
{{- $recentPages := slice -}}
{{- range site.RegularPages.ByDate.Reverse -}}
{{- if and .Params.date (lt (len $recentPages) 8) -}}
{{- $recentPages = $recentPages | append . -}}
{{- end -}}
{{- end -}}
{{ partial "article-header.html" (dict
"Page" .
"Title" "Page introuvable"
"ShowMeta" false
) }}
<main>
<article>
<p>Le contenu que vous recherchez n'existe pas.</p>
@@ -11,9 +17,19 @@
</article>
{{ if gt (len $recentPages) 0 }}
<section>
<header><h2>Derniers articles</h2></header>
{{ partial "articles-list.html" (dict "Pages" $recentPages "Context" .) }}
<section class="listing-spotlight">
<header>
<h2>Derniers articles</h2>
</header>
{{ partial "spotlight-block.html" (dict
"Cards" $recentPages
"FeedPages" $recentPages
"FeedTitle" "Derniers articles"
"ShowFeedTitle" false
"FeedRich" true
"ShowSection" true
"AsideFirst" false
) }}
</section>
{{ end }}
</main>