Redesign index page to show posts in chronological order

This commit is contained in:
Philipp Oppermann
2015-08-25 17:22:07 +02:00
parent 589f540b28
commit d83a2eb130
2 changed files with 16 additions and 16 deletions

View File

@@ -78,3 +78,11 @@
.PageNavigation .next {
text-align: right;
}
.newest-post {
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
padding: 1em;
margin-bottom: 2em;
margin-top: -2em;
}

View File

@@ -2,11 +2,15 @@
layout: default
title: Home
---
<div class="newest-post">
<emph>Latest Post</emph>: {% for post in site.categories.rust-os limit:1 %}
<strong><a href="#{{ post.id }}">{{post.title}}</a></strong>
{% endfor %}
</div>
<div class="posts">
{% for post in paginator.posts %}
<hr>
<article class="post">
{% for post in site.categories.rust-os reversed %}
<article class="post" id="{{ post.id }}">
<h1 class="post-title">
<a href="{{ site.baseurl }}{{ post.url }}">
{{ post.title }}
@@ -21,18 +25,6 @@ title: Home
{{ post.excerpt }}
{% endif %}
</article>
<hr>
{% endfor %}
</div>
<div class="pagination">
{% if paginator.next_page %}
<a class="pagination-item older" href="{{ paginator.next_page_path | prepend: site.baseurl }}">Older</a>
{% else %}
<span class="pagination-item older">Older</span>
{% endif %}
{% if paginator.previous_page %}
<a class="pagination-item newer" href="{{ paginator.previous_page_path | prepend: site.baseurl }}">Newer</a>
{% else %}
<span class="pagination-item newer">Newer</span>
{% endif %}
</div>