post_preview()

This commit is contained in:
m
2026-03-14 06:58:06 +01:00
parent c8697e9578
commit 97675e7ba6
2 changed files with 24 additions and 18 deletions

View File

@@ -0,0 +1,20 @@
{% macro render_post(post, expanded=False) %} {% if expanded %}
<div class="blog-content">{{ post.content | safe }}</div>
<hr class="post-divider post-divider-expanded" />
{% else %}
<div class="blog-preview">{{ post.content | striptags | truncate(200) }}</div>
<a
class="btn btn-default btn-custom"
href="{{ url_for('post_detail', post_id=post.id) }}"
>
Read More
</a>
<hr class="post-divider post-divider-preview" />
{% endif %} {% endmacro %}