archives.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {% extends 'base.html' %}
  2. {% block title %}
  3. All Posts · {{ super() }}
  4. {% endblock title %}
  5. {% block head_description %}
  6. Full archives of {{ SITENAME|striptags }} blog.
  7. {% endblock head_description %}
  8. {% block content %}
  9. <div class="row-fluid">
  10. <header class="page-header span10 offset2">
  11. <h1><a href="{{ SITEURL }}/archives.html">All Posts</a></h1>
  12. </header>
  13. </div>
  14. <div class="row-fluid">
  15. <div class="span8 offset2">
  16. <ul class="list-all-articles">
  17. {% set last_year = 0 %}
  18. {% for article in dates %}
  19. {% set year = article.date.strftime('%Y') %}
  20. {%if last_year != year %}
  21. <h2>{{ year }}</h2>
  22. {% set last_year = year %}
  23. {% endif %}
  24. <article>
  25. <h1><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }} {%if article.subtitle %} <small> {{ article.subtitle }} </small> {% endif %} </a></h1>
  26. {% set day = article.date.strftime('%d')|int %}
  27. <time pubdate="pubdate" datetime="{{ article.date.isoformat() }}">{{ article.date.strftime('%b') }} {{ day }}</time>
  28. <footer>posted in
  29. <a href="{{ SITEURL }}/categories.html#{{ article.category.slug }}-ref">{{ article.category }}</a>
  30. </footer>
  31. </article>
  32. {% endfor %}
  33. </ul>
  34. </div>
  35. </div>
  36. {% endblock content %}