Afficher 2 éléments d'agenda sur accueil
This commit is contained in:
parent
b208df98ad
commit
cac9b4cb45
|
@ -74,7 +74,8 @@ nav {
|
||||||
border-left: 2px solid red;
|
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) {
|
@media (max-width: 767.98px) {
|
||||||
.agenda_line { margin-top: 1em !important; margin-right: 0 !important; }
|
.agenda_line { margin-top: 1em !important; margin-right: 0 !important; }
|
||||||
.agenda_line > div { text-align: center !important; margin-top: 1em !important; }
|
.agenda_line > div { text-align: center !important; margin-top: 1em !important; }
|
||||||
|
|
|
@ -11,9 +11,9 @@ class HomeView(TemplateView):
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
return {
|
return {
|
||||||
**super().get_context_data(**kwargs),
|
**super().get_context_data(**kwargs),
|
||||||
"item": Agenda.objects.filter(
|
"items": Agenda.objects.filter(
|
||||||
date_heure__date__gte=date.today(), prive=False,
|
date_heure__date__gte=date.today(), prive=False,
|
||||||
).order_by("date_heure").first(),
|
).order_by("date_heure")[:2],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,9 @@
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row justify-content-center mt-5 agenda_line">
|
<div class="agenda_container">
|
||||||
|
{% for item in items %}
|
||||||
|
<div class="row justify-content-center mt-3 agenda_line">
|
||||||
<div class="col-12 text-end mt-2">
|
<div class="col-12 text-end mt-2">
|
||||||
<span class="text-black rounded align-self-center fw-bold p-2 date_agenda">
|
<span class="text-black rounded align-self-center fw-bold p-2 date_agenda">
|
||||||
{{ item.date_heure|date:'D d F à H:i' }}
|
{{ item.date_heure|date:'D d F à H:i' }}
|
||||||
|
@ -30,7 +32,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="homeaudio" class="d-flex justify-content-center">
|
<div id="homeaudio" class="d-flex justify-content-center mt-5">
|
||||||
<div class="text-start">
|
<div class="text-start">
|
||||||
<i>Écouter:</i><br>
|
<i>Écouter:</i><br>
|
||||||
<audio controls src="{% static 'songs/WeShallOvercome.mp3' %}"></audio>
|
<audio controls src="{% static 'songs/WeShallOvercome.mp3' %}"></audio>
|
||||||
|
|
Loading…
Reference in a new issue