XF 2.2 How to change pagenavmain

Abraham54

Well-known member
I like to change pagenavemain via setting in extra.less.

pagenavmain.webp


Somewhere in the past, I found the extraless setting on this forum.
But I cannot find it anymore.
 
Solution
You can try this code
Less:
.pageNav-page, .pageNav-page.pageNav-page--skip.pageNav-page--skipEnd {
    background: black;
    color: white;
    &:hover {
        background: grey;
        color: black;
    }
}

.pageNav-page.pageNav-page--current {
    background: red;
    color: white;
    &:hover {
        background: grey;
        color: black;
    }
}

.pageNav-jump {
    background: blue;
    color: white;
    &:hover {
        background: grey;
        color: black;
    } 
}

Play as you like with colors, my code give this result

Capture web_6-6-2022_143934_regionalis.fr.jpeg
You can play with .pageNav-main .pageNav-page .pageNave-page--current .pageNave-page--later .pageNave-page--skip .pageNave-page--skipEnd

What do you want to change exactly ? Colors ?
 
I want to change everything.
As I wrote, in the past I could do this in extraless.
I want to change the background colors and the colors of the font.
 
You can try this code
Less:
.pageNav-page, .pageNav-page.pageNav-page--skip.pageNav-page--skipEnd {
    background: black;
    color: white;
    &:hover {
        background: grey;
        color: black;
    }
}

.pageNav-page.pageNav-page--current {
    background: red;
    color: white;
    &:hover {
        background: grey;
        color: black;
    }
}

.pageNav-jump {
    background: blue;
    color: white;
    &:hover {
        background: grey;
        color: black;
    } 
}

Play as you like with colors, my code give this result

Capture web_6-6-2022_143934_regionalis.fr.jpeg
 
Solution
Add this:
Less:
.pageNav-page:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}
.pageNav-page:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}
 
@BassMan Thank You. It looks fantastic now.


67102b171d2a5-PCS_Staandaard_Donker_Zilver.png
 
Too bad, something does not work as expected:

6710deb44f058-Screenshot_2024-10-17_at_11-53-21_Wie_is_al_naar_Windows_11_24H2_gegaan_Pagina_7_PiepCompSupport.png



Code:
.pageNav-page, .pageNav-page.pageNav-page--skip.pageNav-page--skipEnd {
    background: rgb(52, 66, 86);
    color: white;
    &:hover {
        background: rgb(148, 195, 253);
        color: black;
    }
}

.pageNav-page.pageNav-page--current {
    background: rgb(148, 195, 253);
    color: white;
        border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    &:hover {
        background: rgb(52, 66, 86);
        color: white;
    }
}

.pageNav-jump {
    background: rgb(52, 66, 86);
    color: white;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    &:hover {
        background: rgb(148, 195, 253);
        color: white;
    }
}
 
Add this:
Less:
.pageNav-page, .pageNav-page.pageNav-page--skip.pageNav-page--skipEnd {
    background: rgb(52, 66, 86);
    color: white;
    &:hover {
        background: rgb(148, 195, 253);
        color: black;
    }
}

.pageNav-page.pageNav-page--current {
    background: rgb(148, 195, 253);
    color: white;
    &:hover {
        background: rgb(52, 66, 86);
        color: white;
    }
}

.pageNav-page:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.pageNav-page:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

.pageNav-jump {
    background: rgb(52, 66, 86);
    color: white;
    &:hover {
        background: rgb(148, 195, 253);
        color: white;
    }
    &.pageNav-jump--next, &.pageNav-jump--prev {
        border-radius: 12px;
        border-radius: 12px;
    }
}

This code will add border-radius to Next and Prev buttons on both sides. Page numbers will have border-radius only on the first and last item.
 
Back
Top Bottom