{% extends 'base.html.twig' %}
{% block page_contents %}
<section class="section section-page-title section-news-title position-relative mb-4" data-aos='fade-down'>
<div class="bg-gradient pt-5 pb-4 t-0 l-0 w-100">
<div class="container">
<div class="row">
<div class="col-xl-10 mx-auto text-white">
<div class="a-box pt-md-5 pt-0">
<h1 class="page-name font-weight-bold mb-3">{{ news.title }}</h1>
<div class="a-time justify-content-md-start justify-content-end">
<div class="a-icon"><i class="fa-solid fa-calendar-week"></i></div>
<div class="a-text">{{ news.createdDate|date('d M Y') }}</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="section-page-img position-relative pt-md-5 pt-4" data-aos='fade-right'>
<div class="container">
<div class="row">
<div class="col-12">
<img src="{{ news.media }}" alt="{{ news.title }}" onerror="this.onerror=null;this.src='{{ asset('assets/images/no-img/news.jpg') }}';">
</div>
</div>
</div>
</div>
</section>
<section class="section section-page-content" data-aos='fade-up'>
<div class="container">
<div class="row">
<div class="col-12 mx-auto keepEditorStyle mb-0 text-dark-purple text-justify">
{{ news.content|raw }}
</div>
<div class="col-6 text-left back-link my-4">
<a href="{{path('news.index')}}"><i class="fa-solid fa-arrow-left font-12"></i>{% trans %}Retour{% endtrans %}</a>
</div>
<div class="col-6 text-right next-link my-4">
{% if nextNews %}
<a href="{{ nextNews.url }}">{% trans %}Suivante{% endtrans %}<i class="fa-solid fa-arrow-right font-12"></i></a>
{% endif %}
</div>
</div>
</div>
</section>
<section class="section section-news b-4">
<div class="container">
<div class="row">
<div class="col-12">
<div class="section-title mb-4" data-aos='fade-down'><span>/</span> {% trans %}Dernières Actualités{% endtrans %}</div>
</div>
</div>
<div class="row">
{% if newsLasted %}
{% for news in newsLasted|default([]) %}
<div class="col-lg-4 col-md-6 mb-lg-5 mb-4">
<div class="n-item d-flex flex-column h-100" data-aos='zoom-in'>
<div class="n-img mb-4">
<a href="{{ news.url }}">
<img class="position-relative w-100" src="{{ news.media }}" alt="{{ news.title }}"
onerror="this.onerror=null;this.src='{{ asset('assets/images/no-img/news.jpg') }}';"/>
</a>
</div>
<div class="n-title mb-3">
<a href="{{ news.url }}">{{ news.title }}</a>
</div>
<div class="n-time mb-3">
<div class="n-icon"><i class="fa-solid fa-calendar-week"></i></div>
<div class="n-text">{{ news.createdDate|date('d M Y') }}</div>
</div>
<div class="n-text mb-3">
<div class="truncate-text">
{{ news.description }}
</div>
</div>
<div class="n-link mt-auto">
<a href="{{ news.url }}">{% trans %}Lire l'article{% endtrans %}<i class="fa-solid fa-arrow-right"></i></a>
</div>
</div>
</div>
{% endfor %}
{% endif %}
</div>
</div>
</section>
{% endblock %}
{% block custom_javascripts %}
{{ '<script type="application/ld+json">'|raw }}
{{ richSnippets|json_encode | raw }}
{{ '</script>'|raw }}
{% endblock %}