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 %}
|
{% block content %}
|
||||||
|
|
||||||
{% if articles|length > 1 %}
|
{% if articles|length is 1 %}
|
||||||
<section id="article-index">
|
|
||||||
|
<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">
|
<div class="container">
|
||||||
<h2>{{ page.trans_title }}</h2>
|
<h2>{{ page.trans_title }}</h2>
|
||||||
<p class="lead">{{ page.trans_intro|richtext }}</p>
|
<p class="lead">{{ page.trans_intro|richtext }}</p>
|
||||||
|
@ -21,20 +32,8 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div><!-- /container -->
|
</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>
|
</section>
|
||||||
|
|
||||||
{% else %}
|
|
||||||
No articles here.
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if subcategories %}
|
{% if subcategories %}
|
||||||
|
|
Loading…
Reference in a new issue