combination
This commit is contained in:
2
app.py
2
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)
|
||||
|
||||
|
||||
|
||||
2
content
2
content
Submodule content updated: 5dcd5bdcee...bf7589d017
@@ -1,4 +1,3 @@
|
||||
<div class="image-container">
|
||||
<p>...</p>
|
||||
<img src="{{ src }}" alt="{{ alt or 'image' }}" />
|
||||
</div>
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
{% macro render_post(post) %}
|
||||
<article class="blog-content">{{ post.content | safe }}</article>
|
||||
{% if post.template %} {% include post.template %} {% endif %} {% endmacro %} {%
|
||||
macro render_test(post) %}
|
||||
<article class="blog-content">
|
||||
{% 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" %}
|
||||
<p>{{ block.value }}</p>
|
||||
{% 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 %}
|
||||
</article>
|
||||
{% endmacro %}
|
||||
{% if post.template %} {% include post.template %} {% endif %} {% endmacro %}
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
{% for block in post.content %} {% if block.type == "image" %} {% include
|
||||
"components/image.html" with src=url_for('content_image_files',
|
||||
filename=block.src) %} {% elif block.type == "text" %}
|
||||
<p>{{ block.value }}</p>
|
||||
{% endif %} {% endfor %}
|
||||
Reference in New Issue
Block a user