<hr class="mt-5">
<div class="d-flex justify-content-between">
  <div>
    {% if include.previousHref and include.previousText %}
      <a href="{{ include.previousHref }}">{{ include.previousText }}</a>
    {% endif %}
  </div>
  <div>
    {% if include.nextHref and include.nextText %}
      <a href="{{ include.nextHref }}">{{ include.nextText }}</a>
    {% endif %}
  </div>
</div>

<hr class="mt-5">
<div class="d-flex flex-wrap justify-content-between">
  <div class="mr-4">
    {% if include.previousHref and include.previousText %}
      <a href="{{ include.previousHref }}">{{ include.previousText }}</a>
    {% endif %}
  </div>
  <div class="ml-auto">
    {% if include.nextHref and include.nextText %}
      <a href="{{ include.nextHref }}">{{ include.nextText }}</a>
    {% endif %}
  </div>
</div>

Move links above each other on narrow screens
Move links above each other on narrow screens
