templates/includes/blocks/servicesSection.html.twig line 1

Open in your IDE?
  1. {% import "./macros_typography.html.twig" as macrosTypography %}
  2. {% import "./macros_button.html.twig" as macrosButton %}
  3. {% for section in content.services %}
  4. {% set item = sulu_content_load(section.id,{'title': 'title', 'url': 'url', 'description': 'description', 'image': 'image', 'icon': 'icon'}) %}
  5. <section class="service-section text-blue pt-16 md:pt-20 {{loop.last ? 'pb-[70px] md:pb-20' : 'pb-8 md:pb-10'}}" section-shade="light">
  6.   <div
  7.     class="big-container flex flex-col {{loop.index is odd ? 'lg:flex-row-reverse' : 'lg:flex-row'}} justify-between gap-6">
  8.     <div class="lg:w-7/12">
  9.       <div
  10.         class="relative w-full min-h-[250px] md:min-h-[350px] lg:min-h-[695px] {{loop.index is even ? 'clip-path-tl-br' : 'clip-path-tr-bl'}} overflow-hidden">
  11.         {# image size 1730 × 1390 webp ~70-100kb #}
  12.         {% if item.content.image|length > 0 %}
  13.         {% set image = item.content.image.url %}
  14.         <img class="absolute object-cover w-full h-full"
  15.           zoom-out
  16.           zoom-out-trigger="scroll"
  17.           src="{{ image }}"
  18.           alt="{{item.content.title}} image"
  19.           loading="lazy">
  20.         {% endif %}
  21.       </div>
  22.     </div>
  23.     <div class="lg:w-4/12">
  24.       <div class="max-w-[90px]"
  25.         fade
  26.         fade-trigger="scroll">
  27.         {# Image size 100*100 #}
  28.         <img class="w-full"
  29.           src="{{ item.content.icon }}"
  30.           alt="{{ item.content.title }} icon"
  31.           loading="lazy">
  32.       </div>
  33.       <h2 class="h2 mt-6 lg:mt-20"
  34.         split-direction="top"
  35.         split-trigger="scroll">{{item.content.title}}</h2>
  36.       <div class="text-sm sm:w-8/12 lg:w-full mt-6 lg:mt-8"
  37.         fade
  38.         fade-trigger="scroll">{{ item.content.description | raw}}</div>
  39.       {{macrosButton.arrowLink({
  40.       'wrappClass': 'mt-6 lg:mt-12',
  41.       'text': content.textLink,
  42.       'href': sulu_content_path(item.content.url),
  43.       'trigger': 'scroll'
  44.       })}}
  45.     </div>
  46.   </div>
  47. </section>   
  48. {% endfor %}