Simplify logic to show thumbnail in the blog post list
- loads thumbnail from css style instead of placeholder image - to change the color of the thumbnail refer blog-post-placeholder class at the bottom of clean-blog.css
This commit is contained in:
parent
3b02e29d41
commit
fa965bd3f8
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@
|
|||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
{% 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 class="col-md-8">
|
||||
{% if from_index %}<a href="{{ post|url }}"><h2 class="post-title">{{ post.title }}</h2></a>
|
||||
|
|
Loading…
Reference in a new issue