{{ format_post_text(post_item.caption) }}
{% endif %}
{% if post_item.media %}
{% set media_count = post_item.media | length %}
{% if media_count > 3 %}
{% set media_count = 3 %}
{% endif %}
{% set media_class = 'media-count-' + media_count|string %}
{% for media_item in post_item.media[:3] %}
{% if media_item.type == 'video' %}
{% else %}
{% endif %}
{% endfor %}
{% endif %}
{% if post_item.quoted_thread and not is_quoted %}
{{ render_post(post_item.quoted_thread, is_quoted=True) }}
{% endif %}