{% extends "base.html" %}

{% block page_meta %}
<meta name="title" content="{{ blog.title }} | Archive">
<meta name="description" content="{{ blog.description }}">
<!-- Google will often use this as its description of your page/site. Make it good. -->

<meta name="author" content="{{ blog.author }}">
<meta name="Copyright" content="{{ blog.copyright }}">

<!-- Dublin Core Metadata : http://dublincore.org/ -->
<meta name="DC.title" content="{{ blog.title }} | Archive">
<meta name="DC.subject" content="{{ blog.description }}">
<meta name="DC.creator" content="{{ blog.author }}">
{% endblock page_meta %}

{% block content %}
    {% for y, months in counts|groupby('year')|reverse() %}
        <h2>
            <a href="{{blog.url}}{{ y }}/">{{ y }}</a>
            <small>| {{ months|sum(attribute="count") }} posts </small>
        </h2>
        <div class="row">
        {% for c in months %}
            {% if c.count %}
            <div class="col-sm-1">
                    <a href="{{ blog.url }}{{ y }}/{{ "%02d"|format(c.month) }}/">{{ _months_short[c.month] }}<small><span class="badge">{{ c.count }}</span></small></a>
            </div>
            {% else %}
            <div class="col-sm-1">
                {{ _months_short[c.month] }}
            </div>
            {% endif %}
        {% endfor %}
        </div>
    {% endfor %}
{% endblock %}
