Ajout prochain concert sur accueil
This commit is contained in:
parent
af17ed0d46
commit
b208df98ad
|
@ -74,7 +74,12 @@ nav {
|
||||||
border-left: 2px solid red;
|
border-left: 2px solid red;
|
||||||
}
|
}
|
||||||
|
|
||||||
.date_agenda { background-color: #ddd; }
|
.agenda_line { margin-top: 7em !important; margin-right: 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; }
|
||||||
|
}
|
||||||
|
.date_agenda { background-color: #ddd; text-decoration: none; }
|
||||||
.prive {
|
.prive {
|
||||||
background-image: linear-gradient(45deg, #333333 41.67%, #6b0c0c 41.67%, #6b0c0c 50%, #333333 50%, #333333 91.67%, #6b0c0c 91.67%, #6b0c0c 100%);
|
background-image: linear-gradient(45deg, #333333 41.67%, #6b0c0c 41.67%, #6b0c0c 50%, #333333 50%, #333333 91.67%, #6b0c0c 91.67%, #6b0c0c 100%);
|
||||||
background-size: 33.94px 33.94px;
|
background-size: 33.94px 33.94px;
|
||||||
|
|
|
@ -5,6 +5,18 @@ from django.views.generic import ListView, TemplateView
|
||||||
from .models import Agenda, Document, Membre
|
from .models import Agenda, Document, Membre
|
||||||
|
|
||||||
|
|
||||||
|
class HomeView(TemplateView):
|
||||||
|
template_name="index.html"
|
||||||
|
|
||||||
|
def get_context_data(self, **kwargs):
|
||||||
|
return {
|
||||||
|
**super().get_context_data(**kwargs),
|
||||||
|
"item": Agenda.objects.filter(
|
||||||
|
date_heure__date__gte=date.today(), prive=False,
|
||||||
|
).order_by("date_heure").first(),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class AgendaView(ListView):
|
class AgendaView(ListView):
|
||||||
model = Agenda
|
model = Agenda
|
||||||
template_name = "agenda.html"
|
template_name = "agenda.html"
|
||||||
|
|
|
@ -7,7 +7,7 @@ from beesgospel import views
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("admin/", admin.site.urls),
|
path("admin/", admin.site.urls),
|
||||||
path("accounts/", include("django.contrib.auth.urls")),
|
path("accounts/", include("django.contrib.auth.urls")),
|
||||||
path("", TemplateView.as_view(template_name="index.html"), name="home"),
|
path("", views.HomeView.as_view(), name="home"),
|
||||||
path("v2", TemplateView.as_view(template_name="index2.html"), name="home"),
|
path("v2", TemplateView.as_view(template_name="index2.html"), name="home"),
|
||||||
path("presentation/", TemplateView.as_view(template_name="presentation.html"), name="presentation"),
|
path("presentation/", TemplateView.as_view(template_name="presentation.html"), name="presentation"),
|
||||||
path("contact/", TemplateView.as_view(template_name="contact.html"), name="contact"),
|
path("contact/", TemplateView.as_view(template_name="contact.html"), name="contact"),
|
||||||
|
|
|
@ -17,6 +17,18 @@
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row justify-content-center mt-5 agenda_line">
|
||||||
|
<div class="col-12 text-end mt-2">
|
||||||
|
<span class="text-black rounded align-self-center fw-bold p-2 date_agenda">
|
||||||
|
{{ item.date_heure|date:'D d F à H:i' }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 text-end mt-2">
|
||||||
|
<a class="text-white" href="{% url 'agenda' %}">
|
||||||
|
<span class="ps-3 fw-bold">{{ item.titre }} ({{ item.lieu }})</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="homeaudio" class="d-flex justify-content-center">
|
<div id="homeaudio" class="d-flex justify-content-center">
|
||||||
<div class="text-start">
|
<div class="text-start">
|
||||||
|
|
Loading…
Reference in a new issue