Add support for the neighbors plugin (#98)

This commit is contained in:
Oliver Pratt 2017-04-22 07:54:50 +01:00 committed by Alexandre Vicenzi
parent 212f106a55
commit a6f12ec781
5 changed files with 27 additions and 4 deletions

View file

@ -57,6 +57,8 @@
</div>
{% endif %}
{% include "partial/neighbors.html" %}
{% if article.related_posts %}
<div class="related-posts">
<h4>{{ _('You might enjoy') }}</h4>

View file

@ -0,0 +1,14 @@
{% if 'neighbors' in PLUGINS %}
<div class="neighbors">
{% if article.prev_article %}
<a class="btn float-left" href="{{ SITEURL }}/{{ article.prev_article.url }}" title="{{ article.prev_article.title }}">
<i class="fa fa-angle-left"></i> {{ _('Previous Post') }}
</a>
{% endif %}
{% if article.next_article %}
<a class="btn float-right" href="{{ SITEURL }}/{{ article.next_article.url }}" title="{{ article.next_article.title }}">
{{ _('Next Post') }} <i class="fa fa-angle-right"></i>
</a>
{% endif %}
</div>
{% endif %}