{% block cms_element_blur_elysium_slider_root %}
{% set sliderOverlay = element.translated.config.sliderOverlay.value %}
{% set sliderSettingsNav = element.translated.config.sliderNavigation.value %}
{% set slideSpeed = element.translated.config.slideSpeed.value %}
{% set sliderAutoplay = element.translated.config.sliderAutoplay.value %}
{% set sliderAutoplayTimeout = element.translated.config.sliderAutoplayTimeout.value %}
{% set sliderArrowColors = element.translated.config.sliderArrowColor.value %}
{% set sliderDotColors = element.translated.config.sliderDotColor.value %}
{% set sliderDotActiveColors = element.translated.config.sliderDotActiveColor.value %}
{% set sliderAspectRatio = element.translated.config.aspectRatio.value %}
{% set sliderSettings = {
nav: sliderSettingsNav,
navContainer: '[data-base-slider-nav=true]',
controls: true,
loop: false,
rewind: true,
speed: slideSpeed,
autoplay: sliderAutoplay,
autoplayTimeout: sliderAutoplayTimeout,
autoplayHoverPause: true,
autoplayButtonOutput: false
} %}
{% block cms_element_blur_elysium_slider_css_styles %}
{% apply spaceless %}
<style>
#elysiumSlider-{{ element.id }} .cms-element-elysium-slide {
{% if sliderAspectRatio.landscape %}
aspect-ratio: auto {{ sliderAspectRatio.landscape.width }} / {{ sliderAspectRatio.landscape.height }};
{% endif %}
}
{% if sliderArrowColors %}
#elysiumSlider-{{ element.id }} .cms-element-elysium-slider__control-button {
color: {{ sliderArrowColors }};
}
{% endif %}
{% if sliderDotColors %}
#elysiumSlider-{{ element.id }} .cms-element-elysium-slider__navigation-bullet {
background-color: {{ sliderDotColors }};
}
{% endif %}
{% if sliderDotActiveColors %}
#elysiumSlider-{{ element.id }} .cms-element-elysium-slider__navigation-bullet:hover,
#elysiumSlider-{{ element.id }} .cms-element-elysium-slider__navigation-bullet.tns-nav-active {
background-color: {{ sliderDotActiveColors }};
}
{% endif %}
{% if sliderAspectRatio.portrait %}
@media screen and (orientation: portrait) {
#elysiumSlider-{{ element.id }} .cms-element-elysium-slide {
aspect-ratio: auto {{ sliderAspectRatio.portrait.width }} / {{ sliderAspectRatio.portrait.height }};
}
}
{% endif %}
{% block cms_element_blur_elysium_slider_css_styles_extend %}{% endblock %}
</style>
{% endapply %}
{% endblock %}
{% block cms_element_blur_elysium_slider %}
{# your could override sliderSettings variables on this block #}
<div id="elysiumSlider-{{ element.id }}"
data-slider-settings='{{ sliderSettings|json_encode }}'
class="cms-element-elysium-slider{% if sliderSettingsNav %} has-navigation{% endif %}{% if sliderOverlay %} has-overlay{% endif %}">
{% if element.data.slideCollection is empty %}
{% block cms_element_blur_elysium_slider_empty_state %}
<!-- no slide collection here -->
{% endblock %}
{% else %}
{% block cms_element_blur_elysium_slider_container %}
<div class="cms-element-elysium-slider__slide-container">
{% for slide in element.data.slideCollection %}
<div class="cms-element-elysium-slide__wrapper">
{% block cms_element_blur_elysium_slide_include %}
{% set slideTemplate = 'slide' %}
{% if slide.slideSettings.customTemplateFile %}
{% set slideTemplate = 'custom/' ~ slide.slideSettings.customTemplateFile %}
{% endif %}
{% sw_include '@Storefront/storefront/component/blur-elysium-slide/' ~ slideTemplate ~'.html.twig' ignore missing with {
slide: slide
} only %}
{% endblock %}
</div>
{% endfor %}
</div>
{% endblock %}
{% block cms_element_blur_elysium_slider_controls %}
<div class="cms-element-elysium-slider__controls"
data-base-slider-controls="true">
{% block cms_element_blur_elysium_slider_controls_prev %}
<button type="button"
class="cms-element-elysium-slider__control-button control-prev"
aria-label="{{ 'blurElysiumSlides.sliderControls.prev' | trans }}">
{% block cms_element_blur_elysium_slider_controls_prev_icon %}
{% sw_icon 'arrow-head-left' %}
{% endblock %}
</button>
{% endblock %}
{% block cms_element_blur_elysium_slider_controls_next %}
<button type="button"
class="cms-element-elysium-slider__control-button control-next"
aria-label="{{ 'blurElysiumSlides.sliderControls.next' | trans }}">
{% block cms_element_blur_elysium_slider_controls_next_icon %}
{% sw_icon 'arrow-head-right' %}
{% endblock %}
</button>
{% endblock %}
</div>
{% endblock %}
{% block cms_element_blur_elysium_slider_navigation %}
{% if sliderSettingsNav %}
<div class="cms-element-elysium-slider__navigation"
data-base-slider-nav="true">
{% for slide in element.data.slideCollection %}
<div class="cms-element-elysium-slider__navigation-bullet"></div>
{% endfor %}
</div>
{% endif %}
{% endblock %}
{% endif %}
</div>
{% endblock %}
{% endblock %}