diff options
author | Leo is awesome <lchan1994@yahoo.com> | 2016-06-07 16:29:22 -0400 |
---|---|---|
committer | Leo is awesome <lchan1994@yahoo.com> | 2016-06-07 16:29:22 -0400 |
commit | 355e57163e59054dd88ee2a5ea0a52375888089f (patch) | |
tree | c7c8440c27ab35a8d7212c7943028442384e39c8 /backdrop | |
parent | ccb8efc064dff0cc24fe715d8f83e33e061c64de (diff) | |
download | pelican-themes-355e57163e59054dd88ee2a5ea0a52375888089f.zip pelican-themes-355e57163e59054dd88ee2a5ea0a52375888089f.tar.gz pelican-themes-355e57163e59054dd88ee2a5ea0a52375888089f.tar.bz2 |
check first if there are any articles before showing them
Diffstat (limited to 'backdrop')
-rw-r--r-- | backdrop/templates/index.html | 6 |
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"> |