From db040050c482f375eff37d29d457314c16cad2f9 Mon Sep 17 00:00:00 2001 From: Paul Mougin Date: Wed, 14 Feb 2024 13:42:19 +0100 Subject: [PATCH] Ajoutes les prochaine date sur la page d'accueil --- layouts/index.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/layouts/index.html b/layouts/index.html index 7ee5b55..46d01a1 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -28,7 +28,7 @@ {{ if isset .Site.Params "showpostsonhomepage" }}
-

{{ .Site.Params.ShowPostsOnHomePage | humanize }} Posts

+

Prochaines Dates

{{ $posts := where .Site.Pages "Params.type" "post" }} @@ -40,7 +40,14 @@ {{ range $posts.ByDate.Reverse | first 4 }} {{- partial "list-posts.html" . -}} {{ end }} + {{ else if eq .Site.Params.ShowPostsOnHomePage "future" }} + {{ range $posts.ByDate }} + {{ if ge .Params.Date.Unix now.Unix }} + {{- partial "list-posts.html" . -}} + {{ end }} + {{ end }} {{ end }} +
{{ end }}