templates/includes/blocks/use-case-slider.html.twig line 1
{% set useCases = useCases(app.request.locale, content.useCaseSliderTags) %}
<div class="use-case-slider {% if content.inverted %}use-case-slider--inverted{% endif %} {{ content.top }} {{ content.bottom }}"
x-data="usecaseslider">
<div class="use-case-slider__container">
{% if content.title %}
<div class="use-case-slider__title" x-ref="title">
{% if content.useCaseSliderPagina %}
{% if content.useCaseSliderSeoHeadlinePagina %}<{{ content.useCaseSliderSeoHeadlinePagina }}>{% endif %}
<div {% if content.inverted %} style="color: #fff;" {% endif %}
class="pagina">
{{ content.useCaseSliderPagina }}
</div>
{% if content.useCaseSliderSeoHeadlinePagina %}</{{ content.useCaseSliderSeoHeadlinePagina }}>{% 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="use-case-slider__lead" x-ref="lead">
{{ content.lead|raw }}
</div>
{% endif %}
{% if content.text %}
<div class="use-case-slider__text" x-ref="text" style="transform: translateY(0em); opacity: 1;">
{{ content.text|raw }}
</div>
{% endif %}
<div class="use-case-slider__arrows" x-ref="arrows">
<div class="use-case-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="use-case-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="use-case-slider__main">
<div class="swiper-container" x-ref="swiper">
<div class="swiper-wrapper">
{# make sure we have at least 4 slides to make the infinite loop work #}
{% set repetitions = (8 / useCases|length)|round(0, 'ceil') %}
{% for i in 1..repetitions %}
{% for case in useCases %}
<div class="swiper-slide">
<div class="use-case-slider-item">
{% set image = sulu_resolve_media(case['image'], app.request.locale|split('_')[0]) %}
<div class="use-case-slider-item__background">
<img class="use-case-slider-item__image" src ="{{ image|thumbnailUrl('640x') }}"
{% if image.description|striptags %}alt="{{ image.description|striptags }}"{% endif %}
sizes="680px">
</div>
<span class="use-case-slider-item__label use-case-slider-item__label--{{ case['topic']['color'] }}">
{{ case['topic']['title'] }}
</span>
<{{ content.useCaseSliderSeoHeadlineSlides ?: 'span' }} class="use-case-slider-item__title{% if case['titleMobile'] %} desktop-only {% endif %}">
{{ case['title'] }}
</{{ content.useCaseSliderSeoHeadlineSlides ?: 'span' }}>
{% if case['titleMobile'] %}
<{{ content.useCaseSliderSeoHeadlineSlides ?: 'span' }} class="use-case-slider-item__title mobile-only">
{{ case['titleMobile']|raw }}
</{{ content.useCaseSliderSeoHeadlineSlides ?: 'span' }}>
{% endif %}
<span class="use-case-slider-item__text">
{{ case['description']|raw }}
</span>
</div>
</div>
{% endfor %}
{% endfor %}
</div>
</div>
</div>
</div>
</div>