{% extends "::base.html.twig" %}

{% block stylesheets %}
    <link rel="stylesheet" href="{{ asset('templates/Front/'~template~'/assets/css/app.css' ~ vStyle) }}">
{% endblock %}

{% block vavicon %}
    {{ parent() }}
{% endblock %}

{% block javascript %}{% endblock %}

{% block body %}
    {% block header %}
        <header>
            <div class="title-bar" data-responsive-toggle="responsive-menu" data-hide-for="medium">
                <button class="menu-icon" type="button" data-toggle="responsive-menu"></button>
                <div class="title-bar-title">Menu</div>
            </div>

            <div class="top-bar">
                <div class="top-bar-right">
                    <div class="blockInfoContact">
                        {% for block in getBlock(1, 1) %}
                            {{ block.content|raw }}
                        {% endfor %}
                    </div>
                </div>
                <div class="top-bar-right">
                    <ul class="dropdown menu" data-dropdown-menu>
                        {% if app.user and is_granted('ROLE_USER') %}
                            <li>
                                <a href="{{ path('wi_front_user_dashboard') }}" title="Twoje konto">Witaj, {{ profile ? profile.firstName ~ ' ' ~ profile.lastName : app.user.email }}</a>
                                <ul class="menu">
                                    <li>
                                        <a href="{{ path('wi_front_user_dashboard') }}" title="Twoje konto">Twoje konto</a>
                                    </li>
                                    <li>
                                        <a href="{{ path('wi_front_user_edit') }}" title="Edytuj profil">Edytuj profil</a>
                                    </li>
                                    <li>
                                        <a href="{{ path('wi_front_user_logout') }}" title="Wyloguj">Wyloguj</a>
                                    </li>
                                </ul>
                            </li>
                        {% else %}
                        <li>
                            <a href="{{ path('wi_front_user_register') }}" title="Zarejestru się"><span>Zarejestruj się</span></a>
                        </li>
                        <li>
                            <a href="{{ path('wi_front_user_login') }}" title="Zaloguj się"><span>Zaloguj się</span></a>
                        </li>
                        {% endif %}
                    </ul>
                </div>
            </div>
            <div class="top-bar" id="responsive-menu">
                <div class="top-bar-left">
                    <a href="{{ path('homepage') }}" title="{{ getMetaArrayValues()['title'] }}">
                        <img src="{{ asset('templates/Front/'~template~'/assets/img/WEBimpuls-logo-2015-200px.png') }}" alt="{{ getMetaArrayValues()['title'] }}">
                    </a>
                </div>
                <div class="top-bar-right">
                    <nav class="mainMenu">
                        {{ getMenu(1, {'template': '@templates/'~template~'/view/Components/knp_menu/knp_menu_foundation_dropdown.html.twig'}) }}
                    </nav>
                </div>
                <div class="top-bar-right">
                    <form action="{{ path('wi_front_core_search_index') }}" class="searchForm" method="get">
                        <ul class="menu">
                            <li><input type="search" name="search" placeholder="Szukaj" id="search"></li>
                            <li><button type="submit" class="button">Szukaj</button></li>
                        </ul>
                    </form>
                </div>
            </div>
        </header>
    {% 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 %}{% endblock %}
    {% block footer %}
        <foooter>
            <div class="grid-container">
                <div class="grid-x">
                    <div class="cell">
                        <nav class="menuFooter">
                            {{ getMenu(2, {'template': '@templates/'~template~'/view/Components/knp_menu/knp_menu_foundation_dropdown.html.twig'}) }}
                        </nav>
                    </div>
                </div>
            </div>
            <div class="footerInfo">
                <div class="grid-container">
                    <div class="grid-x small-up1 medium-up-2 grid-margin-x">
                        <div class="cell">
                            <a href="{{ path('homepage') }}" title="{{ getMetaArrayValues()['title'] }}">
                                <img src="{{ asset('templates/Front/'~template~'/assets/img/WEBimpuls-logo-2015-200px.png') }}" alt="{{ getMetaArrayValues()['title'] }}">
                            </a>
                        </div>
                        <div class="cell">
                            {% for block in getBlock(2, 1) %}
                                {{ block.content|raw }}
                            {% endfor %}
                        </div>
                    </div>
                </div>
            </div>
        </foooter>
    {% endblock %}
{% endblock %}