Refactor category article index

This commit is contained in:
Oleg Lavrovsky 2017-04-26 16:19:14 +02:00
parent 5b81e9a867
commit 5fe2e03b65

View file

@ -5,25 +5,7 @@
{% block content %}
{% if articles|length > 1 %}
<section id="article-index">
<div class="container">
<h2>{{ page.trans_title }}</h2>
<p class="lead">{{ page.trans_intro|richtext }}</p>
<div class="article-body" role="main">
{% for entry in articles %}
<div class="item">
<div class="article-caption">
<h3><a href="{% pageurl entry %}">{{ entry.trans_title }}</a></h3>
<p>{{ entry.trans_intro|richtext }}</p>
</div>
</div>
{% endfor %}
</div>
</div><!-- /container -->
</section>
{% elif articles|length > 0 %}
{% if articles|length is 1 %}
<section id="news-details">
<div class="container">
@ -34,7 +16,24 @@
</section>
{% else %}
No articles here.
<section id="article-index">
<div class="container">
<h2>{{ page.trans_title }}</h2>
<p class="lead">{{ page.trans_intro|richtext }}</p>
<div class="article-body" role="main">
{% for entry in articles %}
<div class="item">
<div class="article-caption">
<h3><a href="{% pageurl entry %}">{{ entry.trans_title }}</a></h3>
<p>{{ entry.trans_intro|richtext }}</p>
</div>
</div>
{% endfor %}
</div>
</div><!-- /container -->
</section>
{% endif %}
{% if subcategories %}