25 lines
727 B
HTML
25 lines
727 B
HTML
{%- macro render_blog_post(post, from_index=false) %}
|
|
<article>
|
|
{% if from_index %}
|
|
{% if post.logo is defined %}
|
|
<a href="{{ post|url(absolute=True) }}">
|
|
<img alt="{{ post.logodesc }}" src="{{ post|url(absolute=True)}}{{ post.logo | url(absolute=False) }}" />
|
|
</a>
|
|
{% else %}
|
|
<h1 class="headline"><a href="{{ post|url }}">{{ post.title }}</a></h1>
|
|
{% endif %}
|
|
{% else %}
|
|
<h1 class="headline"><a>{{ post.title }}</a></h1>
|
|
{% if post.logo is defined %}
|
|
<img alt="{{ post.logodesc }}" src="{{ post.logo | url }}" />
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% if from_index -%}
|
|
{{ post.preview }}
|
|
{% else -%}
|
|
{{ post.body }}
|
|
{% endif -%}
|
|
</article>
|
|
{% endmacro -%}
|