generated from rich-id/bundle-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dumazeau
committed
Oct 12, 2023
1 parent
14a61bb
commit 54a34d7
Showing
3 changed files
with
47 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,47 @@ | ||
{% spaceless %} | ||
{% if nbPages > 1 %} | ||
<nav> | ||
<ul class="terms-pagination"> | ||
<li class="{% if currentPage == 1 %}disabled{% endif %}"> | ||
<button type="button" class="page-link" {% if currentPage == 1 %}disabled="disabled"{% endif %} onclick="paginationGoTo({{ currentPage }} - 1)"> | ||
<i class="icon-arrow_back picto"></i> | ||
</button> | ||
</li> | ||
{% if nbPages > 1 %} | ||
<nav> | ||
<ul class="terms-pagination"> | ||
<li class="{% if currentPage == 1 %}disabled{% endif %}"> | ||
<button type="button" class="page-link" {% if currentPage == 1 %}disabled="disabled"{% endif %} onclick="paginationGoTo({{ currentPage }} - 1)"> | ||
<i class="icon-arrow_back picto"></i> | ||
</button> | ||
</li> | ||
|
||
{% for i in 1..nbPages %} | ||
{% if 0 == (currentPage - 3) - loop.index %} | ||
<li> | ||
<button type="button" class="page-link" onclick="paginationGoTo(1)">1</button> | ||
</li> | ||
{% for i in 1..nbPages %} | ||
{% if 0 == (currentPage - 3) - loop.index %} | ||
<li> | ||
<button type="button" class="page-link" onclick="paginationGoTo(1)">1</button> | ||
</li> | ||
|
||
{% if 1 != loop.index %} | ||
<li class="disabled"><span class="page-numbers page-link">...</span></li> | ||
{% endif %} | ||
{% elseif 0 == (currentPage + 3) - loop.index and (currentPage + 3) < nbPages %} | ||
{% if 1 != loop.index %} | ||
<li class="disabled"><span class="page-numbers page-link">...</span></li> | ||
{% elseif 0 < (currentPage - 3) - loop.index %} | ||
{% elseif 0 > (currentPage + 3) - loop.index %} | ||
{% endif %} | ||
{% elseif 0 == (currentPage + 3) - loop.index and (currentPage + 3) < nbPages %} | ||
<li class="disabled"><span class="page-numbers page-link">...</span></li> | ||
{% elseif 0 < (currentPage - 3) - loop.index %} | ||
{% elseif 0 > (currentPage + 3) - loop.index %} | ||
{% else %} | ||
{% if currentPage == loop.index %} | ||
<li class="current"><span class="page-numbers current page-link" aria-current="page">{{ loop.index }}</span></li> | ||
{% else %} | ||
{% if currentPage == loop.index %} | ||
<li class="current"><span class="page-numbers current page-link" aria-current="page">{{ loop.index }}</span></li> | ||
{% else %} | ||
<li> | ||
<button type="button" class="page-link" onclick="paginationGoTo({{ loop.index }})">{{ loop.index }}</button> | ||
</li> | ||
{% endif %} | ||
|
||
<li> | ||
<button type="button" class="page-link" onclick="paginationGoTo({{ loop.index }})">{{ loop.index }}</button> | ||
</li> | ||
{% endif %} | ||
{% endfor %} | ||
{% if currentPage != nbPages and (currentPage + 3) < nbPages %} | ||
<li> | ||
<button type="button" class="page-link" onclick="paginationGoTo({{ nbPages }})">{{ nbPages }}</button> | ||
</li> | ||
{% endif %} | ||
|
||
<li class="{% if currentPage >= nbPages %}disabled{% endif %}"> | ||
<button type="button" class="page-link" {% if currentPage >= nbPages %}disabled="disabled"{% endif %} onclick="paginationGoTo({{ currentPage }} + 1)"> | ||
<i class="icon-arrow_forward picto"></i> | ||
</button> | ||
{% endif %} | ||
{% endfor %} | ||
{% if currentPage != nbPages and (currentPage + 3) < nbPages %} | ||
<li> | ||
<button type="button" class="page-link" onclick="paginationGoTo({{ nbPages }})">{{ nbPages }}</button> | ||
</li> | ||
</ul> | ||
</nav> | ||
{% endif %} | ||
{% endspaceless %} | ||
{% endif %} | ||
|
||
<li class="{% if currentPage >= nbPages %}disabled{% endif %}"> | ||
<button type="button" class="page-link" {% if currentPage >= nbPages %}disabled="disabled"{% endif %} onclick="paginationGoTo({{ currentPage }} + 1)"> | ||
<i class="icon-arrow_forward picto"></i> | ||
</button> | ||
</li> | ||
</ul> | ||
</nav> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters