139 lines
3.5 KiB
HTML
139 lines
3.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Emberfall — Leaderboard</title>
|
|
<link rel="stylesheet" href="/css/main.css">
|
|
<style>
|
|
.leaderboard-container {
|
|
max-width: 700px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.leaderboard-tabs {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.leaderboard-tabs .tab {
|
|
flex: 1;
|
|
}
|
|
|
|
.leaderboard-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
.leaderboard-table th {
|
|
text-align: left;
|
|
color: #e94560;
|
|
font-size: 0.75rem;
|
|
text-transform: uppercase;
|
|
padding: 0.5rem;
|
|
border-bottom: 1px solid #333;
|
|
}
|
|
|
|
.leaderboard-table td {
|
|
padding: 0.5rem;
|
|
border-bottom: 1px solid #1a1a2e;
|
|
font-size: 0.875rem;
|
|
color: #a0a0a0;
|
|
}
|
|
|
|
.leaderboard-table tr:hover td {
|
|
background: #1a1a2e;
|
|
}
|
|
|
|
.rank-cell { width: 60px; text-align: center; font-weight: bold; color: #e94560; }
|
|
.name-cell a { color: #88cc88; text-decoration: none; }
|
|
.name-cell a:hover { text-decoration: underline; }
|
|
.class-cell { text-transform: capitalize; }
|
|
.value-cell { text-align: right; font-weight: 600; }
|
|
|
|
.pagination {
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: 0.5rem;
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
.pagination button {
|
|
padding: 0.25rem 0.75rem;
|
|
border: 1px solid #333;
|
|
background: #16213e;
|
|
color: #a0a0a0;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.pagination button.active {
|
|
background: #e94560;
|
|
color: #fff;
|
|
border-color: #e94560;
|
|
}
|
|
|
|
.pagination button:disabled {
|
|
opacity: 0.4;
|
|
cursor: default;
|
|
}
|
|
|
|
.placeholder {
|
|
text-align: center;
|
|
color: #a0a0a0;
|
|
padding: 2rem;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="game-container">
|
|
<!-- Top bar -->
|
|
<header class="top-bar">
|
|
<div class="logo">Emberfall</div>
|
|
<nav class="nav-links" id="nav-links">
|
|
<a href="/game.html">Game</a>
|
|
<a href="/shop.html">Shop</a>
|
|
<a href="/leaderboard.html">Leaderboard</a>
|
|
<a href="/api/auth/logout" id="logout-btn">Logout</a>
|
|
</nav>
|
|
<div class="user-info">
|
|
<a href="/login.html">Login</a>
|
|
</div>
|
|
</header>
|
|
|
|
<main class="main-content">
|
|
<section class="panel" style="grid-column: 1 / -1;">
|
|
<h3>Leaderboard</h3>
|
|
|
|
<div class="leaderboard-tabs" id="leaderboard-tabs">
|
|
<button class="tab active" data-type="level" role="tab" aria-selected="true">Level</button>
|
|
<button class="tab" data-type="gold" role="tab" aria-selected="false">Gold</button>
|
|
<button class="tab" data-type="kills" role="tab" aria-selected="false">Kills</button>
|
|
</div>
|
|
|
|
<div id="leaderboard-error" class="error" style="display:none;"></div>
|
|
<table class="leaderboard-table" id="leaderboard-table">
|
|
<thead>
|
|
<tr>
|
|
<th class="rank-cell">Rank</th>
|
|
<th>Name</th>
|
|
<th class="class-cell">Class</th>
|
|
<th class="value-cell" id="value-header">Level</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="leaderboard-body">
|
|
<tr><td colspan="4" class="placeholder">Loading...</td></tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="pagination" id="pagination"></div>
|
|
</section>
|
|
</main>
|
|
</div>
|
|
|
|
<script src="/js/toast.js"></script>
|
|
<script src="/js/leaderboard.js"></script>
|
|
</body>
|
|
</html>
|