add red color to people who got banned on leaderboard

This commit is contained in:
csd4ni3l
2025-08-14 13:22:04 +02:00
parent aaeae000c9
commit f61ca26ce5
2 changed files with 3 additions and 3 deletions

View File

@@ -189,7 +189,7 @@ def leaderboard():
cur = get_db().cursor()
cur.execute("SELECT grass_touching_count, username FROM USERS ORDER BY grass_touching_count DESC, username ASC LIMIT 25")
cur.execute("SELECT grass_touching_count, banned, username FROM USERS ORDER BY grass_touching_count DESC, username ASC LIMIT 25")
users = cur.fetchall()
if not users:

View File

@@ -49,8 +49,8 @@
<ul class="list-group list-group-flush">
{% for user in users %}
<li class="list-group-item d-flex justify-content-between align-items-center
{% if user.1 == current_username %}list-group-item-success fw-bold{% endif %}">
<span>{{ loop.index }}. {{ user.1 }} ({{ user.0 }})</span>
{% if user.2 == current_username %}list-group-item-success fw-bold{% endif %} {% if user.1 %}list-group-item-danger{% endif %}">
<span>{{ loop.index }}. {{ user.2 }} ({{ user.0 }})</span>
</li>
{% endfor %}
</ul>