Commit cd0d059b authored by Mat's avatar Mat
Browse files

twig, layout, externalise navbar et footer

parent 6937bb2b
<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>
<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
</a>
<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>
</li>
#}
</ul>
<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>
......@@ -15,58 +15,9 @@
<header id="header">
{% 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
</a>
<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>
</li>
#}
</ul>
<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>
{% include '@Potage/Default/navbar.html.twig' %}
{% endblock %}
<div class="container"></div>
</header>
......@@ -74,11 +25,7 @@
{% block body %}
<aside>
{% block sidebar %}
{% endblock %}
{% block sidebar %}{% endblock %}
</aside>
<section>
{% block content %}
......@@ -101,23 +48,21 @@
{% endblock %}
<br class="clearfix"/>
<div class="container"></div>
</div>
{% block hero %}{% endblock %}
<footer id="footer">
<div class="container">
{% block footer %}
<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>
{% endblock %}
{% block footer %}
{% include '@Potage/Default/footer.html.twig' %}
{% endblock %}
<div class="container"></div>
</div>
</footer>
{% block javascripts %}
......
......@@ -10,6 +10,10 @@ body {
div#content {
margin: 2em;
}
footer#footer {
text-align: center;
margin-bottom: 2em;
}
form.formulaire {
margin: 1em auto;
padding: 2em;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment