diff --git a/routes/routes.js b/routes/routes.js index a56c95d..e72e3a0 100644 --- a/routes/routes.js +++ b/routes/routes.js @@ -49,6 +49,21 @@ routes.get( } ) +routes.get( + '/leaderboards', + (req, res) => { + const leaderboards = { + points: wrapper.leaderboardPoints("points", 1, 10), + pointsRank: wrapper.leaderboardPoints("pointsRank", 1, 10), + pointsTeam: wrapper.leaderboardPoints("pointsTeam", 1, 10), + pointsThisWeek: wrapper.leaderboardPoints("pointsThisWeek", 1, 10), + pointsThisMonth: wrapper.leaderboardPoints("pointsThisMonth", 1, 10) + } + + tx(req, res)('pages/maps.njk', { leaderboards }, true, { currentSection: "maps" }) + } +) + routes.get( '/status', (req, res) => { diff --git a/views/pages/leaderboards.njk b/views/pages/leaderboards.njk new file mode 100644 index 0000000..9facc60 --- /dev/null +++ b/views/pages/leaderboards.njk @@ -0,0 +1,17 @@ +{% extends "../templates/base.njk" %} +{% set leaderboards = data.leaderboards %} + + +{% block head %} +