forked from rDrama/rDrama
35 lines
1003 B
HTML
35 lines
1003 B
HTML
{%- extends 'default.html' -%}
|
|
{% block pagetitle %}World Cup 2022 Betting Leaderboard{% endblock %}
|
|
{% block content %}
|
|
<h1>World Cup 2022 Betting Leaderboard</h1>
|
|
<div class="overflow-x-auto">
|
|
<table class="table table-striped mb-5">
|
|
<thead class="bg-primary text-white">
|
|
<tr>
|
|
<th onclick="sort_table(0)">#</th>
|
|
<th onclick="sort_table(1)">Name</th>
|
|
<th onclick="sort_table(2)">Wins</th>
|
|
<th onclick="sort_table(3)">Bets</th>
|
|
<th onclick="sort_table(4)">Win rate</th>
|
|
<th onclick="sort_table(5)">Winnings</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for r in result %}
|
|
<tr>
|
|
{% set user = users.get(r[0]) %}
|
|
<td>{{loop.index}}</td>
|
|
<td data-sort-key="{{user.username.lower() if user else ''}}">{%- include 'user_in_table.html' -%}</td>
|
|
<td>{{r[1]}}</td>
|
|
<td>{{r[2]}}</td>
|
|
{% set ratio = (r[1]/r[2])|string %}
|
|
<td>{{ratio[:3]}}</td>
|
|
<td>{{r[3]}}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<script defer src="{{'js/sort_table.js' | asset}}"></script>
|
|
{% endblock %}
|