webseite/templates/macros/blog.html
L3D bf819ce751 Add Multi-Language-Support
Former-commit-id: a1e40b8f24afcf4f526b99a1940edb4d9c48fa93 [formerly ca299ec0c502c0ca199d714f2649f6acf22ac600] [formerly c0f325840f841c11d58424d72758a81a76b5b578 [formerly 08ab5bb8927d8417c3b4b79c23eb8e40322ad1d6]]
Former-commit-id: a25f395f3f751e47c4ca59631439e6725243c0aa [formerly 59b7d6939b4a0d6e7d62726049861dd00a05d9c9]
Former-commit-id: 4f7560ba8268809bd50d7719bde943cbb1443195
2018-10-12 19:19:16 +02:00

46 lines
1.8 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">Geschrieben von {%
if post.twitter_handle %}<a href="https://chaos.social/@{{ post.twitter_handle }}">{{ post.author or post.twitter_handle }}</a>{%
else %}{{ post.author }}{%
endif %} am {{ post.pub_date.strftime('%d. %m. %Y') }}</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">Verfasst von {%
if post.twitter_handle %}<a href="https://chaos.social/@{{ post.twitter_handle }}">{{ post.author or post.twitter_handle }}</a>{%
else %}{{ post.author }}{%
endif %} am {{ post.pub_date.strftime('%d. %m. %Y') }}</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 %}