templating

This commit is contained in:
Simon Vieille 2015-05-22 22:37:41 +02:00
parent 6dbea5af2d
commit 448c2e37d1
6 changed files with 118 additions and 81 deletions

View file

@ -6,16 +6,22 @@
<li>{{ render_block('title') }}</li>
{% endblock %}
{% block body %}
<article class="post">
<header>
<h1>{{ render_block('title') }}</h1>
{% if render_block('subtitle') %}
<h2>{{ render_block('subtitle') }}</h2>
{% endif %}
</header>
</article>
<div class="page-content">{{ render_block('content1')|post }}</div>
{% block header_title %}
{{ render_block('title') }}
{% endblock %}
{% block header_subtitle %}
<h2>{{ render_block('subtitle') }}</h2>
{% endblock %}
{% block body %}
<article>
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
{{ render_block('content1')|post }}
</div>
</div>
</div>
</article>
{% endblock %}

View file

@ -11,6 +11,13 @@
{% endif %}
{% endblock %}
{% block header_title %}
{{ page.object }}
{% endblock %}
{% block header_subtitle %}
{% endblock %}
{% block body %}
{% if page.pager.nbResults == 0 %}
<div class="alert alert-info">Aucun article disponible.</div>

View file

@ -10,6 +10,9 @@
{{ page.object.title }}
{% endblock %}
{% block header_subtitle %}
{% endblock %}
{% block body %}
{% set post = page.object %}

View file

@ -11,6 +11,13 @@
{% endif %}
{% endblock %}
{% block header_title %}
#{{ page.object }}
{% endblock %}
{% block header_subtitle %}
{% endblock %}
{% block body %}
{% if page.pager.nbResults == 0 %}
<div class="alert alert-info">Aucun article disponible.</div>

View file

@ -6,13 +6,17 @@
<li>Contact</li>
{% endblock %}
{% block header_title %}
{{ render_block('title') }}
{% endblock %}
{% block header_subtitle %}{% endblock %}
{% block body %}
<article>
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<h1>{{ render_block('title') }}</h1>
{{ render_block('content1') }}
<hr />

View file

@ -6,14 +6,24 @@
<li>{{ render_block('title') }}</li>
{% endblock %}
{% block body %}
<article class="post">
<header>
<h1>{{ render_block('title') }}</h1>
</header>
</article>
{% block header_title %}
{{ render_block('title') }}
{% endblock %}
<div class="page-content">{{ render_block('content1')|transform_url }}</div>
{% block header_subtitle %}
<h2>{{ render_block('subtitle') }}</h2>
{% endblock %}
{% block body %}
<article>
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
{{ render_block('content1')|post }}
</div>
</div>
</div>
</article>
{% endblock %}
{% import _self as macros %}