-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patharchives.html
30 lines (25 loc) · 873 Bytes
/
archives.html
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
{% extends "code/base.html" %}
{% block contents %}
<h2>Code | {{ year }}</h2>
<p>All posts published during {{ year}}.</p>
{% include "_list.html" %}
{% if years|length %}
<p>
« Back to <a href="{{ url_for("index") }}">MadMode</a>
| Browse the archives
{%- with current_year = year -%}
{%- for year in years -%}
{%- if current_year == year %}
{%- for month in months -%}
| <a href="{{ url_for("archives_year_month",
year=year, month=month) }}"
>{{ '%04d-%02d' % (year, month) }}</a>
{%- endfor -%}
{%- else %}
| <a href="{{ url_for("archives_year", year=year) }}">{{ year }}</a>
{%- endif -%}
{%- endfor -%}
{%- endwith -%}
</p>
{% endif %}
{% endblock contents %}