This commit is contained in:
furo 2021-11-07 12:20:40 +01:00
commit 64cf8778f0
3 changed files with 34 additions and 1 deletions

View File

@ -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( routes.get(
'/status', '/status',
(req, res) => { (req, res) => {

View File

@ -0,0 +1,17 @@
{% extends "../templates/base.njk" %}
{% set leaderboards = data.leaderboards %}
{% block head %}
<title> DDStats - Leaderboards</ttile>
{% endblock %}
{% block body %}
<main class="flex-container">
<div class="leaderboard">
{% for rank in sequence %}
{{ rank }}
{% endfor %}
</div>
</main>
{% endblock %}

View File

@ -5,8 +5,9 @@
{% set raceLeaderboard = data.raceLeaderboard %} {% set raceLeaderboard = data.raceLeaderboard %}
{% set teamLeaderboard = data.teamLeaderboard %} {% set teamLeaderboard = data.teamLeaderboard %}
{% set graphMap = data.graphMap %} {% set graphMap = data.graphMap %}
{% block head %} {% block head %}
<title>DDStats - Maps!</title> <title>DDStats - {{ map.map }}</title>
<link rel="stylesheet" type="text/css" href="/assets/css/maps.css"> <link rel="stylesheet" type="text/css" href="/assets/css/maps.css">
<script src="/assets/scripts/lazyLoadImages.js" defer></script> <script src="/assets/scripts/lazyLoadImages.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"></script>