Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
flexi_style
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
flexi_style
Commits
ff4e9912
Commit
ff4e9912
authored
9 months ago
by
Kartik Khandelwal
Committed by
Anoop Singh
9 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Resolve
#3447852
"Mini pager need"
parent
7937e481
No related branches found
No related tags found
1 merge request
!3
Resolve #3447852 "Mini pager need"
Pipeline
#183180
passed
8 months ago
Stage: build
Stage: test
Stage: deploy
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
css/component/pager.css
+13
-3
13 additions, 3 deletions
css/component/pager.css
templates/misc/pager.html.twig
+2
-3
2 additions, 3 deletions
templates/misc/pager.html.twig
templates/misc/views-mini-pager.html.twig
+53
-0
53 additions, 0 deletions
templates/misc/views-mini-pager.html.twig
with
68 additions
and
6 deletions
css/component/pager.css
+
13
−
3
View file @
ff4e9912
.pager
ul
.pager-items
{
font-size
:
14px
;
list-style
:
none
;
display
:
flex
;
justify-content
:
center
;
gap
:
0
4px
;
}
.pager
ul
.pager-items
li
{
padding
:
0
5px
;
color
:
var
(
--primary
);
}
.pager
.pager-items
li
>
*
{
display
:
block
;
padding
:
5px
10px
;
border-radius
:
4px
;
background-color
:
var
(
--style_gray_200
);
}
.pager
.pager-items
li
>
*
:hover
,
.pager
.pager-items
li
.is-active
>
*
{
color
:
var
(
--white
);
background-color
:
var
(
--primary
);
}
This diff is collapsed.
Click to expand it.
templates/misc/pager.html.twig
+
2
−
3
View file @
ff4e9912
...
...
@@ -38,12 +38,11 @@
set
pagerClass
=
[
'pager-items'
,
'js-pager-items'
,
'p-0'
,
'm-top-3'
,
'list-unstyled'
,
]
%}
{%
if
items
%}
<nav
class=
"pager"
role=
"navigation"
aria-labelledby=
"
{{
heading_id
}}
"
>
<nav
class=
"pager
my-4
"
role=
"navigation"
aria-labelledby=
"
{{
heading_id
}}
"
>
<h4
id=
"
{{
heading_id
}}
"
class=
"visually-hidden"
>
{{
'Pagination'
|
t
}}
</h4>
<ul
{{
attributes.addClass
(
pagerClass
)
}}
>
{# Print first item if we are not on the first page. #}
...
...
This diff is collapsed.
Click to expand it.
templates/misc/views-mini-pager.html.twig
0 → 100644
+
53
−
0
View file @
ff4e9912
{#
/**
* @file
* Theme override for a views mini-pager.
*
* Available variables:
* - heading_id: Pagination heading ID.
* - items: List of pager items.
*
* @see template_preprocess_views_mini_pager()
*/
#}
{{
attach_library
(
'flexi_style/pager'
)
}}
{%
set
pagerClass
=
[
'pager-items'
,
'js-pager-items'
,
'list-unstyled'
,
]
%}
{%
if
items.previous
or
items.next
%}
<nav
class=
"pager my-4"
role=
"navigation"
aria-labelledby=
"
{{
heading_id
}}
"
>
<h4
id=
"
{{
heading_id
}}
"
class=
"visually-hidden"
>
{{
'Pagination'
|
t
}}
</h4>
<ul
{{
attributes.addClass
(
pagerClass
)
}}
>
{%
if
items.previous
%}
<li
class=
"pager-item pager-item--previous"
>
<a
href=
"
{{
items.previous.href
}}
"
title=
"
{{
'Go to previous page'
|
t
}}
"
{{
items.previous.attributes
|
without
(
'href'
,
'title'
)
}}
>
<span
class=
"visually-hidden"
>
{{
'Previous page'
|
t
}}
</span>
{# Uncomment the next line if you want to display the text for the previous page link #}
<span
aria-hidden=
"true"
>
{{
items.previous.text
|
default
(
'‹ '
|
t
)
}}
</span>
</a>
</li>
{%
endif
%}
{%
if
items.current
%}
<li
class=
"pager-item is-active"
>
{%
set
title
=
'Current page'
|
t
%}
<span
class=
"visually-hidden"
>
{{
'Current page'
|
t
}}
</span>
<span>
{{
items.current
}}
</span>
</li>
{%
endif
%}
{%
if
items.next
%}
<li
class=
"pager-item pager-item--next"
>
<a
href=
"
{{
items.next.href
}}
"
title=
"
{{
'Go to next page'
|
t
}}
"
{{
items.next.attributes
|
without
(
'href'
,
'title'
)
}}
>
<span
class=
"visually-hidden"
>
{{
'Next page'
|
t
}}
</span>
<span
aria-hidden=
"true"
>
{{
items.next.text
|
default
(
' ›'
|
t
)
}}
</span>
</a>
</li>
{%
endif
%}
</ul>
</nav>
{%
endif
%}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment