{% extends 'layouts/layouts_front/base_front.html.twig' %}{% set cmptBack = 0 %}{% block stylesheets %}{% endblock %}{% set titleAff = page.seoTitle|default(page.ptitreonglet)|default(page.ptitre) %}{% if catEnCours is defined %} {% for cat in categories %} {% if cat.id == catEnCours %} {% set titleAff = titleAff~" - "~cat.actCatIntitule %} {% endif %} {% endfor %}{% endif %}{% set titleAff = titleAff|slice(0,34)~" | "~nomDuSite %}{% if app.request.locale == 'fr' %} {% set metaDescr = page.seoDescription|default( "Retrouvez toutes les actualités sur le site de "~nomDuSite) %}{% else %} {% set metaDescr = page.seoDescription|default("Find all the news on the "~nomDuSite~" website") %}{% endif %}{% if catEnCours is defined %} {% for cat in categories %} {% if cat.id == catEnCours %} {% if app.request.locale == 'fr' %} {% set metaDescr = "Retrouvez toutes les actualités de la catégorie "~cat.actCatIntitule~" sur le site de "~nomDuSite %} {% else %} {% set metaDescr = "Find all the news of the "~cat.actCatIntitule~" category on the "~nomDuSite~" website" %} {% endif %} {% endif %} {% endfor %}{% endif %}{% block metaDescription %}{{ metaDescr }}{% endblock %}{% block metaDescriptionOg %}{{ metaDescr }}{% endblock %}{% block keywords %}{{ page.seoKeywords }}{% endblock %}{% block title %}{{ titleAff }}{% endblock %}{% block titleOg %}{{ titleAff }}{% endblock %}{% block content %} {% if page is not null %} {{ include('front/front_news/header.html.twig') }} {{ include('front/front_news/nav_ariane.html.twig') }} {% endif %} <div id="page_module"> {% set affSousMenuCat = 0 %} {% for categ in categories %} {% if categ.nbActus > 0 %} {% set affSousMenuCat = affSousMenuCat+1 %} {% endif %} {% endfor %} {% if affSousMenuCat > 1 %} <div class="container"> <div class="row justify-content-center"> <div class="col-md-12 col-lg-11"> <div class="d-flex justify-content-center"> <a class="btn btn-primary{% if catEnCours is defined and catEnCours == 0 %} active{% endif %}" href="{{ path('front_news') }}"> <span>{% trans %}Toutes les actualités{% endtrans %}</span> </a> {% for categ in categories %} {% if categ.nbActus > 0 %} {% set numCouleur = 1 %} {% set isSelected = 0 %} {% if categ.id == catEnCours %} {% set isSelected = 1 %} {% endif %} <a class="btn btn-primary{% if isSelected == 1 %} active{% elseif catEnCours != null %} noSelected{% endif %}" href="{{ path('front_news', {categorie:categ.id}) }}"> <span>{{ categ.actCatIntitule }}</span> </a> {% endif %} {% endfor %} </div> </div> </div> </div> {% endif %} {% if actualites|length >0 %} <section data-bs-version="5.1" class="slider6 mbr-embla cid-sZogb0MkOH" id="slider6-4n"> <div class="position-relative"> {# <div class="mbr-section-head"> #} {# <h4 class="mbr-section-title mbr-fonts-style align-center mb-0 display-2"> #} {# <strong>Actualité</strong></h4> #} {# <h5 class="mbr-section-subtitle mbr-fonts-style align-center mb-0 mt-2 display-5"> #} {# Sous titre actualité #} {# </h5> #} {# </div> #} <div class="embla mt-4" data-skip-snaps="true" data-align="center" data-contain-scroll="trimSnaps" data-loop="true" data-auto-play="true" data-auto-play-interval="5" data-draggable="true"> <div class="embla__viewport container-fluid"> <div class="embla__container"> {% for event in actualites %} {% set mediaTmp = event.media_fichier %} {% set mediaDefault = "default.jpg" %} {% set mediaTmp = webp(webpSupported, mediaTmp) %} {% set mediaDefault = webp(webpSupported, mediaDefault) %} <div class="embla__slide slider-image item" style="margin-left: 1rem; margin-right: 1rem;" itemscope itemtype="http://schema.org/Event"> <div class="slide-content"> <div class="item-wrapper"> <div class="item-img"> <a href="{{ path('front_news_card', {id:event.id}) }}"> <img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" alt="{{ event.act_titre|default(nomDuSite) }}" title="{{ event.act_titre|default(nomDuSite) }}" loading="lazy" class="lazyload" data-src="{{ asset('/medias_front/actualite/'~mediaTmp|default(mediaDefault)) }}" itemprop="image"> </a> </div> </div> <div class="item-content"> <h5 class="item-title mbr-fonts-style display-4"> {% trans %}Publié le{% endtrans %} <time itemprop="startDate" datetime="{{ event.act_date_publication|date('Y-m-d') }}"> {{ event.act_date_publication|date("d/m/Y") }} </time> </h5> <h6 class="item-subtitle mbr-fonts-style mt-1 display-7"> <strong>{{ event.act_titre }}</strong> </h6> {{ event.act_location|default("Lieu non défini") }} </div> <div class="mbr-section-btn item-footer mt-2"> <a href="{{ path('front_news_card', {id:event.id}) }}" class="btn item-btn btn-primary-outline display-7"> {% trans %}Lire la suite{% endtrans %} </a> </div> </div> </div> {% endfor %} </div> </div> <button class="embla__button embla__button--prev"> <span class="mobi-mbri mobi-mbri-arrow-prev mbr-iconfont" aria-hidden="true"></span> <span class="sr-only visually-hidden visually-hidden">Previous</span> </button> <button class="embla__button embla__button--next"> <span class="mobi-mbri mobi-mbri-arrow-next mbr-iconfont" aria-hidden="true"></span> <span class="sr-only visually-hidden visually-hidden">Next</span> </button> </div> </div> </section> {% endif %} </div>{% endblock %}{% block javascripts %}{% endblock %}