winkekatze.tv/templates/macros/blog.html
2022-01-16 05:17:43 +01:00

21 lines
725 B
HTML

{% macro render_blog_post(post, from_index=false) %}
<div class="blog-post">
{% if from_index -%}
<h2 class="headline"><a href="{{ post|url }}">{{ post.title }}</a></h2>
{% else -%}
<h2 class="headline"><a>{{ post.title }}</a></h2>
{% endif -%}
<p class="meta">
{% if post.event_start_date != post.event_end_date -%}
Vom {{ post.event_start_date | dateformat(('d. MMM'), locale=post.alt ) }} bis {{ post.event_end_date | dateformat('long', locale=post.alt) }}.
{%- else -%}
Am {{ post.event_start_date | dateformat('long', locale=post.alt) }}.
{%- endif %}
</p>
{% if from_index -%}
{{ post.preview }}
{% else -%}
{{ post.body }}
{% endif -%}
</div>
{% endmacro %}