aboutsummaryrefslogtreecommitdiffstats
path: root/theme/mkdocs_windmill/article-nav.html
blob: 3f21b96aad3fcc368d2fcb043a688dab6b3bb031 (plain)
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
27
28
29
30
31
32
33
34
35
36
37
{% block article_nav %}
  {%- if page and (page.next_page or page.previous_page) %}

    {# Workaround to keep mkdocs 0.17 working for now, which has no 'url' filter. #}
    {% if mkdocs_version >= "1" %}
      {% from "page-nav-urls.html" import next_page, prev_page with context %}
    {% else %}
      {% set next_page = page.next_page.url %}
      {% set prev_page = page.previous_page.url %}
    {% endif %}

  <div class="row wm-article-nav-buttons" role="navigation" aria-label="navigation">
    {% if page.next_page %}
    <div class="wm-article-nav pull-right">
      <a href="{{ next_page }}" class="btn btn-xs btn-default pull-right">
        Next
        <i class="fa fa-chevron-right" aria-hidden="true"></i>
      </a>
      <a href="{{ next_page }}" class="btn btn-xs btn-link">
        {{ page.next_page.title }}
      </a>
    </div>
    {% endif %}

    {%- if page.previous_page %}
    <div class="wm-article-nav">
      <a href="{{ prev_page }}" class="btn btn-xs btn-default pull-left">
        <i class="fa fa-chevron-left" aria-hidden="true"></i>
        Previous</a><a href="{{ prev_page }}" class="btn btn-xs btn-link">
        {{ page.previous_page.title }}
      </a>
    </div>
    {% endif %}
  </div>

  {%- endif %}
{% endblock %}