Skip to content

Commit

Permalink
Move index.html to _layouts/home.html
Browse files Browse the repository at this point in the history
  • Loading branch information
ashawley committed Nov 3, 2017
1 parent 2f0cbf6 commit 96fddb3
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 26 deletions.
28 changes: 28 additions & 0 deletions _layouts/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
layout: default
---
{% assign posts_count = paginator.posts | size %}

<div class="home">
{% if posts_count > 0 %}
<div class="posts">
{% for post in paginator.posts %}
<div class="post py3">
<p class="post-meta">{{ post.date | date: site.date_format }}</p>
<a href="{{ post.url | prepend: site.baseurl }}" class="post-link"><h3 class="h1 post-title">{{ post.title }}</h3></a>
<span class="post-summary">
{% if post.summary %}
{{ post.summary }}
{% else %}
{{ post.excerpt }}
{% endif %}
</span>
</div>
{% endfor %}
</div>

{% include pagination.html %}
{% else %}
<h1 class='center'>{{ site.text.index.coming_soon }}</h1>
{% endif %}
</div>
27 changes: 1 addition & 26 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,3 @@
---
layout: default
layout: home
---
{% assign posts_count = paginator.posts | size %}

<div class="home">
{% if posts_count > 0 %}
<div class="posts">
{% for post in paginator.posts %}
<div class="post py3">
<p class="post-meta">{{ post.date | date: site.date_format }}</p>
<a href="{{ post.url | prepend: site.baseurl }}" class="post-link"><h3 class="h1 post-title">{{ post.title }}</h3></a>
<span class="post-summary">
{% if post.summary %}
{{ post.summary }}
{% else %}
{{ post.excerpt }}
{% endif %}
</span>
</div>
{% endfor %}
</div>

{% include pagination.html %}
{% else %}
<h1 class='center'>{{ site.text.index.coming_soon }}</h1>
{% endif %}
</div>

0 comments on commit 96fddb3

Please sign in to comment.