step 10.17: wip (not ticked)
This commit is contained in:
+112
-42
@@ -7,62 +7,132 @@
|
||||
<link rel="stylesheet" href="/css/main.css">
|
||||
<style>
|
||||
.leaderboard-container {
|
||||
max-width: 600px;
|
||||
margin: 2rem auto;
|
||||
padding: 1rem;
|
||||
text-align: center;
|
||||
max-width: 700px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.leaderboard-container h1 {
|
||||
color: #e94560;
|
||||
.leaderboard-tabs {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.leaderboard-container p {
|
||||
color: #a59a8a;
|
||||
.leaderboard-tabs .tab {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.nav-links {
|
||||
margin-top: 2rem;
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
.leaderboard-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.nav-links a {
|
||||
display: inline-block;
|
||||
padding: 0.5rem 1.25rem;
|
||||
border-radius: 4px;
|
||||
text-decoration: none;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 600;
|
||||
transition: opacity 0.2s;
|
||||
}
|
||||
|
||||
.nav-links a:hover { opacity: 0.85; }
|
||||
|
||||
.btn-game {
|
||||
background: #27ae60;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.btn-home {
|
||||
background: transparent;
|
||||
.leaderboard-table th {
|
||||
text-align: left;
|
||||
color: #e94560;
|
||||
border: 1px solid #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="leaderboard-container">
|
||||
<h1>Leaderboard</h1>
|
||||
<p>Coming soon — compete with heroes across the realm.</p>
|
||||
<div class="nav-links">
|
||||
<a href="/game.html" class="btn-game">Game</a>
|
||||
<a href="/shop.html" class="btn-home">Shop</a>
|
||||
<a href="/" class="btn-home">Home</a>
|
||||
</div>
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user