aboutsummaryrefslogtreecommitdiffstats
path: root/backdrop/templates/index.html
diff options
context:
space:
mode:
authorJustin Mayer <entroP@gmail.com>2016-07-02 10:23:50 -0600
committerGitHub <noreply@github.com>2016-07-02 10:23:50 -0600
commit35cd4d9b105f3768ab2e73c0b6d41059d1cf894a (patch)
tree67db46db1cc3047a63b1a7054d7ab8b342c78c20 /backdrop/templates/index.html
parentf90b1b5004020d935be804b3e8e19080ad1418e8 (diff)
parent355e57163e59054dd88ee2a5ea0a52375888089f (diff)
downloadpelican-themes-35cd4d9b105f3768ab2e73c0b6d41059d1cf894a.zip
pelican-themes-35cd4d9b105f3768ab2e73c0b6d41059d1cf894a.tar.gz
pelican-themes-35cd4d9b105f3768ab2e73c0b6d41059d1cf894a.tar.bz2
Merge pull request #404 from PiJoules/master
Backdrop: Check first if there are any articles before showing them
Diffstat (limited to 'backdrop/templates/index.html')
-rw-r--r--backdrop/templates/index.html6
1 files changed, 6 insertions, 0 deletions
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 %}
<div class="row">
+ {% if articles|length %}
<div class="small-12 medium-12 columns">
{{ macros.article_summary(articles[0],SITEURL,True,disqus=DISQUS_SITENAME) }}
</div>
+ {% endif %}
+ {% if articles|length > 1 %}
<div class="small-12 medium-6 columns small-articles">
{{ macros.article_summary(articles[1],SITEURL,False,False,disqus=DISQUS_SITENAME) }}
</div>
+ {% endif %}
+ {% if articles|length > 2 %}
<div class="small-12 medium-6 columns small-articles">
{{ macros.article_summary(articles[2],SITEURL,False,False,disqus=DISQUS_SITENAME) }}
</div>
+ {% endif %}
</div>
<div class="row">
<div class="small-12 columns">