Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ChihuahUI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIP
Labrador
ChihuahUI
Merge requests
!2
Add Pagination Styles
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
Add Pagination Styles
add-pagination
into
master
Overview
5
Commits
5
Pipelines
11
Changes
2
All threads resolved!
Thread options
Hide all comments
Merged
Add Pagination Styles
Timur Oberhuber
requested to merge
add-pagination
into
master
Jun 11, 2023
Overview
5
Commits
5
Pipelines
11
Changes
2
All threads resolved!
Thread options
Hide all comments
Adds necessary pagination styles (copied (mostly) from Queue).
1
0
Merge request reports
Compare
master
version 6
27f17abc
Jul 28, 2023
version 5
818cb96c
Jul 28, 2023
version 4
0bf6fd7f
Jul 25, 2023
version 3
0bf6fd7f
Jul 25, 2023
version 2
0bf6fd7f
Jun 25, 2023
version 1
423e4cc1
Jun 11, 2023
master (base)
and
version 5
latest version
44e87c89
5 commits,
Jul 28, 2023
version 6
27f17abc
4 commits,
Jul 28, 2023
version 5
818cb96c
3 commits,
Jul 28, 2023
version 4
0bf6fd7f
2 commits,
Jul 25, 2023
version 3
0bf6fd7f
2 commits,
Jul 25, 2023
version 2
0bf6fd7f
2 commits,
Jun 25, 2023
version 1
423e4cc1
1 commit,
Jun 11, 2023
2 files
+
134
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
docs/index.html
+
91
−
0
View file @ 818cb96c
Edit in single-file editor
Open in Web IDE
Show full file
@@ -353,6 +353,97 @@
</div>
</div>
<div
class=
"flex vertical gap-3"
>
<h2
class=
"font-500"
>
Pagination
</h2>
<nav
aria-label=
"Page navigation"
class=
"pagination"
data-page=
"1"
th:data-page-size=
"25"
>
<ul
role=
"list"
>
<!-- Only show if more than 1 page -->
<li
data-disabled=
"true"
class=
"page__item"
>
<span
class=
"page__link"
>
«
</span>
</li>
<!-- More pages than "spots" in the pagination -->
<block>
<block>
<block>
<li
data-active=
"true"
class=
"page__item"
>
<span
class=
"page__link"
>
1
</span>
</li>
<li
data-active=
"false"
class=
"page__item"
>
<button
data-page=
"2"
class=
"page__link"
>
2
</button>
</li>
<li
data-active=
"false"
class=
"page__item"
>
<button
data-page=
"3"
class=
"page__link"
>
3
</button>
</li>
</block>
</block>
<block>
<li
class=
"page__item"
><a
href=
"#"
class=
"page__link"
>
...
</a></li>
</block>
</block>
</ul>
</nav>
<nav
aria-label=
"Page navigation"
class=
"pagination"
data-page=
"4"
data-page-size=
"25"
>
<ul
role=
"list"
>
<block>
<!-- Display if current page > number of "spots" in pagination -->
<li
class=
"page__item"
><a
href=
"#"
class=
"page__link"
>
...
</a></li>
</block>
<!-- Fewer pages than "spots" in the pagination -->
<block>
<block>
<li
data-active=
"false"
class=
"page__item"
>
<button
data-page=
"2"
class=
"page__link"
>
2
</button>
</li>
<li
data-active=
"false"
class=
"page__item"
>
<button
data-page=
"3"
class=
"page__link"
>
3
</button>
</li>
<li
data-active=
"true"
class=
"page__item"
>
<span
class=
"page__link"
>
4
</span>
</li>
</block>
</block>
<!-- If this is the last page -->
<li
data-disabled=
"true"
class=
"page__item"
>
<span
class=
"page__link"
>
»
</span>
</li>
</ul>
</nav>
<code>
<!-- JS to change the page query parameter -->
<script>
$
(()
=>
{
$
(
"
.pagination button.page__link
"
).
click
(
function
()
{
let
url
=
new
URL
(
window
.
location
);
url
.
searchParams
.
set
(
"
page
"
,
$
(
this
).
data
(
"
page
"
));
window
.
location
=
url
.
href
;
});
});
</script>
</code>
</div>
</main>
<script>
Loading