templates/includes/blocks/case-slider.html.twig line 1
<div class="slider {% if content.inverted %}slider--inverted{% endif %} {{ content.top }} {{ content.bottom }}"
x-data="slider">
<div class="slider__container">
{% if content.title %}
<div class="slider__title" x-ref="title">
{% if content.caseSliderPagina %}
{% if content.caseSliderSeoHeadlinePagina %}<{{ content.caseSliderSeoHeadlinePagina }}>{% endif %}
<div {% if content.inverted %} style="color: #fff;" {% endif %}
class="pagina">
{{ content.caseSliderPagina }}
</div>
{% if content.caseSliderSeoHeadlinePagina %}</{{ content.caseSliderSeoHeadlinePagina }}>{% endif %}
{% endif %}
<div {% if content.titleMobile %} class="desktop-only" {% endif %}>
{{ content.title|raw }}
</div>
{% if content.titleMobile %}
<div class="mobile-only" x-ref="mobiletitle">
{{ content.titleMobile|raw }}
</div>
{% endif %}
</div>
{% endif %}
{% if content.lead %}
<div class="slider__lead" x-ref="lead">
{{ content.lead|raw }}
</div>
{% endif %}
{% if content.text %}
<div class="slider__text" x-ref="text" style="transform: translateY(0em); opacity: 1;">
{{ content.text|raw }}
</div>
{% endif %}
<div class="slider__actions" x-ref="actions">
{% if content.caseSliderActionLink != null %}
<div class="slider__actions-inner">
{% if content.caseSliderButtonType == 'box' %}
<a href="{{ content.caseSliderActionLink }}"
class="button button--{{ content.caseSliderButtonColor }} button--size-{{ content.caseSliderButtonSize }}">
<span class="button__inner">
{{ content.label }}
</span>
</a>
{% elseif content.caseSliderButtonType == 'text' %}
<a href="{{ content.caseSliderActionLink }}"
class="text-button text-button--{{ content.caseSliderTextButtonColor }} {% if content.uppercase %} uppercase {% endif %}">
{{ content.label }}
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 16 16">
<path d="M.5 8.5h15M10.5 3.5l5 5-5 5" stroke="currentColor" stroke-miterlimit="10"
stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</a>
{% endif %}
</div>
{% endif %}
</div>
<div class="slider__arrows" x-ref="arrows">
<div class="slider__prev" x-ref="prev">
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 18 35">
<path d="M17.16 34.32V0L0 17.16l17.16 17.16z" fill="currentColor"/>
</svg>
</div>
<div class="slider__next" x-ref="next">
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 12 24">
<path d="M.066.17v23.202l11.6-11.601L.067.17Z" fill="currentColor"/>
</svg>
</div>
</div>
<div class="slider__main">
<div class="swiper-container" x-ref="swiper">
<div class="swiper-wrapper">
{% for case in content.cases %}
<div class="swiper-slide">
<a href="{{ sulu_content_path(case.url) }}" class="slider-card">
<div class="slider-card__inner">
<div class="slider-card__media {% if case.caseSliderImageMobile != null %}
desktop-only {% endif %}">
{% if case.caseSliderImageDesktop %}
{% set imageDesktop=case.caseSliderImageDesktop %}
<img src ="{{ imageDesktop|thumbnailUrl('2880x') }}"
srcset ="{{ imageDesktop|thumbnailUrl('320x') }} 320w, {{ imageDesktop|thumbnailUrl('640x') }} 640w, {{ imageDesktop|thumbnailUrl('1280x') }} 1280w, {{ imageDesktop|thumbnailUrl('1440x') }} 1440w, {{ imageDesktop|thumbnailUrl('2048x') }} 2048w"
alt="{{ case.caseSliderImageDesktopALT|default(imageDesktop.description|striptags) }}" x-ref="image" sizes="(min-width: 1440px) 450px, 50vw">
{% endif %}
</div>
{% if case.caseSliderImageMobile != null %}
{% set imageMobile=case.caseSliderImageMobile %}
<div class="slider-card__media mobile-only">
<img src ="{{ imageMobile|thumbnailUrl('2880x') }}"
srcset ="{{ imageMobile|thumbnailUrl('320x') }} 320w, {{ imageMobile|thumbnailUrl('640x') }} 640w, {{ imageMobile|thumbnailUrl('1280x') }} 1280w, {{ imageMobile|thumbnailUrl('1440x') }} 1440w, {{ imageMobile|thumbnailUrl('2048x') }} 2048w"
alt="{{ case.caseSliderImageMobileALT|default(imageMobile.description|striptags) }}" x-ref="image" sizes="(min-width: 1440px) 450px, 50vw">
</div>
{% endif %}
<div class="slider-card__content">
<div class="slider-card__title{% if case.caseTitleSliderMobile %} desktop-only {% endif %}">
{{ case.caseTitleSliderDesktop|raw }}
</div>
{% if case.caseTitleSliderMobile %}
<div class="slider-card__title mobile-only">
{{ case.caseTitleSliderMobile|raw }}
</div>
{% endif %}
<div class="slider-card__text">
{{ case.caseDescriptionSlider|raw }}
</div>
{% if case.caseCustomerImage %}
<img src ="{{ case.caseCustomerImage|thumbnailUrl('320x') }}" sizes="200px"
{% if case.caseCustomerImage.description|striptags %}alt="{{ case.caseCustomerImage.description|striptags }}"{% endif %}
class="slider-card__customer">
{% endif %}
</div>
</div>
</a>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</div>