templates/layouts/testimonials-carousel.html.twig line 1

Open in your IDE?
  1. {% import 'components/cards/testimonial.html.twig' as testimonial %}
  2. <section class="relative py-6 desktop:py-12 bg-shadow-900">
  3.   <img src="{{ asset('build/images/border-section-testimonials.svg') }}" class="desktop:block absolute left-0 w-full -mb-px bottom-full desktop:bottom-[99%] z-10"/>
  4.   <span class="absolute bottom-0 left-0 z-10 block w-32 h-full -translate-y-1/2 desktop:w-72 top-1/2 bg-gradient-to-r from-shadow-900 to-transparent"></span>
  5.   <span class="absolute bottom-0 right-0 z-10 block w-32 h-full -translate-y-1/2 desktop:w-72 top-1/2 bg-gradient-to-l from-shadow-900 to-transparent"></span>
  6.   <div class="relative z-20 flex flex-col desktop:gap-2 items-center mx-auto text-white px-edge tablet:mb-12 desktop:mb-6">
  7.     <h3 class="text-xl font-bold text-center desktop:text-4xl">{{ 'reviews.homepage-title' | trans }}</h3>
  8.     <h4 class="text-sm text-center desktop:text-xl">{{ 'reviews.homepage-subtitle' | trans }}</h4>
  9.   </div>
  10.   <div class="splide splide__testimonials">
  11.     <div class="py-12 overflow-hidden splide__track">
  12.       <div class="splide__list">
  13.         {% set testimonials = get_testimonials() %}
  14.         {% if (testimonials | length) > 0 %}
  15.           {% for i in 0 .. (testimonials|length - 1) %}
  16.             <div class="splide__slide splide__testimonials__item">{{ testimonial.create(testimonials[i]) }}</div>
  17.           {% endfor %}
  18.         {% endif %}
  19.       </div>
  20.     </div>
  21.   </div>
  22. </section>