ddstats-server/views/pages/leaderboards.njk

39 lines
1.5 KiB
Plaintext
Raw Permalink Normal View History

2021-11-07 12:43:05 +01:00
{% extends "../templates/basic.njk" %}
{% set leaderboards = data.leaderboards %}
2021-11-07 12:43:05 +01:00
{%
set leaderboardHeadings = {
points: "Points",
pointsRank: "Rank points",
pointsTeam: "Team points",
pointsThisWeek: "Points gathered this week",
pointsThisMonth: "Points gathered this month"
}
%}
{% block head %}
2021-11-07 12:43:05 +01:00
<link rel="stylesheet" type="text/css" href="/assets/css/leaderboards.css">
<title> DDStats - Leaderboards</title>
{% endblock %}
{% block body %}
<main class="flex-container">
2021-11-07 22:15:15 +01:00
<div class="flex-container regions">
{% for region in ["Global", "Europe", "Asia", "SA", "NA", "Africa", "ME", "OLD", "Other"] %}
<a href="/leaderboards/{{ region }}" class="region {{ "current-region" if data.region == region }}">{{ region }}</a>
{% endfor %}
</div>
2021-11-07 12:43:05 +01:00
{% for leaderboardType, leaderboard in leaderboards %}
<div class="leaderboard">
<h1>{{ leaderboardHeadings[leaderboardType] }}</h1>
{% for rank in leaderboard %}
<div class="rank">
2021-11-07 20:10:21 +01:00
<img src="/assets/countryflags/{{rank.flag}}.png" class="country-image">
2021-11-07 12:44:33 +01:00
<p class="rank-position">{{ rank.rank }}.</p>
2021-11-07 12:43:05 +01:00
<p class="rank-player">{{ rank.player }}</p>
<p class="rank-points">{{ rank.points }} pts</p>
</div>
{% endfor %}
</div>
{% endfor %}
</main>
{% endblock %}