{%- extends "base.html" -%}
{%- block title -%}
{# period is a string, but we want a date, so use an article's date. #}
{%- if period | length == 1 -%}
{{- dates[0].date | strftime(DATE_FORMAT_YEAR) -}}
{%- elif period | length == 2 -%}
{{- dates[0].date | strftime(DATE_FORMAT_MONTH) -}}
{%- else -%}
{{- dates[0].date | strftime(DATE_FORMAT_DAY) -}}
{%- endif -%}
{%- endblock -%}
{%- block pagedetails -%}
{{- super() -}}
{%- if period | length == 1 and
dates | unique(attribute="date.month") | list | length > 1 -%}
{%- elif period | length == 2 and
dates | unique(attribute="date.day") | list | length > 1 -%}
{%- endif -%}
{%- endblock -%}
{%- block maincontent -%}
{{- super() -}}
{%- endblock -%}