Skip to content

Commit 019531c

Browse files
committed
Merge pull request sergiokopplin#11 from jeandersonbc/patch-emptyPosts
Added message if there's no posts
2 parents 66360d5 + 95aebaf commit 019531c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

_layouts/blog.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
{% include header.html %}
66

77
<section class="home__sections">
8-
{% if site.paginate %}
8+
{% if site.posts.size == 0 %}
9+
<p class="text-center">Nothing published yet!</p>
10+
{% elsif site.paginate %}
911
{% for post in paginator.posts %}
1012
{% include blog-post.html %}
1113
{% endfor %}

src/styles/base/_general.styl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,6 @@ pre
115115

116116
+tablet()
117117
width 88%
118+
119+
.text-center
120+
text-align center

0 commit comments

Comments
 (0)