{% load i18n %}

<article class="entry{% if post.categories.all %}{% for category in post.categories.all %} category-{{ category.slug }}{% endfor %}{% endif %}{% if post.tags.all %}{% for tag in post.tags.all %} tag-{{ tag }}{% endfor %}{% endif %}">
    <header>
        <h1 class="entry-title">
        {% if forloop.counter %}
            <a href="{{ post.get_absolute_url }}" title="{% trans "Permalink to" %} {{ post.title }}">{{ post.title }}</a>
        {% else %}
            {{ post.title }}
        {% endif %}
        </h1>
        <time pubdate datetime="{{ post.publish|date:"c" }}">{{ post.publish|date }}</time>
        {% if perms.vellum.change_post %}
        <a title="{% trans "Edit" %} {{ post.title }}" class="edit" href="{% url admin:vellum_post_change post.id %}">Edit</a>
        {% endif %}
    </header>
    <div class="entry-content">
        {% include 'vellum/includes/post_content.html' %}
    </div>
    <footer>
        {% include 'vellum/includes/post_meta.html' %}
    </footer>
</article>
