Add links to next and previous post

This commit is contained in:
Philipp Oppermann
2015-08-18 20:05:25 +02:00
parent ed5ace118b
commit 003b9d347c
2 changed files with 29 additions and 0 deletions

View File

@@ -7,6 +7,16 @@ layout: default
<time datetime="{{ page.date | date_to_xmlschema }}" class="post-date">{{ page.date | date_to_string }}</time> <time datetime="{{ page.date | date_to_xmlschema }}" class="post-date">{{ page.date | date_to_string }}</time>
{{ content }} {{ content }}
<hr> <hr>
<div class="PageNavigation">
{% if page.previous.url %}
<a class="prev" href="{{page.previous.url}}">&laquo; {{page.previous.title}}</a>
{% endif %}
{% if page.next.url %}
<a class="next" href="{{page.next.url}}">{{page.next.title}} &raquo;</a>
{% endif %}
</div>
{% include google_adsense.html %} {% include google_adsense.html %}
<hr> <hr>
{% include disqus.html %} {% include disqus.html %}

View File

@@ -59,3 +59,22 @@
} }
} }
} }
.PageNavigation {
font-size: 0.9em;
display: table;
width: 100%;
overflow: hidden;
}
.PageNavigation a {
display: table-cell;
}
.PageNavigation .previous {
text-align: left;
}
.PageNavigation .next {
text-align: right;
}