public-health-ch/publichealth/home/templates/news.html
2017-07-03 17:21:31 +02:00

31 lines
888 B
HTML

{% load wagtailcore_tags wagtailimages_tags puput_tags %}
<section id="news">
<div class="container">
<div class="row">
{% for entry in blogentries %}
<div class="col-md-4 col-sm-6 col-xs-12">
<div class="panel panel-default">
{% if entry.header_image %}
{% image entry.header_image fill-360x270 %}
{% endif %}
<div class="panel-body">
<h3><span>{{ entry.title }}</span></h3>
<p>
{% if entry.excerpt %}
{{ entry.excerpt|striptags }}
{% else %}
{{ entry.body|striptags|truncatewords_html:40 }}
{% endif %}
</p>
<a href="{% pageurl entry %}" class="btn btn-default btn-xs">Mehr erfahren</a>
</div>
<a href="{% pageurl entry %}" class="fill"></a>
</div>
</div>
{% empty %}
<!-- No news today -->
{% endfor %}
</div>
</div>
</section>