From 5fe2e03b655e46a2bca3cc9a7fffe78b374900bd Mon Sep 17 00:00:00 2001 From: Oleg Lavrovsky Date: Wed, 26 Apr 2017 16:19:14 +0200 Subject: [PATCH] Refactor category article index --- .../templates/home/article_index_page.html | 39 +++++++++---------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/publichealth/home/templates/home/article_index_page.html b/publichealth/home/templates/home/article_index_page.html index b46da4f..39db4f0 100644 --- a/publichealth/home/templates/home/article_index_page.html +++ b/publichealth/home/templates/home/article_index_page.html @@ -5,25 +5,7 @@ {% block content %} -{% if articles|length > 1 %} -
-
-

{{ page.trans_title }}

-

{{ page.trans_intro|richtext }}

-
- {% for entry in articles %} -
-
-

{{ entry.trans_title }}

-

{{ entry.trans_intro|richtext }}

-
-
- {% endfor %} -
-
-
- -{% elif articles|length > 0 %} +{% if articles|length is 1 %}
@@ -34,7 +16,24 @@
{% else %} - No articles here. + +
+
+

{{ page.trans_title }}

+

{{ page.trans_intro|richtext }}

+
+ {% for entry in articles %} +
+
+

{{ entry.trans_title }}

+

{{ entry.trans_intro|richtext }}

+
+
+ {% endfor %} +
+
+
+ {% endif %} {% if subcategories %}