forked from elixirschool/elixirschool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
section-pagination.html
26 lines (24 loc) · 989 Bytes
/
section-pagination.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{% assign pagination = page.leaf %}
{% unless pagination.previous == nil and pagination.next == nil %}
<section>
<div class="row">
{% unless pagination.previous == nil %}
{% assign previous = site.tree[page.lang][pagination.previous.section][pagination.previous.chapter] %}
{% if pagination.previous.section == 'home' %}
{% assign title = site.data.locales[page.lang].sections.home %}
{% else %}
{% assign title = previous.title %}
{% endif %}
<div class="6u 12u$(small)">
<a class="button special fit" href="{{ previous.url }}" title="{{ title }}">← {{ title }}</a>
</div>
{% endunless %}
{% unless pagination.next == nil %}
{% assign next = site.tree[page.lang][pagination.next.section][pagination.next.chapter] %}
<div class="6u 12u$(small)">
<a class="button special fit" href="{{ next.url }}" title="{{ next.title }}">{{ next.title }} →</a>
</div>
{% endunless %}
</div>
</section>
{% endunless %}