layout.html.twig 5.44 KB
Newer Older
1
2
3
4
5
6
{% extends "base.html.twig" %}

{% block title %}
    Application Potage
{% endblock %}

Mat's avatar
Mat committed
7
8
9
{% block stylesheets %}
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
{% endblock %}
10

Mat's avatar
Mat committed
11
12
{% block bodyParam %}{{ app.request.get('_route')|replace({'potage_': ''}) }}
{% endblock %}
13
14
15
16

{% block layout %}
    <header id="header">

Mat's avatar
Mat committed
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
        {% block header %}

            <nav class="navbar navbar-expand-lg navbar-dark bg-dark">

                <a class="navbar-brand" href="#">Potage</a>

                <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>

                <div class="collapse navbar-collapse" id="navbarSupportedContent">

                    <ul class="navbar-nav mr-auto">
                        <li class="nav-item {{ app.request.get('_route') == 'potage_homepage' ? 'active' }}">
                            <a class="nav-link" href="{{ path('potage_homepage') }}">Accueil
                                <span class="sr-only">(current)</span></a>
                        </li>
                        <li class="nav-item {{ app.request.get('_route') == 'potage_legume_read' ? 'active' }}">
                            <a class="nav-link" href="{{ path('potage_legume_read') }}">Les légumes
                                <span class="sr-only">(current)</span></a>
                        </li>
                        {#
                        <li class="nav-item">
                            <a class="nav-link" href="#">Link</a>
                        </li>
                        <li class="nav-item dropdown">
                            <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                Dropdown
45
                            </a>
Mat's avatar
Mat committed
46
47
48
49
50
51
52
53
54
                            <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                                <a class="dropdown-item" href="#">Action</a>
                                <a class="dropdown-item" href="#">Another action</a>
                                <div class="dropdown-divider"></div>
                                <a class="dropdown-item" href="#">Something else here</a>
                            </div>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link disabled" href="#">Disabled</a>
55
                        </li>
Mat's avatar
Mat committed
56
                        #}
57
58
                    </ul>

Mat's avatar
Mat committed
59
60
61
62
63
64
65
66
67
68
69
70
71
                    <form class="form-inline my-2 my-lg-0">
                        <input class="form-control mr-sm-2" type="search" placeholder="Rechercher" aria-label="Search">
                        {#
                        <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Go !</button>
                        #}
                    </form>

                </div>
            </nav>

        {% endblock %}
        <div class="container"></div>

72
73
74
    </header>
    <div id="content">

75
76
77
        {% block body %}
            <aside>
                {% block sidebar %}
78

Mat's avatar
Mat committed
79

80

81
82
83
84
                {% endblock %}
            </aside>
            <section>
                {% block content %}
85

86
87
88
89
90
91
92
93
94
                    {% block breadcrumb %}
                        <nav aria-label="breadcrumb">
                            <ol class="breadcrumb">
                                <li class="breadcrumb-item">
                                    <a href="{{ path('potage_homepage') }}">Accueil</a>
                                </li>
                                <li class="breadcrumb-item active" aria-current="page">{{ block('title') }}</li>
                            </ol>
                        </nav>
95
96
                    {% endblock %}

97
98
99
100
                    <h1>{{ block('title') }}</h1>

                {% endblock %}
            </section>
101

102
103
104
        {% endblock %}
        <br class="clearfix"/>
        <div class="container"></div>
105
106
107
108
109
110
111
112
    </div>

    {% block hero %}{% endblock %}

    <footer id="footer">
        <div class="container">

            {% block footer %}
Mat's avatar
Mat committed
113
114
115
116
117
                <a href="http://mathieu.actic.be">Tchama</a>
                2018 — propulsé par
                <a href="https://symfony.com/doc/current/index.html" target="_blank">Symfony 3</a>
                — habillé avec
                <a href="https://twig.symfony.com/doc/2.x/" target="_blank">Twig</a>
118
119
120
121
122
123
            {% endblock %}

        </div>
    </footer>

    {% block javascripts %}
Mat's avatar
Mat committed
124
125
126
        <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
        <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T" crossorigin="anonymous"></script>
127
128
129
130
        <script src="{{ asset('js/script.js') }}"></script>
    {% endblock %}

{% endblock %}