<div class="row">
    {% block post_info %}
        <div class="post-info two columns">
            <div class="post-date">
                {% with timestamp=post.timestamp_local %}
                    <div class="month">{{ timestamp|date("%b")|upper }}</div>
                    <div class="day">{{ timestamp|date("%d") }}</div>
                    <div class="year">{{ timestamp|date("%Y") }}</div>
                    <div class="permalink">
                        <a href="{{ post.url }}"
                           title="Permanent link to '{{ post.title }}'">∞</a>
                    </div>
                {% endwith %}
            </div>
            {% if post.tags|count > 0 %}
                <ul class="tags">
                    {% for tag in post.tags %}
                        <li><a href="{{ urlname('tag', tag) }}">{{ tag }}</a>
                        </li>
                    {% endfor %}
                </ul>
            {% endif %}
        </div>
    {% endblock post_info %}
    {% block post_content %}
        {% with link=post.is_external_link %}
            <article class="post-content ten columns">
                <time datetime="{{ post.timestamp|localtime|date("%Y-%m-%d %Z") }}"
                      pubdate=""></time>
                <header>
                    <h1>
                        <a href="{% if link %}{{ post.link }}{% else %}
        {{ post.url }}{% endif %}">{{ post.title|typogrify_no_widont }}</a>
                        {% if link %}<span class="arrow">→</span>{% endif %}
                    </h1>
                </header>
                {% if listpage and post.content_teaser %}
                    {{ post.content_teaser|safe }}
                    <div>
                        <a href="{{ post.url }}" class="button">Read more →</a>
                    </div>
                {% else %}
                    {{ post.content|safe }}
                {% endif %}
                {% if post.via %}
                    <div class="attribution">
                        {% if post.via_link %}
                            <a href="{{ post.via_link }}">/via {{ post.via }}</a>
                        {% else %}
                            /via {{ post.via }}
                        {% endif %}
                    </div>
                {% endif %}
                {% if nav_context in ('post',) %}
                    {# remember that all_posts is sorted such that newer posts have lower indexes #}
                    {% set current_index = all_posts.index(post) %}
                    {% set has_older = (current_index < all_posts|count - 1) %}
                    {% set has_newer = (current_index > 0) %}

                    <div class="row">
                        <div class="twelve columns post-links">
                            <ul class="block-grid two-up">
                                <li>
                                    {% if older_post %}
                                        <a href="{{ older_post.url }}">← {{ older_post.title }}</a>
                                    {% else %}
                                        &nbsp;
                                    {% endif %}
                                </li>
                                <li>
                                    {% if newer_post %}
                                        <a href="{{ newer_post.url }}">{{ newer_post.title }} →</a>
                                    {% else %}
                                        &nbsp;
                                    {% endif %}
                                </li>
                            </ul>
                        </div>
                    </div>
                {% endif %}
            </article>
        {% endwith %}
    {% endblock post_content %}
</div>
