Afficher 2 éléments d'agenda sur accueil

This commit is contained in:
Claude Paroz 2025-08-19 21:07:14 +02:00
parent b208df98ad
commit cac9b4cb45
3 changed files with 8 additions and 5 deletions

View file

@ -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; }

View file

@ -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],
}