Personal blog written from scratch using Node.js, Bootstrap, and MySQL. https://jrtechs.net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

52 lines
1.8 KiB

{if pagination}
<div class="row justify-content-center w-100">
<div class="col-md-6 col-12">
<nav aria-label="...">
<ul class="pagination">
{if pagination.previous}
<li class="page-item">
<a class="page-link" href="{pagination.previous.url}">
Previous
</a>
</li>
{else}
<li class="page-item disabled">
<span class="page-link">
Previous
</span>
</li>
{/if}
{for page in pagination.pages}
{if page.isCurrent}
<li class="page-item active">
<span class="page-link">
{page.number}
<span class="sr-only">(current)</span>
</span>
</li>
{else}
<li class="page-item">
<a class="page-link" href="{page.url}">
{page.number}
</a>
</li>
{/if}
{/for}
{if pagination.next}
<li class="page-item">
<a class="page-link" href="{pagination.next.url}">
Next
</a>
</li>
{else}
<li class="page-item disabled">
<span class="page-link">
Next
</span>
</li>
{/if}
</ul>
</nav>
</div>
</div>
{/if}