forked from Hanabi/hanabi-league
53 lines
2.4 KiB
HTML
53 lines
2.4 KiB
HTML
{% extends "layout.html" %}
|
|
{% block content %}
|
|
<div class="tab-content" id="myTabContent">
|
|
{% for rating_type, leaders in leaders.items() %}
|
|
<div class="tab-pane fade{{' active show' if rating_type == 0 else ''}}" id="leaderboards-{{rating_type}}">
|
|
<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>
|
|
<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>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
<!-- Leaderboards -->
|
|
<div id="leaderboards-{{rating_type}}-data" class="accordion">
|
|
{% for category, leaderboard in leaderboards.items() %}
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<button class="btn btn-link btn-block text-left" data-toggle="collapse" data-target="#{{ category|lower|replace(' ', '-') }}">
|
|
{{ category }}
|
|
</button>
|
|
</div>
|
|
<div id="{{ category|lower|replace(' ', '-') }}" class="collapse" data-parent="#leaderboards-{{rating_type}}-data">
|
|
<div class="card-body">
|
|
<table class="table table-striped">
|
|
{% for row in leaderboard[rating_type] %}
|
|
<tr>
|
|
<td>
|
|
<div class="player-name">{{ row['player_name'] }}</div>
|
|
<div class="alt-name">{{ row['user_accounts'] }}</div>
|
|
</td>
|
|
<td class="score">{{ row['current_rating'] }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endblock %}
|