From cbf978c9eaa16483abc07da2cebdeec917e95710 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Wed, 4 Jan 2023 15:43:20 +0100 Subject: [PATCH] Page d'accueil ok --- pynyaata/__init__.py | 14 ++++++++++---- pynyaata/static/css/styles.css | 3 +++ pynyaata/templates/index.html.j2 | 4 ++-- pynyaata/templates/layout.html.j2 | 22 ++++++++++++++++++++-- pynyaata/translations/__init__.py | 6 +++--- pynyaata/translations/fr.json | 3 ++- 6 files changed, 40 insertions(+), 12 deletions(-) diff --git a/pynyaata/__init__.py b/pynyaata/__init__.py index 2308011..c87b6af 100644 --- a/pynyaata/__init__.py +++ b/pynyaata/__init__.py @@ -13,11 +13,17 @@ app.config["SECRET_KEY"] = token_hex() @app.context_processor def utility_processor(): current_date = datetime.now() - next_year = current_date.year + 5 - (current_date.year % 5) + apocalypse_left = ( + datetime(current_date.year + 5 - (current_date.year % 5), 6, 4, 0, 1) + - current_date + ) - print(next_year) - - return dict(_=i18n, current_lang=current_lang(), search_form=SearchForm()) + return dict( + _=i18n, + current_lang=current_lang(), + search_form=SearchForm(), + apocalypse_left=apocalypse_left, + ) @app.route("/") diff --git a/pynyaata/static/css/styles.css b/pynyaata/static/css/styles.css index e69de29..a6bc531 100644 --- a/pynyaata/static/css/styles.css +++ b/pynyaata/static/css/styles.css @@ -0,0 +1,3 @@ +.title { + letter-spacing: 0.5rem; +} diff --git a/pynyaata/templates/index.html.j2 b/pynyaata/templates/index.html.j2 index a2a9c9b..6eb049d 100644 --- a/pynyaata/templates/index.html.j2 +++ b/pynyaata/templates/index.html.j2 @@ -1,8 +1,8 @@ {% extends "layout.html.j2" %} {% block body %}
-
-

{{ _("𝚷😼た") }}

+
+

{{ _("𝚷😼た") }}

diff --git a/pynyaata/templates/layout.html.j2 b/pynyaata/templates/layout.html.j2 index 905d528..49c031a 100644 --- a/pynyaata/templates/layout.html.j2 +++ b/pynyaata/templates/layout.html.j2 @@ -48,8 +48,26 @@ {% endif %} {% block body %} {% endblock body %} -