Newer
Older
pre-www / src / blocks / carousel.twig
{# 
 # Blocco carousel 
 #}

 <div class="block-container block-{{block.key}}">

    <div class="swiper">
        
        <div class="swiper-wrapper">
            {% for slide in block.content.items %}
                <div class="swiper-slide">
                    <div class="swiper-slide__img">
                        {% include "../layout/partials/picture.twig" with {"image": slide } %}
                    </div>
                    {% if slide.caption %}
                    <div class="swiper-slide__caption">
                        <p>{{slide.caption}}</p>
                    </div>
                    {% endif %}
                </div>
            {% endfor %}
        </div>
        
        <div class="swiper-pagination"></div>

        <div class="swiper-button-prev"></div>
        <div class="swiper-button-next"></div>
        
    </div>

 </div>