aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
blob: 22d00a1e24c1aea9fb3ad67e7dd147761bb2914b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{% extends "WallabagCoreBundle::base.html.twig" %}

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

    <link rel="stylesheet" href="{{ asset('themes/material/css/materialize.min.css') }}"  media="screen,projection"/>
    <link rel="stylesheet" href="{{ asset('themes/material/css/main.css') }}" media="all">
    <link rel="stylesheet" href="{{ asset('themes/material/css/print.css') }}" media="print">
{% endblock %}

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

    <script src="{{ asset('themes/material/js/materialize.min.js') }}"></script>
    <script src="{{ asset('themes/material/js/init.js') }}"></script>
{% endblock %}

{% block header %}
{% endblock %}

{% block messages %}
    {% for flashMessage in app.session.flashbag.get('notice') %}
        <script>
            Materialize.toast('{{ flashMessage|trans }}', 4000);
        </script>
    {% endfor %}
{% endblock %}

{% block menu %}
    <nav class="cyan darken-1">
        <ul id="slide-out" class="side-nav fixed">
            {% block logo %}
                <li class="logo border-bottom">
                    <a class="waves-effect" title="{% trans %}Back to unread articles{% endtrans %}" href="{{ path('unread') }}">
                        <img src="{{ asset('themes/material/img/logo-square.png') }}" alt="wallabag logo" />
                    </a>
                </li>
            {% endblock %}

            {% set currentRoute = app.request.attributes.get('_route') %}

            <li class="bold {% if currentRoute == 'unread' or currentRoute == 'homepage' %}active{% endif %}"><a class="waves-effect" href="{{ path('unread') }}">{% trans %}unread{% endtrans %}</a></li>
            <li class="bold {% if currentRoute == 'starred' %}active{% endif %}"><a class="waves-effect" href="{{ path('starred') }}">{% trans %}starred{% endtrans %}</a></li>
            <li class="bold {% if currentRoute == 'archive' %}active{% endif %}"><a class="waves-effect" href="{{ path('archive') }}">{% trans %}archive{% endtrans %}</a></li>
            <li class="bold border-bottom {% if currentRoute == 'all' %}active{% endif %}"><a class="waves-effect" href="{{ path('all') }}">{% trans %}all{% endtrans %}</a></li>
            <li class="bold border-bottom {% if currentRoute == 'tags' %}active{% endif %}"><a class="waves-effect" href="{{ path('tag') }}">{% trans %}tags{% endtrans %}</a></li>
            <li class="bold {% if currentRoute == 'config' %}active{% endif %}"><a class="waves-effect" href="{{ path('config') }}">{% trans %}config{% endtrans %}</a></li>
            <li class="bold {% if currentRoute == 'howto' %}active{% endif %}"><a class="waves-effect" href="{{ path('howto') }}">{% trans %}howto{% endtrans %}</a></li>
            <li class="bold border-bottom {% if currentRoute == 'about' %}active{% endif %}"><a class="waves-effect" href="{{ path('about') }}">{% trans %}About{% endtrans %}</a></li>
            <li class="bold"><a class="waves-effect" class="icon icon-power" href="{{ path('logout') }}" title="{% trans %}logout{% endtrans %}">{% trans %}logout{% endtrans %}</a></li>
        </ul>
        <div class="nav-wrapper nav-panels">
            <a href="#" data-activates="slide-out" class="nav-panel-menu button-collapse"><i class="mdi-navigation-menu"></i></a>
            <div class="left action">
                {% block title %}
                {% endblock %}
            </div>
            <div class="input-field nav-panel-buttom">
                <ul>
                    <li class="bold"><a title="{% trans %}Add a new entry{% endtrans %}" class="waves-effect" href="{{ path('new') }}" id="nav-btn-add"><i class="mdi-content-add"></i></a></li>
                    <li><a title="{% trans %}Search{% endtrans %}" class="waves-effect" href="javascript: void(null);" id="nav-btn-search"><i class="mdi-action-search"></i></a>
                    <li id="button_filters"><a title="{% trans %}Filter entries{% endtrans %}" href="#" data-activates="filters" class="nav-panel-menu button-collapse-right"><i class="mdi-content-filter-list"></i></a></li>
                </ul>
            </div>
            <form method="get" action="index.php">
                <div class="input-field nav-panel-search" style="display: none">
                    <input name="search" id="searchfield" type="search" required placeholder="{% trans %}Enter your search here{% endtrans %}">
                    <label for="search"><i class="mdi-action-search"></i></label>
                    <i class="mdi-navigation-close"></i>
                </div>
            </form>
            <div class="input-field nav-panel-add" style="display: none">
                {{ render(controller( "WallabagCoreBundle:Entry:addEntryForm" )) }}
                <label for="add" class="active"><i class="mdi-content-add"></i></label>
                <i class="mdi-navigation-close"></i>
            </div>
        </div>
    </nav>
{% endblock %}