{% import "./macros_typography.html.twig" as macrosTypography %}{% import "./macros_button.html.twig" as macrosButton %}{% set background = content.bagroundSection %}<section class="swipe-section relative {{ background == 'white' ? 'bg-gray text-blue' : 'bg-blue text-white'}} cursor-section" section-shade="{{background == 'white' ? 'light' : 'dark'}}"> {% if content.swipeSectionTitle %} <div class="container pt-10 md:pt-[90px]"> <h2 class="h2 md:text-center max-w-2xl mx-auto mb-10 md:mb-20" split-direction="top" split-trigger="scroll">{{content.swipeSectionTitle}}</h2> </div> {% endif %} {# swipe Slider #} <div class="swipe-slider swiper-container w-full"> <div class="swiper-wrapper divide-x {{ background == 'white' ? 'divide-blue/10' : 'divide-white/10'}}"> {% for slide in content.similarProjects %} {% set item = sulu_content_load(slide.similarProject,{'id': 'id'}) %} {% set projet = sulu_content_load(item.id,{'title': 'title', 'image' : 'image', 'price' : 'price', 'location' : 'location', 'url' : 'url', 'surface' : 'surface', 'area' : 'area'}) %} <div class="swipe-slide swiper-slide grid grid-rows-[auto_1fr] w-3/4 lg:w-2/5 xl:w-1/3 group"> <div class="swipe-slide__img-fade trigger-cursor translate-y-12 opacity-0 overflow-hidden"> <div class="swipe-slide__img h-[60vh] min-h-[310px] max-h-[310px] md:max-h-[560px] scale-110 img-clip select-none"> {# image size 720x840 #} {% if projet.content.image|length > 0 %} {% set image = projet.content.image.thumbnails['720x840'] %} <img src="{{ image }}" width="100" height="560" alt="{{projet.content.title}}" loading="lazy"> {% endif %} {% if projet.content.image|length > 0 %} {% set image = projet.content.image.thumbnails['720x840'] %} <img src="{{ image }}" width="100" height="560" alt="{{projet.content.title}}" loading="lazy"> {% endif %} </div> </div> <div class="swipe-slide__content relative flex flex-col p-4 md:p-10 {{ background == 'white' ? 'text-blue' : 'bg-blue text-white'}} duration-500 {{ background == 'white' ? 'group-hover:bg-blue group-hover:text-white' : 'group-hover:bg-white group-hover:text-blue'}} group"> <a class="absolute inset-0 text-[0px] z-10" href="{{ sulu_content_path(projet.content.url) }}">{{projet.content.title}}</a> {% if slideNumbers %} <div class="swipe-slide__num swipe-num text-sm text-siver-light {{ background == 'white' ? 'group-hover:text-white' : 'group-hover:text-blue'}} duration-500" split-direction="bottom" split-trigger="none"> Project <span class="number ml-1"></span> </div> {% endif %} {% if projet.content.location %} <div class="swipe-slide__eyebrow text-sm" split-direction="bottom" split-trigger="none"> <span>{{projet.content.location}}</span> {% if projet.content.area %} <span class="inline-block px-2 opacity-50">•</span> <span>{{projet.content.area}}m<sup>2</sup> </span> {% endif %} </div> {% endif %} {% if projet.content.title %} <h3 class="swipe-slide__title h4 pr-6 mt-3 mb-5" split-direction="bottom" split-trigger="none">{{projet.content.title}}</h3> {% else %} <h2 class="swipe-slide__title h4 pr-6 mt-3 mb-5" split-direction="bottom" split-trigger="none">{{projet.content.title}}</h2> {% endif %} {% if projet.content.price %} <div class="swipe-slide__price text-sm" split-direction="bottom" split-trigger="none"> <span>{{projet.content.price}}</span> </div> {% endif %} {{macrosButton.arrowDiagonal({ 'class': 'swipe-slide__arrow mt-auto ml-auto' }) }} </div> </div> {% endfor %} </div> </div> {% if content.swipeSectionMoreLink %} <div class="flex justify-center py-9 md:py-12 border-y {{ background == 'white' ? 'border-blue/10' : 'border-white/10'}}"> <a class="text-xl md:text-2xl flex items-center gap-6 group" href="{{content.swipeSectionMoreLink}}" fade fade-trigger="scroll"> <span> {{content.swipeSectionMoreLinkText}} </span> <svg class="w-6 md:w-9 group-hover:translate-x-3 duration-300 ease-basic-ease" viewBox="0 0 37 14"> <use xlink:href="#arrow-next"></use> </svg> </a> </div> {% endif %}</section>