{% set slug = uri.param('slug') %}

{% set changelog = admin.getChangelog(slug) %}

<section id="ajax" class="changelog">
    <a href="#" class="remodal-close"></a>
    {% if changelog %}

        <h1>{{title}} Changelog</h1>

        <div class="changelog-overflow">
            {% for version, log in changelog %}
                <h3 id="{{ version | replace({" ": '-'}) }}">v{{ version }}</h3>
                <h4 title="{{ log.date|date('F jS \\a\\t g:ia') }}">{{ log.date|nicetime }}</h4>

                {{ log.content|markdown|raw }}
            {% endfor %}
        </div>

    {% endif %}
</section>
