Skip to content
This repository has been archived by the owner on Sep 18, 2022. It is now read-only.

Commit

Permalink
Only display post list if there are posts.
Browse files Browse the repository at this point in the history
  • Loading branch information
razor-x committed Dec 30, 2013
1 parent 3defefb commit 87c194e
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@

<h2 class="tagline">{{ site.data.text.tagline }}</h2>

<section class="posts">
<h2>{{ site.data.text.post_list_title }}</h2>
<ul class="posts">
{% for post in posts %}
<li><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
</section>
{% if posts.length > 0 %}
<section class="posts">
<h2>{{ site.data.text.post_list_title }}</h2>
<ul class="posts">
{% for post in posts %}
<li><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
</section>
{% endif %}

{% include pagination.html %}

0 comments on commit 87c194e

Please sign in to comment.