Add prev/next links to blog posts.
This commit is contained in:
parent
20a79ce1f1
commit
d015f8ce66
File diff suppressed because one or more lines are too long
|
@ -18,5 +18,23 @@
|
|||
</p>
|
||||
</div>
|
||||
{% 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>
|
||||
{% endblock %}
|
||||
|
|
|
@ -264,6 +264,14 @@ div.blog-post {
|
|||
}
|
||||
}
|
||||
|
||||
div.nav-prev {
|
||||
float: left;
|
||||
}
|
||||
|
||||
div.nav-next {
|
||||
float: right;
|
||||
}
|
||||
|
||||
div.page-banner {
|
||||
margin: 15px 0;
|
||||
background-size: cover;
|
||||
|
|
Loading…
Reference in New Issue