mirror of
https://github.com/almet/notmyidea.git
synced 2025-04-29 03:52:38 +02:00
don't display the category more than one time in a raw
This commit is contained in:
parent
72e40cd52c
commit
4eaa2a3da5
1 changed files with 5 additions and 1 deletions
|
@ -4,10 +4,14 @@
|
||||||
{% if articles %}
|
{% if articles %}
|
||||||
<section id="content" class="body">
|
<section id="content" class="body">
|
||||||
<ol id="posts-list" class="hfeed">
|
<ol id="posts-list" class="hfeed">
|
||||||
|
{% set category = None %}
|
||||||
{% for article in articles_page.object_list %}
|
{% for article in articles_page.object_list %}
|
||||||
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="{{ article.title}}">
|
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="{{ article.title}}">
|
||||||
<li><article class="hentry {{ article.category }}">
|
<li><article class="hentry {{ article.category }}">
|
||||||
<span class='category {{ article.category }}'>{{ article.category }}</span>
|
{% if article.category.name != category %}
|
||||||
|
<span class='category {{ article.category }}'>{{ article.category }}</span>
|
||||||
|
{% set category = article.category.name %}
|
||||||
|
{% endif %}
|
||||||
<h1> {{ article.title }} </h1>
|
<h1> {{ article.title }} </h1>
|
||||||
</article></li>
|
</article></li>
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in a new issue