spirrit / meleeuk

Melee UK community hub site
https://melee.uk
3 stars 0 forks source link

refactor rankings javascript #40

Open spirrit opened 1 month ago

spirrit commented 1 month ago

Right now the rankings require you to add a case to an ever-growing switch statement that passes data to the table rendering funcs. It can be made easier to maintain by getting that data from each file in a _data/rankings folder.

There are a lot of moving parts in ranking.js and I'm 100% sure that it can be cleaned up to be more efficient and maintainable.

spirrit commented 1 month ago

maybe instead of using the global _data folder we can use: https://www.11ty.dev/docs/data-template-dir/

directory specific data files