forked from DGNum/gestioCOF
Affichage des actus
This commit is contained in:
parent
0e19abb51a
commit
5a22b1cd37
3 changed files with 103 additions and 38 deletions
|
@ -14,13 +14,16 @@
|
|||
<section class="actulist">
|
||||
{% for actu in page.actus %}
|
||||
<article class="actu">
|
||||
<h2><a href="{% pageurl actu %}">{{ actu.title }}</a></h2>
|
||||
{% if actu.is_event %}
|
||||
<p>{{ actu.chapo }}</p>
|
||||
{% else %}
|
||||
{{ actu.body|safe|truncatewords_html:25 }}
|
||||
{% endif %}
|
||||
<a href="{% pageurl actu %}">Lire plus ></a>
|
||||
<div class="actu-image" {% if actu.image %}{% image actu.image fill-400x200 as img %}style="background-image:url('{{ img.url }}');"{% endif %}></div>
|
||||
<div class="actu-infos">
|
||||
<h2><a href="{% pageurl actu %}">{{ actu.title }}</a></h2>
|
||||
{% if actu.is_event %}
|
||||
<p><span class="actu-dates">{{ actu.dates|capfirst }}</span><br />{{ actu.chapo }}</p>
|
||||
{% else %}
|
||||
{{ actu.body|safe|truncatewords_html:25 }}
|
||||
{% endif %}
|
||||
<a href="{% pageurl actu %}">Lire plus ></a>
|
||||
</div>
|
||||
</article>
|
||||
{% endfor %}
|
||||
</section>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue