templates/pages/blocks/last_service_section.html.twig line 1

Open in your IDE?
  1. {% import 'elements2024/macros/buttons.html.twig' as buttons %}
  2. {% import 'elements2024/macros/title-block.html.twig' as blocks %}
  3. <section class="relative py-8 lg:py-16 overflow-hidden">
  4.     <div class="container">
  5.         {{ blocks.titleBlock({
  6.       title: content.title,
  7.       description: content.description,
  8.       link: {
  9.                 text: content.link_text,
  10.                 href: content.link
  11.             }
  12.     })}}
  13.         <div class="swiper slider-3 mt-16 !overflow-visible">
  14.             <div class="swiper-wrapper" batch-children>
  15.                 {% for item in content.services %}
  16.                     <div class="services-item swiper-slide" style="width: clamp(288px,24vw,450px); aspect-ratio: calc(450 / 520)">
  17.                         <div class="h-full" big-fade fade-trigger="batch">
  18.                             <div class="absolute inset-0">
  19.                                 {# <img class="img-cover" src="{{ asset('frontend2024/dist/img/home/services/' ~ (loop.index0 % 3 + 1) ~ '.webp') }}" alt="{{ item.title }}"> #}
  20.                                 {# <img class="img-cover" src="{{ asset(item.thumbnail.url) | imagine_filter('1040x720') }}" alt="{{ item.title }}" loading="lazy"> #}
  21.                                 <img class="img-cover" src="{{ asset(item.thumbnail.url)}}" alt="{{ item.title }}" loading="lazy">
  22.                                 <div class="absolute inset-0 bg-dark/20"></div>
  23.                             </div>
  24.                             <div class="absolute bottom-0 left-0 right-0 text-white flex items-center justify-between p-8 cursor-default">
  25.                                 <h3 class="h2-5">{{ item.title }}</h3>
  26.                                 <svg class="w-8 h-8" viewbox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
  27.                                     <path d="M2 16H30" stroke="currentColor" stroke-width="2"/>
  28.                                     <path d="M22 8L30 16L22 24" stroke="currentColor" stroke-width="2"/>
  29.                                 </svg>
  30.                             </div>
  31.                             <div class="services-item__hover">
  32.                                 <h3 class="h3 mb-auto">{{ item.title }}</h3>
  33.                                 <div class="mt-10">
  34.                                     <p class="p">{{ item.short_desc | raw  }}</p>
  35.                                     <div class="mt-8">
  36.                                         <div class="btn-rounded btn__white">
  37.                                             <svg class="w-5 h-5" viewbox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  38.                                                 <path d="M1.25 10H18.75" stroke="currentColor"/>
  39.                                                 <path d="M13.75 5L18.75 10L13.75 15" stroke="currentColor"/>
  40.                                             </svg>
  41.                                             <span>En savoir plus</span>
  42.                                         </div>
  43.                                     </div>
  44.                                 </div>
  45.                             </div>
  46.                             <a class="absolute inset-0" href="{{item.url}}">
  47.                                 <span class="sr-only">En savoir plus</span>
  48.                             </a>
  49.                         </div>
  50.                     </div>
  51.                 {% endfor %}
  52.             </div>
  53.             <!-- Prev button -->
  54.             <div class="swiper-btn-prev-wrapp">
  55.                 {{ buttons.sliderPrev(true) }}
  56.             </div>
  57.             <!-- Next button -->
  58.             <div class="swiper-btn-next-wrapp">
  59.                 {{ buttons.sliderNext(true) }}
  60.             </div>
  61.         </div>
  62.     </div>
  63. </section>