webseite/templates/macros/blog.html
DO1JLR defa91d0a8 Update
Former-commit-id: 363a5eddb3949e1172f9f5f27cf06c869c244e76
2018-03-22 17:31:24 +01:00

20 lines
536 B
HTML

{% macro render_blog_post(post, from_index=false) %}
<div class="blog-post">
{% if from_index %}
<h2><a href="{{ post|url }}#Cyber">{{ post.title }}</a></h2>
{% else %}
<h2>{{ post.title }}</h2>
{% endif %}
<p class="meta">
written by
{% if post.twitter_handle %}
<a href="https://twitter.com/{{ post.twitter_handle
}}">{{ post.author or post.twitter_handle }}</a>
{% else %}
{{ post.author }}
{% endif %}
on {{ post.pub_date }}
</p>
{{ post.body }}
</div>
{% endmacro %}