60 lines
2.1 KiB
HTML
60 lines
2.1 KiB
HTML
<!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 or '/static/default_profile.png' }}" alt="Profile Picture" class="profile-picture">
|
|
</td>
|
|
<td>{{ user.nickname or 'Unknown User' }}</td>
|
|
<td>{{ user.level }}</td>
|
|
<td>{{ user.xp }}</td>
|
|
<td>{{ user.join_date or 'N/A' }}</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>
|