<div class="pagination">
<a class="button rounded-circle" data-table-scroll="start">❮</a>
<a href="#1" class="pagination__link ">
1
</a>
<a href="#2" class="pagination__link ">
2
</a>
<a href="#3" class="pagination__link is-active">
3
</a>
<a href="#4" class="pagination__link ">
4
</a>
<a class="pagination__link ">
...
</a>
<a href="#17" class="pagination__link ">
17
</a>
<a href="#18" class="pagination__link ">
18
</a>
<a href="#19" class="pagination__link ">
19
</a>
<a href="#20" class="pagination__link ">
20
</a>
<a class="button rounded-circle" data-table-scroll="end">❯</a>
</div>
<div class="pagination">
<a class="button rounded-circle" data-table-scroll="start">❮</a>
{{#if radio}}
<div class="input--radio-group radio-group--row">
{{#each items}}
<div class="input input--radio mb-0">
<input
type="radio"
name="{{value}}"
id="{{value}}-{{@index}}"
value="{{value}}"
{{#if active}} checked{{/if}}
{{#if disabled}} disabled{{/if}}
/>
<label class="input__label" for="{{value}}-{{@index}}">{{ text }}</label>
</div>
{{/each}}
</div>
{{else}}
{{#each items}}
<a {{#if value}} href="#{{ value }}" {{/if}} class="pagination__link {{#if active}} is-active{{/if}}">
{{ text }}
</a>
{{/each}}
{{/if}}
<a class="button rounded-circle" data-table-scroll="end">❯</a>
</div>
{
"controls": {
"circle": true
},
"items": [
{
"value": 1,
"text": "1"
},
{
"value": 2,
"text": "2"
},
{
"value": 3,
"text": "3",
"active": true
},
{
"value": 4,
"text": "4"
},
{
"text": "..."
},
{
"value": 17,
"text": "17"
},
{
"value": 18,
"text": "18"
},
{
"value": 19,
"text": "19"
},
{
"value": 20,
"text": "20"
}
]
}
.pagination {
display: flex;
justify-content: center;
align-items: center;
gap: 1rem;
&__link {
display: block;
font-family: var(--headline-font-family);
font-weight: 500;
font-size: 1.5rem;
cursor: pointer;
}
.is-disabled {
opacity: .5;
pointer-events: none;
cursor: default;
}
.button {
flex: none;
}
.is-active {
color: var(--brand-color-secondary);
}
.radio-group {
display: flex;
gap: 1rem;
}
input[type=radio] {
display: none;
+ label {
display: block;
cursor: pointer;
}
&:checked + label {
color: var(--brand-color-secondary);
}
}
}
No notes defined.