Commit 930959eb authored by Olga Brani's avatar Olga Brani

Add previous/next link to posts

parent 47696046
......@@ -40,7 +40,7 @@ layoutCls: x-wide
</div>
<div class="small-4 columns sidemenu">
<p><strong>All Posts</strong></p>
<p><strong><a href="{{site.baseurl}}/blog/">All Posts</a></strong></p>
<ul>
{% for post in site.posts %}
{% if page.url == post.url%}
......@@ -53,4 +53,4 @@ layoutCls: x-wide
{% endfor %}
</ul>
</div>
</div>
\ No newline at end of file
</div>
......@@ -11,4 +11,14 @@ permalink: /blog/
<div class="post-content">
{{ content }}
</div>
<p><a href="{{site.baseurl}}/blog" class="button">Back to posts</a></p>
\ No newline at end of file
<p class="prev-next clearfix">
{% if page.previous %}
<a href="{{page.previous.url}}" title="{{page.previous.title}}" class="lt-post">« Previous post</a>
{% endif %}
<a href="{{site.baseurl}}/blog">All posts</a>
{% if page.next %}
<a href="{{page.next.url}}" class="rt-post" title="{{page.next.title}}">Next post »</a>
{% endif %}
</p>
......@@ -319,6 +319,19 @@ header {
.more {
white-space: nowrap;
}
.prev-next {
margin-top: 2em;
text-align: center;
position: relative;
.rt-post {
position: absolute;
right: 0;
}
.lt-post {
position: absolute;
left: 0;
}
}
}
.sidemenu {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment