diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2022-03-23 09:59:27 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2022-03-23 09:59:27 +0300 |
commit | 4b116c17b0061cd4a9c6d95a325a5473f8a763c0 (patch) | |
tree | 1289d6a6100110e5683e8da5aa622f219f51a620 /_includes | |
parent | navbar: move the hide condition to the navbar include (diff) | |
download | jekyll-theme-4b116c17b0061cd4a9c6d95a325a5473f8a763c0.tar.gz jekyll-theme-4b116c17b0061cd4a9c6d95a325a5473f8a763c0.zip |
sidebar: don't print anything if there're no posts
Diffstat (limited to '_includes')
-rw-r--r-- | _includes/common/sidebar.html | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/_includes/common/sidebar.html b/_includes/common/sidebar.html index 825f73e..113d171 100644 --- a/_includes/common/sidebar.html +++ b/_includes/common/sidebar.html @@ -23,11 +23,9 @@ <a class="list-group-item" href="mailto:{{ author_email }}"><span class="glyphicon glyphicon-envelope"></span> {{ author_email }}</a> </div> </div> + {% if site.posts.size > 0 %} <div class="col-xs-12 col-sm-6 col-md-12"> <h4>Latest posts</h4> - {% if site.posts.size == 0 %} - <p>Sorry, there're no posts yet.</p> - {% else %} <div class="list-group wide-enough"> {% for post in site.posts limit: 5 %} <a class="list-group-item" href="{{ post.url | relative_url }}"> @@ -36,6 +34,6 @@ </a> {% endfor %} </div> - {% endif %} </div> + {% endif %} </div> |