diff --git a/app.py b/app.py index c8bac04..29e0518 100644 --- a/app.py +++ b/app.py @@ -117,8 +117,6 @@ def post_detail(post_id): return "Post not found", 404 comments = get_comments_for_post(post_id) - if post_id == 2: - return render_template('post_detail_test.html', post=post, comments=comments, blog_title = TITLE) return render_template('post_detail.html', post=post, comments=comments, blog_title = TITLE) diff --git a/content b/content index 5dcd5bd..bf7589d 160000 --- a/content +++ b/content @@ -1 +1 @@ -Subproject commit 5dcd5bdcee80548c8f4bdb399ea684d04413f339 +Subproject commit bf7589d017ab8d6b7dd82f5e2c3f395435153a5e diff --git a/templates/components/image.html b/templates/components/image.html index eb7ea16..c206a34 100644 --- a/templates/components/image.html +++ b/templates/components/image.html @@ -1,4 +1,3 @@
...
{{ block.value }}
- {% endif %} {% endfor %} + {% 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 %} {% endfor %} {% else %} {# + content is """...""" → render HTML #} {{ post.content | safe }} {% endif %}{{ block.value }}
-{% endif %} {% endfor %}