<?php use CodeIgniter\Pager\PagerRenderer; /** * @var PagerRenderer $pager */ $pager->setSurroundCount(2); ?> <nav aria-label="<?= lang('Pager.pageNavigation') ?>"> <ul class="pagination"> <?php if ($pager->hasPrevious()) : ?> <li> <a class="page-link" href="<?= $pager->getFirst() ?>" aria-label="<?= lang('Pager.first') ?>" title="<?= lang('Pager.first') ?>"> <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/><polyline points="11 7 6 12 11 17" /> <polyline points="17 7 12 12 17 17" /></svg> </a> </li> <li> <a class="page-link" href="<?= $pager->getPrevious() ?>" aria-label="<?= lang('Pager.previous') ?>" title="<?= lang('Pager.previous') ?>"> <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none"/><polyline points="15 6 9 12 15 18" /> </svg> </a> </li> <?php endif ?> <?php foreach ($pager->links() as $link) : ?> <li class="page-item <?= $link['active'] ? 'active' : '' ?>"> <a class="page-link" href="<?= $link['uri'] ?>"> <?= $link['title'] ?> </a> </li> <?php endforeach ?> <?php if ($pager->hasNext()) : ?> <li> <a class="page-link" href="<?= $pager->getNext() ?>" aria-label="<?= lang('Pager.next') ?>" title="<?= lang('Pager.next') ?>"> <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/><polyline points="9 6 15 12 9 18" /> </svg> </a> </li> <li> <a class="page-link" href="<?= $pager->getLast() ?>" aria-label="<?= lang('Pager.last') ?>" title="<?= lang('Pager.last') ?>"> <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/><polyline points="7 7 12 12 7 17" /> <polyline points="13 7 18 12 13 17" /></svg> </a> </li> <?php endif ?> </ul> </nav>