src/Package/Openform/Front/Templates/_blocks_sections/_slider.html.twig line 1

Open in your IDE?
  1. {% set mobile = openform_front_util.isMobileDevice() %}
  2. <section class="block-slider {% if mobile %}block-slider--mobile{% endif %}" data-scroll-section>
  3.     <div class="splide js-splide-slider" aria-label="{{"T_SLIDER_SPLIDE"|trans({}, "openform_front", app.request.locale)}}">
  4.         <div class="splide__track">
  5.             <ul class="splide__list">
  6.                 {% for slide in section %}
  7.                     
  8.                     {% if slide.section.sliderKind %}
  9.                         <li class="splide__slide" style="height: fit-content;">
  10.                             
  11.                             {% if mobile %}
  12.                                 {{ include('@openform_front_templates/_blocks_sections/_slides/_slide-mobile.html.twig', {slide: slide}) }}       
  13.                             {% else %}
  14.                                 {{ include('@openform_front_templates/_blocks_sections/_slides/_slide-' ~ slide.section.sliderKind ~ '.html.twig', {slide: slide}) }}       
  15.                             {% endif %}    
  16.                         </li>
  17.                     {% endif %}
  18.                 {% endfor %}
  19.             </ul>
  20.             <div class="block-slider__nav container {% if section|length < 2 %}hide{% endif %}">
  21.                 {% if section|length > 0 and section[0].section.sliderSwitcherId %}
  22.                     {% if section[0].section.sliderSwitcherId == 1 %}
  23.                         {% include '@openform_front_templates/_includes/_slider-nav.html.twig' with { class: '' } %}   
  24.                     {% elseif section[0].section.sliderSwitcherId == 2 %}
  25.                         {% include '@openform_front_templates/_includes/_slider-nav.html.twig' with { class: "dark" } %}   
  26.                     {% endif %}
  27.                 {% elseif section|length > 0 %}
  28.                     {% include '@openform_front_templates/_includes/_slider-nav.html.twig' with { class: '' } %}   
  29.                 {% endif %}
  30.                 
  31.             </div>
  32.             
  33.         </div>
  34. </section>