Merge branch 'master' of code.ungleich.ch:ungleich-public/ungleich-staticcms

This commit is contained in:
Nico Schottelius 2019-12-12 23:59:05 +01:00
commit b4027b82f5
3 changed files with 6 additions and 1 deletions

View file

@ -433,3 +433,8 @@ body {
width: 50%; width: 50%;
text-align: center; text-align: center;
} }
.blog-post-placeholder {
width: 240px;
height: 240px;
background-color: #eee;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 374 B

View file

@ -4,7 +4,7 @@
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">
{% set image = post.attachments.images.first() %} {% set image = post.attachments.images.first() %}
{% if from_index %}<h2><a href="{{ post|url }}"><img src="{% if image %}{{ image.thumbnail(240)|url }}{% else %}/u/static/images/blog-post-placeholder.png{% endif %}" alt=""/></a></h2>{% else %}<h2><img src="{% if image %}{{ image.thumbnail(240)|url }}{% else %}/u/static/images/blog-post-placeholder.png{% endif %}" alt=""/></h2>{% endif %} <h2><a href="{{ post|url }}">{% if image %}<img src="{{ image.thumbnail(240)|url }}" alt=""/>{% else %}<div class="blog-post-placeholder"></div>{% endif %}</a></h2>
</div> </div>
<div class="col-md-8"> <div class="col-md-8">
{% if from_index %}<a href="{{ post|url }}"><h2 class="post-title">{{ post.title }}</h2></a> {% if from_index %}<a href="{{ post|url }}"><h2 class="post-title">{{ post.title }}</h2></a>