Add prev/next links to blog posts.

This commit is contained in:
A. Jesse Jiryu Davis 2016-01-06 16:52:54 -05:00
parent 20a79ce1f1
commit d015f8ce66
3 changed files with 27 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -18,5 +18,23 @@
</p> </p>
</div> </div>
{% endcall %} {% endcall %}
{% set older = this.get_next_sibling() %}
{% set newer = this.get_prev_sibling() %}
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
{% if older %}
<div class="nav-prev">
<a href="{{ older|url }}">Previous: {{ older.title }}</a>
</div>
{% endif %}
{% if newer %}
<div class="nav-next">
<a href="{{ newer|url }}">Next: {{ newer.title }}</a>
</div>
{% endif %}
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -264,6 +264,14 @@ div.blog-post {
} }
} }
div.nav-prev {
float: left;
}
div.nav-next {
float: right;
}
div.page-banner { div.page-banner {
margin: 15px 0; margin: 15px 0;
background-size: cover; background-size: cover;