All checks were successful
Build Images and Deploy / Update-PROD-Stack (push) Successful in 29s
43 lines
1.4 KiB
Plaintext
43 lines
1.4 KiB
Plaintext
<%- include('../partials/header') %>
|
|
|
|
<div class="container">
|
|
<h1 style="margin-bottom: 1.5rem;">🏆 Global Leaderboard</h1>
|
|
|
|
<% if (leaderboard.length === 0) { %>
|
|
<div class="card" style="text-align: center; padding: 3rem;">
|
|
<p style="color: var(--muted);">No scans recorded yet. Start hunting!</p>
|
|
</div>
|
|
<% } else { %>
|
|
<div class="card">
|
|
<div class="table-wrapper">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Rank</th>
|
|
<th>Player</th>
|
|
<th>Points</th>
|
|
<th>Packages Found</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% leaderboard.forEach((entry, i) => { %>
|
|
<% const rank = (typeof offset !== 'undefined' ? offset : 0) + i + 1; %>
|
|
<tr>
|
|
<td class="rank-cell rank-<%= rank %>">
|
|
<% if (rank === 1) { %>🥇<% } else if (rank === 2) { %>🥈<% } else if (rank === 3) { %>🥉<% } else { %><%= rank %><% } %>
|
|
</td>
|
|
<td><strong><a href="/player/<%= entry.username %>"><%= entry.display_name %></a></strong></td>
|
|
<td><span class="points-badge"><%= entry.total_points %></span></td>
|
|
<td><%= entry.scans %></td>
|
|
</tr>
|
|
<% }) %>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<%- include('../partials/pagination') %>
|
|
<% } %>
|
|
</div>
|
|
|
|
<%- include('../partials/footer') %>
|