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

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

{% block javascript %}
    {{ parent() }}
    <script async defer src="https://maps.googleapis.com/maps/api/js?key={{ google.apiKey }}" type="text/javascript"></script>
    <script src="{{ asset('templates/Front/default/assets/js/kontakt.js') }}"></script>
{% endblock %}

{% block breadcrumbs %}
    <section class="breadcrumbSection">
        <div class="grid-container">
            <div class="grid-x grid-padding-x">
                <div class="cell">
                    {{ wo_render_breadcrumbs() }}
                </div>
            </div>
        </div>
    </section>
{% endblock %}

{% block content %}
    <section class="articleContact">
        <div class="grid-container">
            <div class="grid-x grid-margin-x large-up-2">
                {% if page is not null %}
                    <div class="cell">
                        <h1>{{ page.title }}</h1>
                        <article class="fullContent">{{ page.content|raw }}</article>
                    </div>
                {% endif %}
                <div class="cell">
                    {% for message in app.flashes('contact.error') %}
                        <div class="callout alert">
                            {{ message }}
                        </div>
                    {% endfor %}
                    {% for message in app.flashes('contact.success') %}
                        <div class="callout success">
                            {{ message }}
                        </div>
                    {% else %}
                        <div class="formContact">
                            {{ form|raw }}
                        </div>
                    {% endfor %}
                </div>
            </div>
        </div>
    </section>

{% endblock %}
{% block footer %}
    <div style="margin-bottom: 70px"></div>
    {{ parent() }}
{% endblock %}
