src/Modules/Reviews/Hooks/ReviewsHome/hook.html.twig line 1

Open in your IDE?
  1. {% if reviews is defined and reviews is not empty %}
  2.     <section class="hook_reviews_home">
  3.         <h2 class="title title_rouge">Avis clients</h2>
  4.         <div class="row mt-5">
  5.             <div class="col-12 col-lg-2 animate__animated" data-animation="animate__fadeIn" invisible>
  6.                 <a class="carousel-control-prev mt-3" data-bs-target="#carousel_reviews"
  7.                    data-bs-slide="prev">
  8.                     {% include '/public/images/reviews/fleche_gauche.svg' %}
  9.                 </a>
  10.             </div>
  11.             <div class="col-12 col-lg-8 animate__animated" data-animation="animate__fadeIn" invisible>
  12.                 <div id="carousel_reviews" class="carousel slide text-center" data-bs-ride="carousel">
  13.                     <div class="carousel-inner">
  14.                         {% for review in reviews %}
  15.                             <div class=" carousel-item {% if loop.first %}active{% endif %}">
  16.                                 <p class="d-flex reviews_text align-items-center justify-content-center">{{ review.content|striptags }}</p>
  17.                                 <div class="reviews_author">
  18.                                     {% include 'src/Modules/Reviews/Templates/includes/rating.include.html.twig' %}
  19.                                     {% if review.author is not null %}<h3 class="author_name">{{ review.author }}</h3>{% endif %}
  20.                                     <p>
  21.                                         <strong>
  22.                                             {% if review.refReviewsSources is not null and review.refReviewsSources.image is not null %}
  23.                                                 <img alt="Icône {{ review.refReviewsSources.name }}" class="author_source img-fluid" src="{{ review.refReviewsSources.image }}" width="35" height="35" />
  24.                                             {% endif %}
  25.                                             {% if review.dateAdd is not null %}
  26.                                                 <time class="author_date" datetime="{{ review.dateAdd|date("Y-m-d") }}">
  27.                                                     {{ review.dateAdd|date("d/m/Y") }}
  28.                                                 </time>
  29.                                             {% endif %}
  30.                                         </strong>
  31.                                     </p>
  32.                                 </div>
  33.                             </div>
  34.                         {% endfor %}
  35.                     </div>
  36.                 </div>
  37.             </div>
  38.             <div class="col-12 col-lg-2 animate__animated" data-animation="animate__fadeIn" invisible>
  39.                 <a class="carousel-control-next mt-3" data-bs-target="#carousel_reviews"
  40.                    data-bs-slide="next">
  41.                     {% include '/public/images/reviews/fleche_droite.svg' %}
  42.                 </a>
  43.             </div>
  44.         </div>
  45.         <div class="text-center">
  46.             <a class="btn btn-black btn-all-reviews" href="{{ path('pages_detail', {'rewrite':pag_avis.rewrite}) }}">Voir
  47.                 tous les avis</a>
  48.         </div>
  49.     </section>
  50. {% else %}
  51.     <div class="alert alert-warning">Aucun résultat n'a pu être récupéré</div>
  52. {% endif %}