Refactor category article index
This commit is contained in:
parent
5b81e9a867
commit
5fe2e03b65
1 changed files with 19 additions and 20 deletions
|
@ -5,8 +5,19 @@
|
|||
|
||||
{% block content %}
|
||||
|
||||
{% if articles|length > 1 %}
|
||||
<section id="article-index">
|
||||
{% if articles|length is 1 %}
|
||||
|
||||
<section id="news-details">
|
||||
<div class="container">
|
||||
{% for page in articles %}
|
||||
{% include 'home/page_content.html' %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% else %}
|
||||
|
||||
<section id="article-index">
|
||||
<div class="container">
|
||||
<h2>{{ page.trans_title }}</h2>
|
||||
<p class="lead">{{ page.trans_intro|richtext }}</p>
|
||||
|
@ -21,20 +32,8 @@
|
|||
{% endfor %}
|
||||
</div>
|
||||
</div><!-- /container -->
|
||||
</section>
|
||||
|
||||
{% elif articles|length > 0 %}
|
||||
|
||||
<section id="news-details">
|
||||
<div class="container">
|
||||
{% for page in articles %}
|
||||
{% include 'home/page_content.html' %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% else %}
|
||||
No articles here.
|
||||
{% endif %}
|
||||
|
||||
{% if subcategories %}
|
||||
|
|
Loading…
Reference in a new issue