{#
    UI Element template
    type: image_collection
    element fields :
        images
#}
<div class="ui secondary segment">
    <div class="ui stackable two column grid">
        {% for image in element.images %}
            <div class="column">
                {% if image.link is not empty %}
                    <a href="{{ image.link }}">
                        <img class="ui fluid image" src="{{ image.image }}" alt="{{ image.alt|default('') }}" title="{{ image.title|default('') }}" />
                    </a>
                {% else %}
                    <img class="ui fluid image" src="{{ image.image }}" alt="{{ image.alt|default('') }}" title="{{ image.title|default('') }}" />
                {% endif %}
            </div>
        {% endfor %}
    </div>
</div>

{% if element.width is defined %}
    <div class="ui divider"></div>
    <div class="ui label"><i class="arrows alternate horizontal icon"></i> {{ element.width }}%</div>
{% endif %}

