{% extends "@templates/"~template~"/view/base.html.twig" %}

{% block meta %}{{ getMeta(page) }}{% endblock %}

{% block javascript %}
<script src="{{ asset('media/Public/vendor/lightbox/dist/js/lightbox.min.js') }}"></script>
    {{ parent() }}
{% endblock %}

{% block content %}
    <section class="article">
        <div class="grid-container">
            <div class="grid-x grid-margin-x">
                <div class="cell">
                    <h1>{{ page.title }}</h1>
                </div>
            </div>
            <div class="grid-x grid-margin-x">
                <div class="cell">
                    <article class="fullContent">{{ page.content|raw }}</article>
                </div>
            </div>
            {% if page.gallery %}
                <div class="grid-x grid-margin-x">
                    {% for photo in page.gallery.photos %}
                        <a href="{{ asset(photo.photo) }}" title="{{ photo.title }}" data-lightbox="lightbox" data-title="{{ photo.title }}" data-alt="{{ photo.title }}">
                            <img src="{{ asset(photo.photo('thumbnailS')) }}" alt="{{ photo.title }}" />
                        </a>
                    {% endfor %}
                </div>
            {% endif %}
        </div>
    </section>
{% endblock %}
