feat: select page web component

This commit is contained in:
Cory Dransfeldt 2024-04-07 09:42:49 -07:00
parent 5cda0d563f
commit 993266981c
No known key found for this signature in database
7 changed files with 52 additions and 50 deletions

View file

@ -40,4 +40,6 @@ We wait for the document to load, select the pagination DOM node, get the curren
Within the `change` event listener I check whether we've extracted a url segment *and* that the last segment is a valid number — if not, we add a new numeric segment. If it is numeric, we replace it with the new page number. Finally, we have special handling for the root section — because my first page is at `/` and the second is at `/1/` we need to correctly navigate the user should the pageNumber be `0`.
With that, we have quicker and more convenient page navigation for users that have JavaScript enabled and a handy page count for users that have disabled JavaScript in their browser.
With that, we have quicker and more convenient page navigation for users that have JavaScript enabled and a handy page count for users that have disabled JavaScript in their browser.
{% render "partials/banners/npm.liquid", url: 'https://www.npmjs.com/package/@cdransf/select-pagination', command: 'npm i @cdransf/select-pagination' %}