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 != "/" %}
|
{% if section != "/" %}
|
||||||
{% for url, post in urls.items() %}
|
{% for url, post in urls.items() %}
|
||||||
{% include "components/post_summary.j2" %}
|
{% include "components/post_summary.j2" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
{% 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" %}
|
{% include "components/post_summary.j2" %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
|
@ -1,11 +1,17 @@
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
<section>
|
<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 != "/" %}
|
{% if section != "/" %}
|
||||||
<p>
|
{% set sections_list = sections_list.append(section) %}
|
||||||
<a href="/{{ language}}/{{ section }}/">{{ translate(section, language) }} ({{ urls | length }})</a>
|
|
||||||
</p>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
{% for section in sections_list | unique %}
|
||||||
|
<p>
|
||||||
|
<a href="/{{ language}}/{{ section }}/">{{ translate(section, language) }}</a>
|
||||||
|
</p>
|
||||||
|
{% endfor %}
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
Loading…
Reference in New Issue