Ajoute les articles relatifs et harmonise la page 404
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user