<div class="related-pages">
  {% if prev -%}
  <a class="prev-page" href="{{ prev.link }}">
    <div class="page-info">
      <div class="context">
        <span>{{ _("Previous") }}</span>
      </div>
      {% if prev.link == pathto(root_doc) %}
      <div class="title">{{ _("Home") }}</div>
      {% else %}
      <div class="title">{{ prev.title }}</div>
      {% endif %}
    </div>
  </a>
  {%- endif %} {% if next -%}
  <a class="next-page" href="{{ next.link }}">
    <div class="page-info">
      <div class="context">
        <span>{{ _("Next") }}</span>
      </div>
      <div class="title">{{ next.title }}</div>
    </div>
  </a>
  {%- endif %}
</div>
