<ul class="nav justify-content-center">
    <ul class="pagination">
    <% if (page.prev == 0){ %>
      <li class="nav-item">
        <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Prev</a>
      </li>
    <% } %>
    <% if (page.prev > 1){ %>
      <li class="nav-item">
        <a class="nav-link" href="<%= page.prev_link %>">Prev</a>
      </li>
    <% } %>
    <% if (page.prev == 1){ %>
      <li class="nav-item">
        <a class="nav-link" href="<%= config.root %>">Prev</a>
      </li>
    <% } %>
    <% if (page.current == 1){ %>
      <li class="nav-item">
        <a class="nav-link disabled" aria-current="page" aria-disabled="true" href="<%= config.root %>">1</a>
      </li>
    <% } %>
    <% if (page.current !== 1){ %>
      <li class="nav-item">
        <a class="nav-link" href="<%= config.root %>">1</a>
      </li>
    <% } %>
    <% for (var i =2; i < page.current;  i++ ) { %>
      <li class="nav-item">
        <a class="nav-link" href="<%= config.root %>page/<%= i %>"><%= i %> </a>
      </li>
    <% } %>
    <% if (page.current !== 1){ %>
      <li class="nav-item disabled" aria-current="page" aria-disabled="true">
        <%= page.current %>
      </li>
    <% } %>
    <% for (var i =page.current + 1; i <= page.total;  i++ ) { %>
      <li class="nav-item">
        <a class="nav-link" href="<%= config.root %>page/<%= i %>"><%= i %> </a>
      </li>
    <% } %>
    <% if (page.next == 0){ %>
      <li class="nav-item">
        <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Next</a>
      </li>
    <% } %>
    <% if (page.next !== 0){ %>
      <li class="nav-item">
        <a class="nav-link" href="<%= page.next_link %>">Next</a>
      </li>
    <% } %>
    </ul>
  </ul>