-
Notifications
You must be signed in to change notification settings - Fork 78
Update Pagination in Blog Index Page #510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
It may be worth checking out wagtail/wagtail#12607 which addresses a similar requirement, but for the Wagtail admin |
|
Thanks @zerolab for the reference, simplified the code. Updated Pagination Logic
|
|
@oz456 Thank you SO much for this PR! We appreciate you taking the time to make this contribution. I'll try to take a lot at this before the end of the week to test your work and give you some feedback. Thanks again! |
|
All right @oz456, I took a look at this and it seems like your styles need some work because this is how the pagination look for me both in the Firefox and Chrome browsers. The feature was functional, which was great. But if you could working on fixing the styles and submit again, I'd really appreciate it. |
|
@vossisboss, sorry to hear that it's not working as expected. However, I am able to view it properly on my end. I'm not sure why this is happening. but just in case, did you recompile the styles? |
|
Excellent suggestion @oz456 because my Could you restore the "Previous" and "Next" labels to the buttons? I feel like those labels are helpful, especially for users who use assistive technology. Thanks again for this submission. I appreciate the time you're taking with this. If you haven't joined the #wagtail-org channel in our Slack community yet, that is a good way to get in touch with other community members who contribute to the website. |
|
Thanks @vossisboss for reviewing this PR. The reason I initially removed the labels from the buttons was that they were causing issues in certain viewports, especially at specific edge cases. Removing the labels seemed to be the most efficient solution at that time. However, I’ve added back the labels and addressed the issue by aligning the buttons in a column layout (similar to the mobile view) until the point where the layout breaks. I'm not entirely sure if the styles are optimal yet, so let me know if they look good or if there's anything that can be improved. |




Description:
This PR updates the pagination system on the blog index page, as referenced in #349. It introduces pagination logic that aligns with the conventions outlined in the GSC docs.
Pagination Sequence Logic:
...)....) when necessary.Screenshots:
Pagination Sequence on different pages
For more than 7 pages in total:







For 7 or fewer total pages:
Pagination on Small devices