{% extends '@nucleus/partials/particle.html.twig' %} {% block stylesheets %} {% endblock %} {% block particle %} {% set swiper_settings %} data-swiper-thumbnails="{% if particle.thumbs == 'enabled' %}true{% else %}false{% endif %}" data-swiper-effect="{{ particle.effect }}" data-swiper-autoplay="{% if particle.autoplay == 'enabled' %}true{% else %}false{% endif %}" data-swiper-loop="{% if particle.loop == 'enabled' %}true{% else %}false{% endif %}" data-swiper-pagination="{% if particle.pagination %}{{ particle.pagination }}{% else %}false{% endif %}" data-swiper-timeout="{{ particle.autoplayTimeout }}" data-swiper-speed="{{ particle.speed }}" data-swiper-touchmove="{% if particle.touchmove == 'enabled' %}true{% else %}false{% endif %}" data-swiper-mobiletouchmove="{% if particle.touchmove == 'enabled' or particle.touchmove == 'mobile' %}true{% else %}false{% endif %}" data-swiper-direction="{% if particle.direction == 'horizontal' %}horizontal{% else %}vertical{% endif %}" data-swiper-nextnav=".swiper-button-next-{{ id|replace({'swiper-': ''}) }}" data-swiper-prevnav=".swiper-button-prev-{{ id|replace({'swiper-': ''}) }}" data-swiper-elpa=".swiper-pagination-parent-{{ id|replace({'swiper-': ''}) }}" data-swiper-elthumb="#{{ id }}-thumbs" {% endset %} {% if particle.effect == "slide" or particle.effect == "coverflow" %} {% set swiper_slides %} data-swiper-mobileslides="{{ particle.mobileslides|default('1') }}" data-swiper-mobilegroup="{{ particle.mobilegroup|default('1') }}" data-swiper-mobilespace="{{ particle.mobilespace|default('0') }}" data-swiper-tabletslides="{{ particle.tabletslides|default('1') }}" data-swiper-tabletgroup="{{ particle.tabletgroup|default('1') }}" data-swiper-tabletspace="{{ particle.tabletspace|default('0') }}" data-swiper-desktopslides="{{ particle.desktopslides|default('1') }}" data-swiper-desktopgroup="{{ particle.desktopgroup|default('1') }}" data-swiper-desktopspace="{{ particle.desktopspace|default('0') }}" data-swiper-largedesktopslides="{{ particle.largedesktopslides|default('1') }}" data-swiper-largedesktopgroup="{{ particle.largedesktopgroup|default('1') }}" data-swiper-largedesktopspace="{{ particle.largedesktopspace|default('0') }}" {% endset %} {% else %} {% set swiper_slides %} data-swiper-mobileslides="1" data-swiper-mobilegroup="1" data-swiper-mobilespace="0" data-swiper-tabletslides="1" data-swiper-tabletgroup="1" data-swiper-tabletspace="0" data-swiper-desktopslides="1" data-swiper-desktopgroup="1" data-swiper-desktopspace="0" data-swiper-largedesktopslides="1" data-swiper-largedesktopgroup="1" data-swiper-largedesktopspace="0" {% endset %} {% endif %} {% set swiper_thumbs %} data-swiper-mobilethumbs="{{ particle.mobilethumbs|default('2') }}" data-swiper-mobilethumbspace="{{ particle.mobilethumbspace|default('20') }}" data-swiper-tabletthumbs="{{ particle.tabletthumbs|default('3') }}" data-swiper-tabletthumbspace="{{ particle.tabletthumbspace|default('30') }}" data-swiper-desktopthumbs="{{ particle.desktopthumbs|default('4') }}" data-swiper-desktopthumbspace="{{ particle.desktopthumbspace|default('40') }}" data-swiper-largedesktopthumbs="{{ particle.largedesktopthumbs|default('5') }}" data-swiper-largedesktopthumbspace="{{ particle.largedesktopthumbspace|default('50') }}" {% endset %} {% set swiper_breakpoints %} data-swiper-mobile-breakpoint="{{ gantry.config.get('styles.breakpoints.large-mobile-container')|default('30rem') }}" data-swiper-tablet-breakpoint="{{ gantry.config.get('styles.breakpoints.tablet-container')|default('51rem') }}" data-swiper-desktop-breakpoint="{{ gantry.config.get('styles.breakpoints.desktop-container')|default('76rem') }}" data-swiper-largedesktop-breakpoint="{{ gantry.config.get('styles.breakpoints.large-desktop-container')|default('88rem') }}" {% endset %} {% if not particle.source or particle.source == 'particle' %}
{% for item in particle.items %}
{% if particle.slides_linkable == "enabled" %} {% if item.video %} {% else %} {% endif %} {% else %} {% if item.video %} {% endif %} {% endif %} {% if item.image %} {% if particle.image == "img" %} {% if item.imageMobile %} {% else %} {% endif %} {% else %}
{% endif %} {% endif %}
{% if item.title %}
{{ item.title|raw }}
{% endif %} {% if item.text %}
{{ item.text|raw }}
{% endif %} {% if item.button_text %} {{item.button_text}} {% endif %}
{% endfor %}
{% if particle.nav == 'enabled' %} {% if gantry.page.direction == 'rtl' %}
{% else %}
{% endif %} {% endif %} {% if particle.pagination %}
{% endif %}
{% if particle.thumbs == 'enabled' %} {% endif %} {% else %} {% include '@particles/swiper-' ~ gantry.platform.name ~ '.html.twig' ignore missing %} {% endif %} {% endblock %} {% block javascript_footer %} {% if particle.thumbs == 'enabled' and particle.thumbslayout == 'top' %} {% endif %} {% do gantry.load('jquery') %} {% do gantry.document.addScript(url('gantry-theme://js/length.min.js'), 10, 'footer') %} {% do gantry.document.addScript(url('gantry-theme://js/swiper.min.js'), 10, 'footer') %} {% do gantry.document.addScript(url('gantry-theme://js/swiper.init.js'), 10, 'footer') %} {% endblock %}