hackathon-git-labs icon indicating copy to clipboard operation
hackathon-git-labs copied to clipboard

Community section pagination

Open auxfuse opened this issue 2 years ago • 3 comments

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

auxfuse avatar Sep 17 '22 22:09 auxfuse

@manni8436 is tackling this one 🦾 Legend!

auxfuse avatar Oct 02 '22 18:10 auxfuse

Look forward to the challenge 😄

manni8436 avatar Oct 02 '22 18:10 manni8436

@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 :).

seanyoung247 avatar Oct 15 '22 14:10 seanyoung247

Closing to suit PRs submitted by:

  • @manni8436 on the implementation of the componenet #168
  • @auxfuse on the styling and positioning #211

auxfuse avatar Jan 18 '23 18:01 auxfuse