Commit 4209708d authored by Mat's avatar Mat

twig, externalise des parties du template avec des includes

* footer et barnav dans des fichiers séparés
parent 7991de3b
<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>
{{ 'now'|date('U') }}
<a href="{{ path('asso_association_read')}}">Admin Asso</a>
<nav id="mainnav">
<ul>
<li class="{{ app.request.get('_route') == 'techno_homepage' ? 'active' }}">
<a href="{{ path('techno_homepage') }}">
Accueil
</a>
</li>
<li class="{{ app.request.get('_route') == 'techno_hello' ? 'active' }}">
<a href="{{ path('techno_hello', {'name': "Emile"}) }}">
Hello
</a>
</li>
<li class="{{ app.request.get('_route') == 'techno_gallery_read' ? 'active' }}">
<a href="{{ path('techno_gallery_read') }}">
Galerie
</a>
</li>
<li class="{{ app.request.get('_route') == 'techno_owner_main_display' ? 'active' }}">
<a href="{{ path('techno_owner_main_display') }}">
Ajax
</a>
</li>
</ul>
</nav>
......@@ -11,7 +11,6 @@
{% block layout %}
<header id="header">
<div class="container">
{% block header %}
{% include '@Techno/Default/login.html.twig' %}
......@@ -20,32 +19,10 @@
<h1>cassis</h1>
<h3>la dernière chance du moment</h3>
</div>
<nav id="mainnav">
<ul>
<li class="{{ app.request.get('_route') == 'techno_homepage' ? 'active' }}">
<a href="{{ path('techno_homepage') }}">
Accueil
</a>
</li>
<li class="{{ app.request.get('_route') == 'techno_hello' ? 'active' }}">
<a href="{{ path('techno_hello', {'name': "Emile"}) }}">
Hello
</a>
</li>
<li class="{{ app.request.get('_route') == 'techno_gallery_read' ? 'active' }}">
<a href="{{ path('techno_gallery_read') }}">
Galerie
</a>
</li>
<li class="{{ app.request.get('_route') == 'techno_owner_main_display' ? 'active' }}">
<a href="{{ path('techno_owner_main_display') }}">
Ajax
</a>
</li>
</ul>
</nav>
{% endblock %}
{% include '@Techno/Default/navbar.html.twig' %}
{% endblock %}
</div>
</header>
<div id="content">
......@@ -85,8 +62,6 @@
<h3>Liens</h3>
<ul>
<li><a href="../../../../0ne/index.php">0ne</a></li>
<li><a href="#">bam</a></li>
<li><a href="#">boum</a></li>
</ul>
{% endblock %}
......@@ -105,18 +80,17 @@
<h1>{{ block('title') }}</h1>
{% if app.request.hasPreviousSession %}
{% for type, messages in app.session.flashbag.all() %}
{% for message in messages %}
<div class="flash-{{ type }}">
{{ message }}
</div>
<div class="foslogin">
{% if app.request.hasPreviousSession %}
{% for type, messages in app.session.flashbag.all() %}
{% for message in messages %}
<div class="flash-{{ type }}">
{{ message }}
</div>
{% endfor %}
{% endfor %}
{% endfor %}
{% endif %}
{% endif %}
<div>
{% block fos_user_content %}
{% endblock fos_user_content %}
</div>
......@@ -136,15 +110,11 @@
<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>
{{ 'now'|date('U') }}
<a href="{{ path('asso_association_read')}}">Admin Asso</a>
{% endblock %}
{% include '@Techno/Default/footer.html.twig' %}
{% endblock %}
</div>
</footer>
......
Markdown is supported
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