12 lines
653 B
HTML
12 lines
653 B
HTML
{% macro render_post(post) %}
|
|
<article class="blog-content">
|
|
{% if post.content is iterable and post.content is not string %} {% for block
|
|
in post.content %} {% if block.type == "image" %} {% with
|
|
src=url_for('content_image_files', filename=block.src) %} {% include
|
|
"components/image.html" %} {% endwith %} {% elif block.type == "text" %} {{
|
|
block.value | safe }} {% elif block.type == "code" %} {% with
|
|
value=block.value %} {% include "components/code.html" %} {% endwith %} {%
|
|
endif %} {% endfor %} {% else %} {{ post.content | safe }} {% endif %}
|
|
</article>
|
|
{% if post.template %} {% include post.template %} {% endif %} {% endmacro %}
|