2023-12-03 21:20:13 +01:00
|
|
|
{% extends "layout.html" %}
|
|
|
|
{% block content %}
|
|
|
|
<div class="tab-content" id="myTabContent">
|
2023-12-04 00:40:29 +01:00
|
|
|
{% for rating_type, leaders in leaders.items() %}
|
|
|
|
<div class="tab-pane fade{{' active show' if rating_type == 0 else ''}}" id="leaderboards-{{rating_type}}">
|
2023-12-03 21:20:13 +01:00
|
|
|
<div class="container my-5">
|
|
|
|
<!-- Leader Cards -->
|
|
|
|
<div class="card-deck mb-5">
|
|
|
|
{% for category, data in leaders.items() %}
|
|
|
|
<div class="card text-center">
|
|
|
|
<div class="card-body">
|
|
|
|
<h5 class="card-title mb-4">{{ data.title }}</h5>
|
2023-12-04 00:40:29 +01:00
|
|
|
<p class="mb-0 player-name">{{ data.player_name }}</p>
|
|
|
|
<p class="mt-1 alt-name">{{ data.user_accounts }}</p>
|
|
|
|
<p class="score-large">{{ data.score }}</p>
|
2023-12-03 21:20:13 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Leaderboards -->
|
2023-12-04 00:40:29 +01:00
|
|
|
<div id="leaderboards-{{rating_type}}-data" class="accordion">
|
2023-12-03 21:20:13 +01:00
|
|
|
{% for category, leaderboard in leaderboards.items() %}
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-header">
|
2023-12-04 00:40:29 +01:00
|
|
|
<button class="btn btn-link btn-block text-left" data-toggle="collapse" data-target="#{{ category|lower|replace(' ', '-') }}">
|
2023-12-03 21:20:13 +01:00
|
|
|
{{ category }}
|
|
|
|
</button>
|
|
|
|
</div>
|
2023-12-04 00:40:29 +01:00
|
|
|
<div id="{{ category|lower|replace(' ', '-') }}" class="collapse" data-parent="#leaderboards-{{rating_type}}-data">
|
2023-12-03 21:20:13 +01:00
|
|
|
<div class="card-body">
|
|
|
|
<table class="table table-striped">
|
2023-12-04 00:40:29 +01:00
|
|
|
{% for row in leaderboard[rating_type] %}
|
2023-12-03 21:20:13 +01:00
|
|
|
<tr>
|
|
|
|
<td>
|
2023-12-04 00:40:29 +01:00
|
|
|
<div class="player-name">{{ row['player_name'] }}</div>
|
|
|
|
<div class="alt-name">{{ row['user_accounts'] }}</div>
|
2023-12-03 21:20:13 +01:00
|
|
|
</td>
|
2023-12-04 00:40:29 +01:00
|
|
|
<td class="score">{{ row['current_rating'] }}</td>
|
2023-12-03 21:20:13 +01:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-12-04 00:40:29 +01:00
|
|
|
{% endfor %}
|
2023-12-03 21:20:13 +01:00
|
|
|
</div>
|
|
|
|
{% endblock %}
|