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

{% block javascript %}
    {{ parent() }}
    <script src="{{ asset('media/Public/vendor/OwlCarousel2-2.2.1/dist/owl.carousel.min.js') }}"></script>
    <script src="{{ asset('templates/Front/habitat/assets/js/home.js') }}"></script>
{% endblock %}

{% block content %}
    <section class="banner">
        <div class="bannerCarousel owl-carousel owl-theme">
            {% for banner in getBanners(1) %}
                <div class="item">
                    <div class="bannerImg">
                        <img src="{{ asset('media/assets/Banner/'~banner.imageURL) }}" alt="">
                    </div>
                    <div class="bannerInfo">
                        {{ banner.content|raw }}
                    </div>
                </div>
            {% endfor %}
        </div>
    </section>
    <section class="frontPage">
        <article>
            {{ page.content|raw }}
        </article>
        <section class="frontNews frontNewsPage">
            <div class="grid-container">
                <div class="cell">
                    <h1 style="text-align: center;">Projekty</h1>
                    </div>
                <div class="grid-x grid-margin-x grid-margin-y">
                    {% for news in getNews(3, 2) %}
                        <div class="cell medium-6 large-6">
                            <div class="frontNewsSingle">
                                <div class="newsFrontTitle">
                                    <p>{{ news.title }}</p>
                                </div>
                                <div class="newsFrontShortcut">
                                    <p style="text-align: justify">{{ news.shortcut[:200]  }}...</p>
                                </div>
                                <div class="newsFrontMore">
                                    <a class="button" href="{{ getCanonical(news) }}">więcej...</a>
                                </div>
                            </div>
                        </div>
                    {% endfor %}
                </div>
            </div>
        </section>
        <section class="frontReferences">
            <div class="grid-container">
                <div class="cell">
                {% for block in getBlock(5, 1) %}
                    {{ block.content|raw }}
                {% endfor %}
            </div> </div>
        </section>
        <section class="frontContact">
            <div class="grid-container">
                <div class="grid-x grid-margin-x grid-margin-y">
                    {% for block in getBlock(6, 1) %}
                        {{ block.content|raw }}
                    {% endfor %}
                </div>
            </div>
        </section>
    </section>

{% endblock %}
