{% set post = __SELF__.post %}

<div class="content">{{ post.content_html | raw }}</div>

{% if post.featured_images.count %}
    <div class="featured-images text-center">
        {% for image in post.featured_images %}
            <p>
                <img
                    data-src="{{ image.filename }}"
                    src="{{ image.path }}"
                    alt="{{ image.description }}"
                    style="max-width: 100%" />
            </p>
        {% endfor %}
    </div>
{% endif %}

<p class="info">
    {% if post.categories.count %}
        {% set categoryLinks = post.categories | map(c => "<a href=\"#{c.url}\">#{c.name}</a>") | join(', ') %}

        {{ 'winter.blog::lang.post.posted_byline' | trans({
            date: post.published_at | date('winter.blog::lang.post.date_format' | trans),
            categories: categoryLinks
        }) }}
    {% else %}
        {{ 'winter.blog::lang.post.posted_byline_no_categories' | trans({
            date: post.published_at | date('winter.blog::lang.post.date_format'|trans)
        }) }}
    {% endif %}
</p>
