webseite/templates/macros/blog.html
DO1JLR 391b9e3e76 Waffelupdates zum neuen Design
Former-commit-id: 18652fbea6ffa1879194c376f70307c1b09528f4 [formerly 28608f5f7650ae86cc13a2ea60b9ec2023833a45]
Former-commit-id: 113e10e57eb00b1ba268a560e0506042527ccd8d
2018-04-24 23:20:20 +02:00

40 lines
1.5 KiB
HTML

{% macro render_blog_post(post, from_index=false) %}
{% if from_index == True %}
<!-- Wrapper -->
<!-- <section id="wrapper"> -->
<header>
<div class="inner">
{% if from_index %}
<h2><a href="{{ post|url }}">{{ post.title }}</a></h2>
{% else %}
<h2>{{ post.title }}</h2>
{% endif %}
<p class="meta">Written by {%
if post.twitter_handle %}<a href="https://chaos.social/@{{ post.twitter_handle }}">{{ post.author or post.twitter_handle }}</a>{%
else %}{{ post.author }}{%
endif %} on {{ post.pub_date }}</p>
</div>
</header>
{% else %}
<section class="wrapper alt spotlight style2">
<div class="inner">
<div class="content">
<h2 class="major">{{ post.title }}</h2>
<p class="meta">Written by {%
if post.twitter_handle %}<a href="https://chaos.social/@{{ post.twitter_handle }}">{{ post.author or post.twitter_handle }}</a>{%
else %}{{ post.author }}{%
endif %} on {{ post.pub_date }}</p>
</div>
</section>
{% endif %}
<!-- Content -->
<div class="wrapper">
<div class="inner">
<h2 class="major">{{ post.subtitle }}</h2>
{{ post.body }}
</div>
</div>
<!-- </section>-->
{% endmacro %}