Highlight current page in pagination (#207)
This commit is contained in:
1 parent
28791ea0e7
commit
a96a21289d
2 files changed
+17
-1
No files matched your search
@@ -9,6 +9,10 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pages {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
.page, .ellipsis {
|
.page, .ellipsis {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 6px 1rem;
|
padding: 6px 1rem;
|
||||||
@@ -36,6 +40,10 @@
|
|||||||
border-bottom-left-radius: 7px;
|
border-bottom-left-radius: 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.current {
|
||||||
|
background-color: var(--color3);
|
||||||
|
}
|
||||||
|
|
||||||
.next {
|
.next {
|
||||||
border-top-right-radius: 7px;
|
border-top-right-radius: 7px;
|
||||||
border-bottom-right-radius: 7px;
|
border-bottom-right-radius: 7px;
|
||||||
|
|||||||
@@ -5,7 +5,15 @@
|
|||||||
<i class="fa-solid fa-arrow-left"></i>
|
<i class="fa-solid fa-arrow-left"></i>
|
||||||
</a>
|
</a>
|
||||||
<div class="pages">
|
<div class="pages">
|
||||||
{% for page in paging.pages %}{% if page != "..." %}<a class="page" href="/{{ paging.url }}/{{ page }}">{{ page }}</a>{% else %}<span class="page ellipsis"><i class="fa-solid fa-fw fa-1x fa-ellipsis"></i></span>{% endif %}{% endfor %}
|
{% for page in paging.pages %}
|
||||||
|
{% if page == "..." %}
|
||||||
|
<span class="page ellipsis"><i class="fa-solid fa-fw fa-1x fa-ellipsis"></i></span>
|
||||||
|
{% elif page == paging.page %}
|
||||||
|
<a class="page current" href="/{{ paging.url }}/{{ page }}">{{ page }}</a>
|
||||||
|
{% else %}
|
||||||
|
<a class="page" href="/{{ paging.url }}/{{ page }}">{{ page }}</a>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<a class="page next" href="/{{ paging.url }}/{{ paging.next }}">
|
<a class="page next" href="/{{ paging.url }}/{{ paging.next }}">
|
||||||
<i class="fa-solid fa-arrow-right"></i>
|
<i class="fa-solid fa-arrow-right"></i>
|
||||||
|
|||||||
Reference in new issue
Block a user