public-health-ch/publichealth/home/templates/news.html

32 lines
876 B
HTML
Raw Normal View History

2017-03-14 10:10:32 +00:00
{% load wagtailcore_tags wagtailimages_tags puput_tags %}
2017-02-15 09:54:06 +00:00
<section id="news">
<div class="container">
<div class="row">
2017-05-09 10:21:38 +00:00
{% for entry in newsfeed %}
2017-02-15 09:54:06 +00:00
<div class="col-md-4 col-sm-6 col-xs-12">
<div class="panel panel-default">
2017-03-14 10:10:32 +00:00
{% if entry.header_image %}
{% image entry.header_image fill-360x270 %}
{% endif %}
2017-02-15 09:54:06 +00:00
<div class="panel-body">
2017-03-14 10:10:32 +00:00
<h3><span>{{ entry.title }}</span></h3>
<p>
{% if entry.excerpt %}
2017-05-09 10:21:38 +00:00
{{ entry.excerpt|striptags }}
{% else %}
{{ entry.body|striptags|truncatewords_html:70 }}
{% endif %}
2017-03-14 10:10:32 +00:00
</p>
<a href="{% pageurl entry %}" class="btn btn-default btn-xs">Mehr erfahren</a>
2017-02-15 09:54:06 +00:00
</div>
2017-03-14 10:10:32 +00:00
<a href="{% pageurl entry %}" class="fill"></a>
2017-02-15 09:54:06 +00:00
</div>
</div>
2017-03-14 10:10:32 +00:00
{% empty %}
No news today
2017-05-09 10:21:38 +00:00
{% endfor %}
2017-02-15 09:54:06 +00:00
</div>
</div>
2017-03-14 10:10:32 +00:00
</section>