hackathon-git-labs
hackathon-git-labs copied to clipboard
Community section pagination
Community elements to include pagination of easy to navigate number
- 5/6 per page
- should utilise current layout flex structure
- Pure Javascript implementation, no frameworks or package installs
@manni8436 is tackling this one 🦾 Legend!
Look forward to the challenge 😄
@manni8436 I thought I'd just drop you a quick message. I've restructured the card generation code a bit and some of the changes could help with pagination. If you look at createParticipantesCards
in main.js, it takes the list of participants and some other inputs and generates the cards to add them to the index page. It optionally takes an array of indexes which will define which participants to generate cards for.
So if you gave it an index array of [0,..,participants.length-1]
it would generate cards for all participants. If however you gave it an array of [0,1,2,3,4]
it would only show the first 5 participants, [5,6,7,8,9]
then next 5 and so on.
Hopefully that's helpful :).
Closing to suit PRs submitted by:
- @manni8436 on the implementation of the componenet #168
- @auxfuse on the styling and positioning #211