{% if reviews is defined and reviews is not empty %}
<section class="hook_reviews_home">
<h2 class="title title_rouge">Avis clients</h2>
<div class="row mt-5">
<div class="col-12 col-lg-2 animate__animated" data-animation="animate__fadeIn" invisible>
<a class="carousel-control-prev mt-3" data-bs-target="#carousel_reviews"
data-bs-slide="prev">
{% include '/public/images/reviews/fleche_gauche.svg' %}
</a>
</div>
<div class="col-12 col-lg-8 animate__animated" data-animation="animate__fadeIn" invisible>
<div id="carousel_reviews" class="carousel slide text-center" data-bs-ride="carousel">
<div class="carousel-inner">
{% for review in reviews %}
<div class=" carousel-item {% if loop.first %}active{% endif %}">
<p class="d-flex reviews_text align-items-center justify-content-center">{{ review.content|striptags }}</p>
<div class="reviews_author">
{% include 'src/Modules/Reviews/Templates/includes/rating.include.html.twig' %}
{% if review.author is not null %}<h3 class="author_name">{{ review.author }}</h3>{% endif %}
<p>
<strong>
{% if review.refReviewsSources is not null and review.refReviewsSources.image is not null %}
<img alt="Icône {{ review.refReviewsSources.name }}" class="author_source img-fluid" src="{{ review.refReviewsSources.image }}" width="35" height="35" />
{% endif %}
{% if review.dateAdd is not null %}
<time class="author_date" datetime="{{ review.dateAdd|date("Y-m-d") }}">
{{ review.dateAdd|date("d/m/Y") }}
</time>
{% endif %}
</strong>
</p>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
<div class="col-12 col-lg-2 animate__animated" data-animation="animate__fadeIn" invisible>
<a class="carousel-control-next mt-3" data-bs-target="#carousel_reviews"
data-bs-slide="next">
{% include '/public/images/reviews/fleche_droite.svg' %}
</a>
</div>
</div>
<div class="text-center">
<a class="btn btn-black btn-all-reviews" href="{{ path('pages_detail', {'rewrite':pag_avis.rewrite}) }}">Voir
tous les avis</a>
</div>
</section>
{% else %}
<div class="alert alert-warning">Aucun résultat n'a pu être récupéré</div>
{% endif %}