ddstats-server/views/pages/leaderboards.njk

35 lines
1.3 KiB
Plaintext

{% extends "../templates/basic.njk" %}
{% set leaderboards = data.leaderboards %}
{%
set leaderboardHeadings = {
points: "Points",
pointsRank: "Rank points",
pointsTeam: "Team points",
pointsThisWeek: "Points gathered this week",
pointsThisMonth: "Points gathered this month"
}
%}
{% block head %}
<link rel="stylesheet" type="text/css" href="/assets/css/leaderboards.css">
<title> DDStats - Leaderboards</title>
{% endblock %}
{% block body %}
<main class="flex-container">
{% for leaderboardType, leaderboard in leaderboards %}
<div class="leaderboard">
<h1>{{ leaderboardHeadings[leaderboardType] }}</h1>
{% for rank in leaderboard %}
<div class="rank">
<img src="/assets/countryflags/{{rank.flag}}.png" class="country-image">
<p class="rank-position">{{ rank.rank }}.</p>
<p class="rank-player">{{ rank.player }}</p>
<p class="rank-points">{{ rank.points }} pts</p>
<p class="rank-points">{{ rank.region }} pts</p>
</div>
{% endfor %}
</div>
{% endfor %}
</main>
{% endblock %}