Sorting by date
This commit is contained in:
parent
a42609c2e6
commit
edd8fb9df1
|
@ -1,7 +1,9 @@
|
|||
{% for section, urls in posts[language].items() %}
|
||||
{% for date, sections in posts[language].items() %}
|
||||
{% for section, urls in sections.items() %}
|
||||
{% if section != "/" %}
|
||||
{% for url, post in urls.items() %}
|
||||
{% include "components/post_summary.j2" %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
|
@ -1,3 +1,7 @@
|
|||
{% for url, post in posts[language][section].items() %}
|
||||
{% for date, sections in posts[language].items() %}
|
||||
{% if section in sections %}
|
||||
{% for url, post in posts[language][date][section].items() %}
|
||||
{% include "components/post_summary.j2" %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
|
@ -1,11 +1,17 @@
|
|||
<div class="sidebar">
|
||||
<section>
|
||||
{% for section, urls in posts[language].items() %}
|
||||
{% set sections_list = [] %}
|
||||
{% for date, sections in posts[language].items() %}
|
||||
{% for section, urls in sections.items() %}
|
||||
{% if section != "/" %}
|
||||
<p>
|
||||
<a href="/{{ language}}/{{ section }}/">{{ translate(section, language) }} ({{ urls | length }})</a>
|
||||
</p>
|
||||
{% set sections_list = sections_list.append(section) %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% for section in sections_list | unique %}
|
||||
<p>
|
||||
<a href="/{{ language}}/{{ section }}/">{{ translate(section, language) }}</a>
|
||||
</p>
|
||||
{% endfor %}
|
||||
</section>
|
||||
</div>
|
Loading…
Reference in New Issue