chaoswest.tv/templates/macros/blog.html

22 lines
723 B
HTML
Raw Normal View History

2022-01-20 23:51:09 +01:00
{%- 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 -%}