{%- extends "index.html"-%}
{%- block main-%}
    <div class="post">
        <h1 class="post-title">
            categories ∋ {{ "{" }}{{ term.name }}{{ "}" }}
            ({{ term.pages | length }} post{{ term.pages | length | pluralize }})
        </h1>

        <ul>
            {%- for post in term.pages -%}
                <li class="tag-list">
                    {{ post.date | date(format="%Y.%m.%d") }}
                    :: <a href="{{ post.permalink }}">{{ post.title }}</a>
                    :: {{ "{" }}
                    {%- for cat in post.taxonomies["categories"] -%}
                        {%- set _cat = get_taxonomy_url(kind="categories", name=cat) -%}
                        {%- if loop.last -%}
                            <a href="{{ _cat }}">{{ cat }}</a>
                        {%- else -%}
                            <a href="{{ _cat }}">{{ cat }}</a>,&nbsp;
                        {%- endif -%}
                    {% endfor %}{{ "}" }}
                </li>
                {# End of pagination for-loop #}
            {%- endfor -%}
            {#- I don't put pagination here like Terminal does. I don't like how
            the buttons move with the size of post entries in the content div. -#}
    </ul>
</div>
{%- endblock main-%}
