{# ========================================================= PAGINATION WhileResume — design aligné sur le footer Compatible KnpPaginator (variables: pageCount, previous, next, pagesInRange, current, route, query, pageParameterName) ========================================================= #}<style> /* ---------- Pagination WhileResume ---------- */ .whr-pagination { margin: 28px 0 8px; padding: 14px 18px; display: flex; justify-content: center; } .whr-pagination ul { display: inline-flex; align-items: center; gap: 6px; list-style: none; padding: 6px; margin: 0; background: #F9FAFD; border-radius: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); } .theme-dark .whr-pagination ul { background: #2a2a3c; box-shadow: none; } .whr-pagination li { line-height: 1; } .whr-pagination a, .whr-pagination span.whr-page { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 12px; border-radius: 10px; font-size: 13px; font-weight: 600; color: #2c2c46; text-decoration: none !important; transition: background .2s ease, color .2s ease, transform .15s ease; } .theme-dark .whr-pagination a, .theme-dark .whr-pagination span.whr-page { color: #e9e9ef; } .whr-pagination a:hover { background: #fff; color: var(--theme-color, #6C3AED); transform: translateY(-1px); } .theme-dark .whr-pagination a:hover { background: #34344a; color: #fff; } /* Page active */ .whr-pagination .whr-active a, .whr-pagination a.whr-active { background: var(--theme-color, #6C3AED); color: #fff !important; cursor: default; pointer-events: none; box-shadow: 0 2px 8px rgba(108, 58, 237, .25); } /* État disabled (prev/next non disponibles) */ .whr-pagination .whr-disabled span.whr-page { opacity: .35; cursor: not-allowed; } /* Flèches prev / next */ .whr-pagination .whr-nav svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; } /* Ellipsis (…) entre numéros si jamais ajouté */ .whr-pagination .whr-ellipsis { min-width: auto; padding: 0 6px; color: inherit; opacity: .5; font-weight: 400; cursor: default; } @media (max-width: 575.98px) { .whr-pagination { margin: 20px 0 4px; padding: 10px 8px; } .whr-pagination a, .whr-pagination span.whr-page { min-width: 32px; height: 32px; padding: 0 9px; font-size: 12px; } }</style>{% if pageCount > 1 %} <nav class="whr-pagination" role="navigation" aria-label="Pagination"> <ul> {# === Prev === #} {% if previous is defined %} <li class="whr-nav"> <a href="{{ path(route, query|merge({(pageParameterName): previous})) }}" aria-label="{{ 'pagination.previous'|trans({}, 'whr-public')|default('Précédent') }}" rel="prev"> <svg viewBox="0 0 24 24" aria-hidden="true"> <polyline points="15 18 9 12 15 6"></polyline> </svg> </a> </li> {% else %} <li class="whr-nav whr-disabled" aria-hidden="true"> <span class="whr-page"> <svg viewBox="0 0 24 24" aria-hidden="true"> <polyline points="15 18 9 12 15 6"></polyline> </svg> </span> </li> {% endif %} {# === Pages === #} {% for page in pagesInRange %} {% if page != current %} <li> <a href="{{ path(route, query|merge({(pageParameterName): page})) }}" aria-label="{{ 'pagination.page'|trans({}, 'whr-public')|default('Page') }} {{ page }}"> {{ page }} </a> </li> {% else %} <li class="whr-active"> <a href="#" class="whr-active" aria-current="page">{{ page }}</a> </li> {% endif %} {% endfor %} {# === Next === #} {% if next is defined %} <li class="whr-nav"> <a href="{{ path(route, query|merge({(pageParameterName): next})) }}" aria-label="{{ 'pagination.next'|trans({}, 'whr-public')|default('Suivant') }}" rel="next"> <svg viewBox="0 0 24 24" aria-hidden="true"> <polyline points="9 6 15 12 9 18"></polyline> </svg> </a> </li> {% else %} <li class="whr-nav whr-disabled" aria-hidden="true"> <span class="whr-page"> <svg viewBox="0 0 24 24" aria-hidden="true"> <polyline points="9 6 15 12 9 18"></polyline> </svg> </span> </li> {% endif %} </ul> </nav>{% endif %}