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

{% block css %}
    {{ parent() }}

    <link rel="stylesheet" href="{{ asset('bundles/wallabagcore/themes/baggy/css/ratatouille.css') }}" media="all">
    <link rel="stylesheet" href="{{ asset('bundles/wallabagcore/themes/baggy/css/font.css') }}" media="all">
    <link rel="stylesheet" href="{{ asset('bundles/wallabagcore/themes/baggy/css/main.css') }}" media="all">
    <link rel="stylesheet" href="{{ asset('bundles/wallabagcore/themes/baggy/css/messages.css') }}" media="all">
    <link rel="stylesheet" href="{{ asset('bundles/wallabagcore/themes/baggy/css/print.css') }}" media="print">
{% endblock %}

{% block scripts %}
    {{ parent() }}

    <script src="{{ asset('bundles/wallabagcore/themes/baggy/js/init.js') }}"></script>
    <script src="{{ asset('bundles/wallabagcore/themes/baggy/js/closeMessage.js') }}"></script>
    <script src="{{ asset('bundles/wallabagcore/themes/baggy/js/autoClose.js') }}"></script>
    <script src="{{ asset('bundles/wallabagcore/themes/baggy/js/saveLink.js') }}"></script>
    <script src="{{ asset('bundles/wallabagcore/themes/baggy/js/popupForm.js') }}"></script>
{% endblock %}

{% block header %}
    <header class="w600p center mbm">
        <h1 class="logo">
            {% block logo %}
                <img width="100" height="100" src="{{ asset('bundles/wallabagcore/themes/baggy/img/logo-w.png') }}" alt="wallabag logo" />
            {% endblock %}
        </h1>
    </header>
{% endblock %}

{% block menu %}
    <button id="menu" class="icon icon-menu desktopHide"><span>Menu</span></button>
    <ul id="links" class="links">
        <li><a href="{{ path('unread') }}">{{ 'menu.left.unread'|trans }}</a></li>
        <li><a href="{{ path('starred') }}">{{ 'menu.left.starred'|trans }}</a></li>
        <li><a href="{{ path('archive') }}">{{ 'menu.left.archive'|trans }}</a></li>
        <li><a href="{{ path('all') }}">{{ 'menu.left.all_articles'|trans }}</a></li>
        <li><a href="{{ path('tag') }}">{{ 'menu.left.tags'|trans }}</a></li>
        <li><a href="{{ path('new') }}">{{ 'menu.left.save_link'|trans }}</a></li>
        <!--<li style="position: relative;"><a href="javascript: void(null);" id="search">{{ 'menu.left.search'|trans }}</a>
            <div id="search-form" class="messages info popup-form">
                <form method="get" action="index.php">
                    <h2>{{ 'menu.left.search'|trans }}</h2>
                    <a href="javascript: void(null);" id="search-form-close" class="close-button--popup close-button">&times;</a>
                    <input type="hidden" name="view" value="search">
                    <input required placeholder="{{ 'menu.search_form.input_label'|trans }}" type="text" name="search" id="searchfield"><br>
                    <input id="submit-search" type="submit" value="{{ 'menu.left.search'|trans }}">
                </form>
            </div>
        </li>-->
        <li><a href="{{ path('config') }}">{{ 'menu.left.config'|trans }}</a></li>
        {% if is_granted('ROLE_SUPER_ADMIN') %}
            <li><a href="{{ path('craue_config_settings_modify') }}">{{ 'menu.left.internal_settings'|trans }}</a></li>
        {% endif %}
        <li><a href="{{ path('import') }}">{{ 'menu.left.import'|trans }}</a></li>
        <li><a href="{{ path('howto') }}">{{ 'menu.left.howto'|trans }}</a></li>
        <li><a href="{{ path('developer') }}">{{ 'menu.left.developer'|trans }}</a></li>
        <li><a href="{{ path('about') }}">{{ 'footer.wallabag.about'|trans }}</a></li>
        <li><a class="icon icon-power" href="{{ path('fos_user_security_logout') }}">{{ 'menu.left.logout'|trans }}</a></li>
    </ul>
{% endblock %}

{% block messages %}
    {% for flashMessage in app.session.flashbag.get('notice') %}
        <div class="messages success">
            <a href="#" class="closeMessage">×</a>
            <p>{{ flashMessage|trans }}</p>
        </div>
    {% endfor %}
{% endblock %}

{% block footer %}
    <footer class="w600p center mt3 mb3 smaller txtright">
        <p>{{ 'footer.wallabag.powered_by'|trans }} <a href="http://wallabag.org">wallabag</a></p>
    </footer>
{% endblock %}
