21 lines
459 B
HTML
21 lines
459 B
HTML
{% 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 %}
|