modified: app.py new file: templates/admin_dashboard.html.j2 new file: templates/base.html.j2 new file: templates/daily_leaderboard.html.j2 new file: templates/daily_puzzle.html.j2 new file: templates/home.html.j2 new file: templates/invite_admin.html.j2 new file: templates/king_of_the_mountain.html.j2 new file: templates/leaderboard_index.html.j2 new file: templates/login.html.j2 new file: templates/manage_admins.html.j2 new file: templates/profile.html.j2 new file: templates/puzzle_menu.html.j2 new file: templates/upload.html.j2 new file: templates/verify.html.j2
30 lines
1.2 KiB
Django/Jinja
30 lines
1.2 KiB
Django/Jinja
{% extends 'base.html.j2' %}
|
|
{% block content %}
|
|
<h1>Leaderboard for {{ puzzle.title }} ({{ puzzle.date }})</h1>
|
|
<p>
|
|
<strong>Sort by:</strong>
|
|
<a href="{{ request.route_url('daily_leaderboard', puzzle_id=puzzle.id, sort='time') }}">Top Speed</a> |
|
|
<a href="{{ request.route_url('daily_leaderboard', puzzle_id=puzzle.id, sort='moves') }}">Least Moves</a>
|
|
</p>
|
|
<p>Players are ranked based on their total time and moves. Faster times and fewer moves result in better rankings.</p>
|
|
<table>
|
|
<tr>
|
|
<th>Rank</th>
|
|
<th>Username/Guest</th>
|
|
<th>Moves</th>
|
|
<th>Rotations</th>
|
|
<th>Total Actions</th>
|
|
<th>Time (sec)</th>
|
|
</tr>
|
|
{% for row in attempts %}
|
|
<tr>
|
|
<td>{{ loop.index }}</td>
|
|
<td><a href="{{ request.route_url('view_profile', user_id=row.user_id) }}">{{ row.user_display_name }}</a></td>
|
|
<td>{{ row.move_count }}</td>
|
|
<td>{{ row.rotation_count }}</td>
|
|
<td>{{ row.move_count + row.rotation_count }}</td>
|
|
<td>{{ "%.2f"|format((row.time_completed - row.time_started).total_seconds() if row.time_completed else 0) }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% endblock %}
|