Primo commit - base sito funzionante?
This commit is contained in:
parent
7abb0ade2e
commit
71f4b86bde
30 changed files with 1742 additions and 0 deletions
22
themes/blue-penguin/templates/archives.html
Normal file
22
themes/blue-penguin/templates/archives.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ SITENAME }} | Archives{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
<h1>Archives</h1>
|
||||
|
||||
{# based on http://stackoverflow.com/questions/12764291/jinja2-group-by-month-year #}
|
||||
|
||||
{% for year, year_group in dates|groupby('date.year')|reverse %}
|
||||
{% for month, month_group in year_group|groupby('date.month')|reverse %}
|
||||
<h4 class="date">{{ (month_group|first).date|strftime('%b %Y') }}</h4>
|
||||
<div class="post archives">
|
||||
<ul>
|
||||
{% for article in month_group %}
|
||||
<li><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue