From 355e57163e59054dd88ee2a5ea0a52375888089f Mon Sep 17 00:00:00 2001 From: Leo is awesome Date: Tue, 7 Jun 2016 16:29:22 -0400 Subject: check first if there are any articles before showing them --- backdrop/templates/index.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backdrop/templates/index.html b/backdrop/templates/index.html index e7846ec..3cd962f 100644 --- a/backdrop/templates/index.html +++ b/backdrop/templates/index.html @@ -2,15 +2,21 @@ {% block content %} {% import 'macros.html' as macros %}
+ {% if articles|length %}
{{ macros.article_summary(articles[0],SITEURL,True,disqus=DISQUS_SITENAME) }}
+ {% endif %} + {% if articles|length > 1 %}
{{ macros.article_summary(articles[1],SITEURL,False,False,disqus=DISQUS_SITENAME) }}
+ {% endif %} + {% if articles|length > 2 %}
{{ macros.article_summary(articles[2],SITEURL,False,False,disqus=DISQUS_SITENAME) }}
+ {% endif %}
-- cgit v1.1