Skip to content
Snippets Groups Projects
Commit ff4e9912 authored by Kartik Khandelwal's avatar Kartik Khandelwal Committed by Anoop Singh
Browse files

Resolve #3447852 "Mini pager need"

parent 7937e481
No related branches found
No related tags found
1 merge request!3Resolve #3447852 "Mini pager need"
Pipeline #183180 passed
.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);
}
......@@ -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. #}
......
{#
/**
* @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 %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment