diff --git a/templates/components/post_renderer.html b/templates/components/post_renderer.html index b56c9ba..9514880 100644 --- a/templates/components/post_renderer.html +++ b/templates/components/post_renderer.html @@ -3,11 +3,10 @@ {% if post.content is iterable and post.content is not string %} {# content is [] → render blocks #} {% 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 }} {% endif %}{% elif block.type == "code" %} - {% with value=block.src %} {% include "components/code.html" %} {% endwith %} - {% elif block.type == "text" %} {{ block.value | safe }} {% endif %} {% endfor - %} {% else %} {# content is """...""" → render HTML #} {{ post.content | safe - }} {% endif %} + {% include "components/image.html" %} {% endwith %} {% endif %} {% elif + block.type == "text" %} {{ block.value | safe }} {% endif %} {% elif + block.type == "code" %} {% with value=block.src %} {% include + "components/code.html" %} {% endwith %} {% endif %} {% endfor %} {% else %} {# + content is """...""" → render HTML #} {{ post.content | safe }} {% endif %} {% if post.template %} {% include post.template %} {% endif %} {% endmacro %}