Un seul modèle pour les actus

This commit is contained in:
Evarin 2018-01-22 21:24:20 +01:00
parent 8551ffcfd3
commit 8488beeb4e
10 changed files with 120 additions and 183 deletions

View file

@ -1,17 +0,0 @@
{% extends "cofcms/base.html" %}
{% load wagtailimages_tags cofcms_tags %}
{% block content %}
<section class="intro">
<h1>{{ page.title }}</h1>
<p class="date">A lieu {{ page.dates }}</p>
<p>{{ page.chapo }}</p>
</section>
<section class="pagecontent">
{% image page.image width-700 %}
<article>
{{ page.body|safe }}
</article>
</section>
{% endblock %}

View file

@ -27,7 +27,7 @@
{% if actu.is_event %}
<p><span class="actu-dates">{{ actu.dates|capfirst }}</span><br />{{ actu.chapo }}</p>
{% else %}
{{ actu.body|safe|truncatewords_html:25 }}
{{ actu.body|safe|truncatewords_html:15 }}
{% endif %}
<a href="{% pageurl actu %}">Lire plus &gt;</a>
</div>

View file

@ -4,7 +4,8 @@
{% block content %}
<section class="intro">
<h1>{{ page.title }}</h1>
<p class="date">Publié le {{ page.date }}</p>
<p class="date">A lieu {{ page.dates }}</p>
<p>{{ page.chapo }}</p>
</section>
<section class="pagecontent">

View file

@ -22,7 +22,7 @@
{% get_current_language as curlang %}
<span class="actu-minical">{% mini_calendar actu curlang %}</span><span class="actu-dates">{{ actu.dates }}</span>
{% else %}
{{ actu.body|safe|truncatewords_html:25 }}
{{ actu.body|safe|truncatewords_html:10 }}
{% endif %}
</div>
<a href="{% pageurl actu %}" class="actu-overlay"></a>