From 0bb55dac743af662272afbe71bdd9514c686fe0e Mon Sep 17 00:00:00 2001 From: Florestan Bredow Date: Sun, 1 Jun 2025 10:31:05 +0200 Subject: [PATCH] Finalise la boucle du template de l'index. --- themes/default/index.html.j2 | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/themes/default/index.html.j2 b/themes/default/index.html.j2 index c49eea1..82a62a1 100644 --- a/themes/default/index.html.j2 +++ b/themes/default/index.html.j2 @@ -9,9 +9,20 @@

{{ title }}

{{ presentation }}

+ {%- set ns = namespace(cur_month="") -%} + {%- for key, page in pages.items()|sort(attribute='1.date', reverse = true) -%} + {%- set month = page.date.strftime('%Y-%m') -%} + + {%- if ns.cur_month != month -%} + {%- if ns.cur_month != "" %} + + {%- endif%} +

{{ month }}

\ No newline at end of file