webseite/templates/macros/blog.html
DO1JLR 0d2fe507a1 Change title!
Former-commit-id: 277c2b49861fdc08fa2151b754a91de7b809266f [formerly 66d0093533dd27aabdf5051a2a54b068efacc786] [formerly d42de5e60c3d7cdb0f8d2d60bbfe3d799e2e4530 [formerly e44cfdfe0e598b2b3a9373de778530e9366358cb]]
Former-commit-id: 4a0534d0b41cb89ac2bcc384ec81f04df39df254 [formerly 2e8e31b4530b8c0c784209e6f6f78a093f9981a4]
Former-commit-id: 86f32c79b6ac6c4ff6a4c3d1a3ec90f4ca45c521
2018-05-14 20:48:56 +02:00

46 lines
1.7 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 }}
{% if from_index == False %}
{{ post.privatebody }}
{% else %}
<h2 class="major">Weiterlesen:</h2>
<a class="button special fit" href="{{ post|url }}">{{ post.title }}</a>
{% endif %}
</div>
</div>
<!-- </section>-->
{% endmacro %}