Files
tmnf-replay-server/templates/index.html

94 lines
3.0 KiB
HTML

<head>
{% include "head.html" %}
</head>
<body>
{% include "upload-button.html" %}
<div class="user-settings">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" id="show_tm_2020_current">
<label class="form-check-label" for="show_tm_2020_current">Only current TM2020</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" id="show_tm_2020">
<label class="form-check-label" for="show_tm_2020">Show All TM2020</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" id="show_tmnf">
<label class="form-check-label" for="show_tmnf">Show All TMNF</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" id="notifications_self">
<label class="form-check-label" for="notifications_self">Send notifcations</label>
</div>
</div>
<script src="/static/user_settings.js" defer></script>
<table class="m-auto">
<thead>
<tr>
<th class="px-2">
<div class="margin-table-mid">Map</div>
</th>
{% if player %}
<th class="px-2">
<div class="margin-table-mid">Personal Best</div>
</th>
{% endif %}
<th class="px-2">
<div class="margin-table-mid">Record</div>
</th>
<th class="px-2">
<div class="margin-table-mid">Record Holder</div>
</th>
<th class="px-2">
<div class="margin-table-mid">Record Age</div>
</th>
<th class="px-2 runner-up">
<div class="margin-table-mid">Runner Up (%)</div>
</th>
</tr>
</thead>
<tbody>
{% for map in maps %}
<tr>
<td class="px-2">
<a class="margin-l" href="/map-info?map_uid={{ map.map_uid }}">{{ map.mapname }}</a>
</td>
{% if player %}
{% set pb = map.get_best_replay_for_player(player) %}
{% if pb and pb.race_time != map.get_best_replay().race_time %}
<td class="px-2">
<div class="margin-table-mid">{{ pb.get_human_readable_time() }}</div>
</td>
{% elif pb %}
<td class="px-2" style="color: darkgreen">
<div class="margin-table-mid">CRH</div>
</td>
{% else %}
<td class="px-2">
<div class="margin-table-mid">-</div>
</td>
{% endif %}
{% endif %}
<td class="px-2">
<div class="margin-table-mid">{{ map.get_best_replay_repr().split(" ")[0] }}</div>
</td>
<td class="px-2">
<div class="margin-table-mid">{{ map.get_best_replay().clean_login() }}</div>
</td>
<td class="px-2">
<div class="margin-table-mid">{{ map.get_best_replay_age() }} days</div>
</td>
<td class="px-2 runner-up">
<div class="margin-r">{{ map.get_record_replay_percent_diff() }}</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div style="padding-bottom: 30px;">
</div>
</body>