{#

This file is part of the Sonata package.

(c) Thomas Rabaix <thomas.rabaix@sonata-project.org>

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.

#}

{% extends sonata_block.templates.block_base %}

{% block block %}
    {% sonata_template_box 'This is the gallery block. Feel free to override it.' %}

    <div class="{{ settings.class }}">
        {% if settings.title %}
            <h3>
                {% if settings.icon %}
                    <i class="{{ settings.icon }}" aria-hidden="true"></i>
                {% endif %}
                {% if settings.translation_domain %}
                    {{ settings.title|trans({}, settings.translation_domain) }}
                {% else %}
                    {{ settings.title }}
                {% endif %}
            </h3>
        {% endif %}

        {% for element in elements %}
            <div>
                {{ sonata_media(element.media, settings.format|default('reference')) }}
                <h4>{{ element.title }}</h4>
                <p>{{ element.caption }}</p>
            </div>
        {% endfor %}
    </div>
{% endblock block %}
