Files
openfoodnetwork/app/webpacker/css/admin_v3/components/pagination.scss
Jean-Baptiste Bellet 47f21cb59e Add pagination with pagy
For `admin_style_v3` use `<` and `>` for next and previous link

instead of `next` and `previous` string

Extract a mixin for a default box-shadow

Maybe this needs to be redefined. Let's see how next things goes.

When a table is followed by a pagination, remove its margin-bottom + border

Finally, design the pagination component

Add sorting/pagination module, on top of table

We use `cablea_ready.replace`, so need to add `#products-content` id

Use a `pagy` partial with reflex action, instead of the legacy one

- revert the legacy one to its previous state
 - in reflex, fetch product with page attribute, 1 by default

Move `pagy` into `admin/shared/v3/` to be reusable

+ use fontawesome icons for next and previous page

Remove useless line
2023-07-19 14:58:39 +02:00

55 lines
830 B
SCSS

.pagination {
text-align: center;
margin: 0 0 1em;
padding: 10px 0;
background-color: $color-7;
.page {
width: 40px;
line-height: 40px;
text-align: center;
display: inline-block;
text-align: center;
background-color: $color-1;
@include defaultBoxShadow;
border-radius: 4px;
color: $color-9;
&.current {
background-color: $color-5;
color: $white;
}
&.prev {
margin-right: 20px;
}
&.next {
margin-left: 20px;
}
&.disabled {
cursor: default;
}
}
button {
margin: 0 0.35em;
background-color: $white;
color: $near-black;
box-shadow: $color-btn-shadow;
&.active {
color: $white;
background-color: $red;
cursor: default;
}
&.disabled {
display: none;
}
}
}