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

21 lines
723 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('long', 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 -%}