mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Redesign index page to show posts in chronological order
This commit is contained in:
@@ -78,3 +78,11 @@
|
|||||||
.PageNavigation .next {
|
.PageNavigation .next {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.newest-post {
|
||||||
|
border-top: 1px solid #eee;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
padding: 1em;
|
||||||
|
margin-bottom: 2em;
|
||||||
|
margin-top: -2em;
|
||||||
|
}
|
||||||
|
|||||||
24
index.html
24
index.html
@@ -2,11 +2,15 @@
|
|||||||
layout: default
|
layout: default
|
||||||
title: Home
|
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">
|
<div class="posts">
|
||||||
{% for post in paginator.posts %}
|
{% for post in site.categories.rust-os reversed %}
|
||||||
<hr>
|
<article class="post" id="{{ post.id }}">
|
||||||
<article class="post">
|
|
||||||
<h1 class="post-title">
|
<h1 class="post-title">
|
||||||
<a href="{{ site.baseurl }}{{ post.url }}">
|
<a href="{{ site.baseurl }}{{ post.url }}">
|
||||||
{{ post.title }}
|
{{ post.title }}
|
||||||
@@ -21,18 +25,6 @@ title: Home
|
|||||||
{{ post.excerpt }}
|
{{ post.excerpt }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</article>
|
</article>
|
||||||
|
<hr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</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>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user