djangocms_blog/djangocms_blog/templates/djangocms_blog/includes/blog_item.html

27 lines
1.1 KiB
HTML

{% load i18n thumbnail cms_tags %}
<article id="post-{{ post.slug }}" class="post-item">
<header>
<h3><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h3>
{% block blog_meta %}
{% include "djangocms_blog/includes/blog_meta.html" %}
{% endblock %}
</header>
{% if image and post.main_image %}
<div class="blog-visual">
{% thumbnail post.main_image post.thumbnail_options.size crop=post.thumbnail_options.crop upscale=post.thumbnail_options.upscale subject_location=post.main_image.subject_location as thumb %}
<img src="{{ thumb.url }}" alt="{{ post.main_image.default_alt_text }}" width="{{ thumb.width }}" height="{{ thumb.height }}" />
</div>
{% endif %}
<div class="blog-lead">
{% if not TRUNCWORDS_COUNT %}
{% render_model post "abstract" "" "" "safe" %}
{% else %}
{% render_model post "abstract" "" "" "truncatewords_html:TRUNCWORDS_COUNT|safe" %}
{% endif %}
</div>
<footer class="read-more">
<a href="{{ post.get_absolute_url }}">{% trans "read more" %} &raquo;</a>
</footer>
</article>