From 12544381fe674e5c1741c4c54354a54233f8a614 Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Thu, 20 Apr 2023 20:21:55 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20compte-=C3=A0-rebours?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Emmy D'Anello --- generate.py | 2 +- templates/template.html.j2 | 87 ++++++++++++++++++++++++++++++++++---- 2 files changed, 79 insertions(+), 10 deletions(-) diff --git a/generate.py b/generate.py index b3901e8..37ae330 100755 --- a/generate.py +++ b/generate.py @@ -40,7 +40,7 @@ def generate(): template = env.get_template("template.html.j2") with open('output/index.html', 'w') as f: - f.write(template.render(data=data)) + f.write(template.render(data=data, current_day=(date.today() - BASE_DATE).days)) if __name__ == '__main__': diff --git a/templates/template.html.j2 b/templates/template.html.j2 index 00fb165..91f3747 100644 --- a/templates/template.html.j2 +++ b/templates/template.html.j2 @@ -12,19 +12,37 @@
-

Le pays est-il apaisé ? NON

+
+

Le pays est-il apaisé ?

+ {% if current_day < 100 %} +

NON

+ {% else %} +

Normalement oui, si on pense le contraire c'est qu'on a mal observé

+ {% endif %} +

Temps restant :

+

+ +

-
-
+
+
+ 17/04/2023 +
+
+
+
+
+
+
+ 26/07/2023 +
+
+ +

Jour {{ current_day }}/100

- Jour 3/100 -
- Cette page est en construction, et a vocation à documenter l'ensemble des étapes de l'apaisement. -
- -
+
{% for day in data %}

@@ -95,8 +113,59 @@

{% endfor %} +
+ +
+ À venir : une carte de l'ensemble des déplacements et rassemblements. +
+