Commit 80a65c99 authored by Mat's avatar Mat
Browse files

twig, réorganise la chaine base->layout->page

parent 77ac6533
......@@ -2,12 +2,21 @@
<html>
<head>
<meta charset="UTF-8" />
<title>{% block title %}Welcome!{% endblock %}</title>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.10/css/all.css" integrity="sha384-+d0P83n9kaQMCwj8F4RJB66tzIwOKmrdb46+porD/OvrJ+37WqIM7UoBtwHO6Nlg" crossorigin="anonymous">
{% block stylesheets %}{% endblock %}
<link rel="stylesheet" type="text/css" href="{{ asset('css/style.css') }}">
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
</head>
<body>
{% block body %}{% endblock %}
<body id="{% block bodyParam %}{% endblock %}">
{% block layout %}{% endblock %}
{% block javascripts %}{% endblock %}
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>{% block title %}Welcome!{% endblock %}</title>
{% block stylesheets %}
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.10/css/all.css" integrity="sha384-+d0P83n9kaQMCwj8F4RJB66tzIwOKmrdb46+porD/OvrJ+37WqIM7UoBtwHO6Nlg" crossorigin="anonymous">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="{{ asset('css/style.css') }}">
{% extends "base.html.twig" %}
{% endblock %}
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
</head>
<body id="office">
<h1>Backoffice</h1>
{% block menu %}
<h3>Menu</h3>
<ul class="fa-ul">
<li><span class="fa-li"><i class="fas fa-arrow-left"></i></span><a href="{{ path('techno_homepage') }}">Accueil</a></li>
<li><span class="fa-li"><i class="fas fa-th-list"></i></span><a href="{{ path('asso_association_read') }}">Les associations</a></li>
<li><span class="fa-li"><i class="fas fa-th-list"></i></span><a href="{{ path('asso_membre_read') }}">Les membres</a></li>
{% block title %}
AssoBundle
{% endblock %}
<li><span class="fa-li"><i class="fas fa-plus"></i></span><a href="{{ path('asso_association_create') }}">Ajouter une association</a></li>
<li><span class="fa-li"><i class="fas fa-plus"></i></span><a href="{{ path('asso_membre_create') }}">Ajouter un membre</a></li>
</ul>
{% endblock %}
{% 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 %}
{% block body %}{% endblock %}
{% block javascripts %}{% endblock %}
{% block bodyParam %}office{% endblock %}
{# Debug
{{ dump() }}
#}
</body>
</html>
{% block layout %}
<h1>Backoffice</h1>
{% block menu %}
<h3>Menu</h3>
<ul class="fa-ul">
<li><span class="fa-li"><i class="fas fa-arrow-left"></i></span><a href="{{ path('techno_homepage') }}">Accueil</a></li>
<li><span class="fa-li"><i class="fas fa-th-list"></i></span><a href="{{ path('asso_association_read') }}">Les associations</a></li>
<li><span class="fa-li"><i class="fas fa-th-list"></i></span><a href="{{ path('asso_membre_read') }}">Les membres</a></li>
<li><span class="fa-li"><i class="fas fa-plus"></i></span><a href="{{ path('asso_association_create') }}">Ajouter une association</a></li>
<li><span class="fa-li"><i class="fas fa-plus"></i></span><a href="{{ path('asso_membre_create') }}">Ajouter un membre</a></li>
</ul>
{% endblock %}
{% block body %}{% endblock %}
{% block javascripts %}{% endblock %}
{# Debug
{{ dump() }}
#}
{% endblock %}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>{% block title %}Welcome!{% endblock %}</title>
{% block stylesheets %}
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.10/css/all.css" integrity="sha384-+d0P83n9kaQMCwj8F4RJB66tzIwOKmrdb46+porD/OvrJ+37WqIM7UoBtwHO6Nlg" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="{{ asset('css/style.css') }}">
{% endblock %}
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
</head>
<body id="{{ app.request.get('_route')|replace({'techno_': ''}) }}">
<header id="header">
<div class="container">
{% block header %}
<div class="accueil">
<h1>Agence Touris</h1>
<h3>la dernière chance du moment</h3>
</div>
<nav id="mainnav">
{% extends "base.html.twig" %}
{% block title %}
TechnoBundle
{% endblock %}
{% block stylesheets %}{% endblock %}
{% block bodyParam %}{{ app.request.get('_route')|replace({'techno_': ''}) }}{% endblock %}
{% block layout %}
<header id="header">
<div class="container">
{% block header %}
<div class="accueil">
<h1>Agence Touris</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>
</ul>
</nav>
{% endblock %}
</div>
</header>
<div id="content">
<div class="container">
{% block body %}
<aside>
{% block sidebar %}
<h3>Albums</h3>
<ul>
<li class="{{ app.request.get('_route') == 'techno_homepage' ? 'active' }}">
<a href="{{ path('techno_homepage') }}">
Accueil
<li class="{{ app.request.get('_route') == 'techno_owner_read' ? 'active' }}">
<a href="{{ path('techno_owner_read') }}">
<i class="fas fa-users"></i> Les auteurs
</a>
</li>
<li class="{{ app.request.get('_route') == 'techno_hello' ? 'active' }}">
<a href="{{ path('techno_hello', {'name': "Emile"}) }}">
Hello
{#
<li class="{{ app.request.get('_route') == 'techno_dump' ? 'active' }}">
<a href="{{ path('techno_dump') }}">
<i class="fas fa-table"></i> Table Image
</a>
</li>
<li class="{{ app.request.get('_route') == 'techno_gallery_read' ? 'active' }}">
<a href="{{ path('techno_gallery_read') }}">
Galerie
#}
<li class="{{ app.request.get('_route') == 'techno_gallery_create' ? 'active' }}">
<a href="{{ path('techno_gallery_create') }}">
<i class="fas fa-plus"></i> Ajouter une image
</a>
</li>
<li class="{{ app.request.get('_route') == 'techno_owner_create' ? 'active' }}">
<a href="{{ path('techno_owner_create') }}">
<i class="fas fa-plus"></i> Ajouter un auteur
</a>
</li>
</ul>
<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>
</nav>
{% endblock %}
</div>
</header>
<div id="content">
<div class="container">
{% block body %}
<aside>
{% block sidebar %}
<h3>Albums</h3>
<ul>
<li class="{{ app.request.get('_route') == 'techno_owner_read' ? 'active' }}">
<a href="{{ path('techno_owner_read') }}">
<i class="fas fa-users"></i> Les auteurs
</a>
</li>
{#
<li class="{{ app.request.get('_route') == 'techno_dump' ? 'active' }}">
<a href="{{ path('techno_dump') }}">
<i class="fas fa-table"></i> Table Image
</a>
</li>
#}
<li class="{{ app.request.get('_route') == 'techno_gallery_create' ? 'active' }}">
<a href="{{ path('techno_gallery_create') }}">
<i class="fas fa-plus"></i> Ajouter une image
</a>
</li>
<li class="{{ app.request.get('_route') == 'techno_owner_create' ? 'active' }}">
<a href="{{ path('techno_owner_create') }}">
<i class="fas fa-plus"></i> Ajouter un auteur
</a>
</li>
</ul>
<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 %}
</aside>
<section>
{% block content %}
{% block breadcrumb %}
<span class="breadcrumb">
<i class="fas fa-caret-right fa-xs fa-fw"></i>
<a href="{{ path('techno_homepage') }}">Accueil</a>
<i class="fas fa-caret-right fa-xs fa-fw"></i>
<a href="">{{ block('title') }}</a>
</span>
{% endblock %}
</aside>
<section>
{% block content %}
{% block breadcrumb %}
<span class="breadcrumb">
<i class="fas fa-caret-right fa-xs fa-fw"></i>
<a href="{{ path('techno_homepage') }}">Accueil</a>
<i class="fas fa-caret-right fa-xs fa-fw"></i>
<a href="">{{ block('title') }}</a>
</span>
{% endblock %}
<h1>{{ block('title') }}</h1>
<h1>{{ block('title') }}</h1>
{% endblock %}
</section>
{% endblock %}
</section>
{% endblock %}
<br class="clearfix" />
</div>
</div>
{% endblock %}
<br class="clearfix" />
{% 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>
{{ 'now'|date('U') }}
<a href="{{ path('asso_association_read')}}">Admin Asso</a>
{% endblock %}
</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>
{{ 'now'|date('U') }}
<a href="{{ path('asso_association_read')}}">Admin Asso</a>
{% endblock %}
</div>
</footer>
{% block javascripts %}
<script src="{{ asset('js/script.js') }}"></script>
{% endblock %}
</body>
</html>
</footer>
{% block javascripts %}
<script src="{{ asset('js/script.js') }}"></script>
{% endblock %}
{% endblock %}
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