{% set sliders = [ 'base', 'start-index', 'non-loop', 'rewind', 'center', 'fixedWidth', 'fixedWidth-edgePadding', 'autoWidth', 'autoWidth-non-loop', 'autoWidth-lazyload', 'vertical', 'responsive', 'mouse-drag', 'mouse-drag2', 'gutter', 'edgePadding', 'arrowKeys', 'autoplay', 'animation1', 'lazyload', 'customize', 'autoHeight', 'nested' ] %} {# {% set sliders = ['autoWidth-non-loop'] %} #} {% set titles = [ "Lorem ipsum dolor sit amet, consectetur adipisicing.", "Sunt dignissimos distinctio, veniam, tenetur aspernatur nulla!", "Corrupti, libero minima nihil expedita officiis? Quo.", "Alias rem, ab impedit recusandae repellat tempore.", " Nisi inventore quo delectus perspiciatis voluptatibus, quae.", "Nisi harum earum consectetur laudantium iusto, laboriosam.", "Dolores blanditiis neque, quis vitae? Reprehenderit, aliquam.", "Omnis dolorum eum blanditiis, ratione voluptates quod.", "Animi quis iste ex ullam, similique laboriosam.", "D eserunt, ipsam! Placeat ullam, nam incidunt odit!" ] %} {% set collectionId = ["", "", "", "", "", "", "", "", "", "", "", "" ] if mobile else ["993239", "1673600", "1513994", "502925", "1891993", "1103088", "548245", "539469", "end"] %} {% set imgPlaceholder = 'data:image/gif;base64,R0lGODlhAQABAPAAAMzMzAAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==' %} {% set baseurl = 'https://via.placeholder.com' if mobile else 'https://source.unsplash.com/collection/' %} {# sliders #}
{% for slide in sliders %}

{{ slide | title }}

{# go to #} {% if slide === 'base' %}
Go to slide:
{% endif %} {# slider body #}
{# lazy load #} {% if slide === 'lazyload' %} {% for i in range(1, 6) %}

{{ titles[i] }}

{% endfor %} {# customize #} {% elif slide === 'customize' %} {% for i in range(1, 6) %}

{{ titles[i] }}

{% endfor %} {# auto height #} {% elif slide === 'autoHeight' or slide === 'responsive5' %} {% set w = 700 if mobile else 1600 %} {% set hs = [500, 700, 600, 800, 500, 600, 800] %} {% if slide === 'autoHeight' %} {% for i in range(1, 6) %}

{{ titles[i] }}

{% endfor %} {% else %} {% for i in range(1, 6) %} {% endfor %} {% endif %} {# nested #} {% elif slide === 'nested' %} {% for i in range(1, 8) %}
{% if i === 1 %}
{% for i in range(1, 8) %}

{{ titles[i] }}

{% endfor %}
{% else %}

{{ titles[i] }}

{% endif %}
{% endfor %} {# responsive6 #} {% elif slide === 'responsive6' %} {% for i in range(1, 3) %}

{{ titles[i] }}

{% endfor %} {% elif slide.indexOf('mouse-drag') >= 0 %} {% for i in range(1, 8) %}
{% if slide === 'mouse-drag' %}
{% else %} {% endif %}

{{ titles[i] }}

{% endfor %} {% elif slide.indexOf('autoWidth') >= 0 %} {% set sizes = [[600, 320], [500, 300], [200, 310], [400, 330], [640, 300], [360, 240], [460, 280]] %} {% for i in range(1, 8) %}
{% set lazyload = slide.indexOf('lazyload') >= 0 %} {% set width = sizes[i - 1][0] %} {% set height = sizes[i - 1][1] %} {% set lk = baseurl + collectionId[i - 1] + '/' + width + 'x' + height %}
{% endfor %} {# default #} {% else %} {% set regExp = r/^vertical/%} {% for i in range(1, 8) %}
{% if not regExp.test(slide) %}

{{ titles[i] }}

{% endif %}
{% endfor %} {% endif %}
{# customize tools #} {% if slide === 'customize' %}
    {% for i in range(1, 6) %}
  • {% endfor %}
{% endif %}
{% endfor %}