summaryrefslogtreecommitdiff
path: root/templates/blog-month-index.html
blob: 96c5f93de2355c5818ef968880b33ad26b323683 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{% extends "base.html" %}

{% from "macros/pagination.html" import render_month_archive_navigation %}

{% block meta %}
  {{ super() }}
  <meta property="og:type" content="website">
{% endblock %}
{% block styles %}
  {{ super() }}
  <link rel="stylesheet"
        type="text/css"
        href="{{ '/static/css/category.css'|asseturl }}">
{% endblock %}
{% set month_name = this.date | dateformat("MMMM y") %}
{% set title = "Monthly archive: " + month_name %}
{% set description = "Browse posts from " + month_name + " on Still Thinking About It." %}
{% block content %}
  {% set post_count = this.children.count() %}
  <article>
    <header>
      <hgroup>
        <h2>Monthly archive: {{ this.date | dateformat("MMMM y") }}</h2>
        <p>
          ({{ post_count }}
          {% if post_count > 1 %}
            posts)
          {% else %}
            post)
          {% endif %}
        </p>
      </hgroup>
    </header>
    <table>
      <thead class="visually-hidden">
        <tr>
          <th scope="col">Date</th>
          <th scope="col">Title</th>
        </tr>
      </thead>
      <tbody>
        {% for post in this.children.order_by('-publication_date') %}
          <tr>
            <td>
              <time datetime="{{ post.publication_date }}">{{ post.publication_date }}</time>
            </td>
            <td>
              <a href="{{ post|url }}">{{ post.title }}</a>
            </td>
          </tr>
        {% endfor %}
      </tbody>
    </table>
    {{ render_month_archive_navigation(this) }}
  </article>
{% endblock %}