modified: app.py
new file: templates/leaderboard.html
This commit is contained in:
57
templates/leaderboard.html
Normal file
57
templates/leaderboard.html
Normal file
@@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Level Leaderboard</title>
|
||||
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
<style>
|
||||
.profile-picture {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
object-fit: cover;
|
||||
}
|
||||
.table-container {
|
||||
max-height: 600px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
{% include 'navigation.html' %}
|
||||
<div class="container mt-5">
|
||||
<h2 class="text-center">Level Leaderboard - Server {{ guild_id }}</h2>
|
||||
<div class="table-container mt-4">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Rank</th>
|
||||
<th>Profile</th>
|
||||
<th>Nickname</th>
|
||||
<th>Level</th>
|
||||
<th>XP</th>
|
||||
<th>Joined</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for index, user in enumerate(leaderboard, start=1) %}
|
||||
<tr>
|
||||
<td>{{ index }}</td>
|
||||
<td><img src="{{ user.profile_picture }}" alt="Profile Picture" class="profile-picture"></td>
|
||||
<td>{{ user.nickname }}</td>
|
||||
<td>{{ user.level }}</td>
|
||||
<td>{{ user.xp }}</td>
|
||||
<td>{{ user.join_date }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% if leaderboard|length == 0 %}
|
||||
<p class="text-center text-muted">No users found for this leaderboard.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<a href="{{ url_for('user_dashboard', guild_id=guild_id) }}" class="btn btn-secondary mt-3">Back to Dashboard</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user