From cac9b4cb455656ebf7f41ff1a27c37bad5180738 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Tue, 19 Aug 2025 21:07:14 +0200 Subject: [PATCH] =?UTF-8?q?Afficher=202=20=C3=A9l=C3=A9ments=20d'agenda=20?= =?UTF-8?q?sur=20accueil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- beesgospel/static/css/main.css | 3 ++- beesgospel/views.py | 4 ++-- templates/index.html | 6 ++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/beesgospel/static/css/main.css b/beesgospel/static/css/main.css index db6d1d1..ff9d1be 100644 --- a/beesgospel/static/css/main.css +++ b/beesgospel/static/css/main.css @@ -74,7 +74,8 @@ nav { border-left: 2px solid red; } -.agenda_line { margin-top: 7em !important; margin-right: 7em !important; } +.agenda_line { margin-right: 7em !important; } +.agenda_container > div:first-of-type { margin-top: 7em !important; } @media (max-width: 767.98px) { .agenda_line { margin-top: 1em !important; margin-right: 0 !important; } .agenda_line > div { text-align: center !important; margin-top: 1em !important; } diff --git a/beesgospel/views.py b/beesgospel/views.py index b2a3d65..f556d3c 100644 --- a/beesgospel/views.py +++ b/beesgospel/views.py @@ -11,9 +11,9 @@ class HomeView(TemplateView): def get_context_data(self, **kwargs): return { **super().get_context_data(**kwargs), - "item": Agenda.objects.filter( + "items": Agenda.objects.filter( date_heure__date__gte=date.today(), prive=False, - ).order_by("date_heure").first(), + ).order_by("date_heure")[:2], } diff --git a/templates/index.html b/templates/index.html index 4be7bc4..d52f484 100644 --- a/templates/index.html +++ b/templates/index.html @@ -17,7 +17,9 @@ -
+
+ {% for item in items %} +
{{ item.date_heure|date:'D d F à H:i' }} @@ -30,7 +32,7 @@
-
+
Écouter: