merge conflict
This commit is contained in:
@@ -143,6 +143,54 @@
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Pagination -->
|
||||
<div class="row mt-4" th:if="${not #lists.isEmpty(articles)}">
|
||||
<div class="col-md-12">
|
||||
<nav aria-label="Page navigation example">
|
||||
<ul class="pagination justify-content-center">
|
||||
<!-- Bouton pour la première page -->
|
||||
<li class="page-item">
|
||||
<a class="page-link" th:href="@{/(page=0)}">
|
||||
<span aria-hidden="true">«</span>
|
||||
<span th:text="#{home.button.first}"></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<!-- Bouton pour la page précédente -->
|
||||
<li th:if="${currentPage > 0}" class="page-item">
|
||||
<a class="page-link" th:href="@{/(page=${currentPage - 1})}">
|
||||
<span aria-hidden="true">‹</span>
|
||||
<span th:text="#{home.button.previous}"></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<!-- Boucle pour afficher les numéros de page -->
|
||||
<!-- Vous pouvez ajuster la plage de pages affichées comme vous le souhaitez -->
|
||||
<th:block th:each="page,iter : ${#numbers.sequence(0, totalPages - 1)}">
|
||||
<li class="page-item" th:if="${iter.index >= (currentPage - 2) && iter.index <= (currentPage + 2)}">
|
||||
<a class="page-link" th:href="@{/(page=${page})}" th:text="${page} + 1"></a>
|
||||
</li>
|
||||
</th:block>
|
||||
|
||||
<!-- Bouton pour la page suivante -->
|
||||
<li th:if="${currentPage < totalPages - 1}" class="page-item">
|
||||
<a class="page-link" th:href="@{/(page=${currentPage + 1})}">
|
||||
<span aria-hidden="true">›</span>
|
||||
<span th:text="#{home.button.next}"></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<!-- Bouton pour la dernière page -->
|
||||
<li class="page-item">
|
||||
<a class="page-link" th:href="@{/(page=${totalPages - 1})}">
|
||||
<span aria-hidden="true">»</span>
|
||||
<span th:text="#{home.button.end}"></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user