initial commit
This commit is contained in:
commit
2d966b8198
28 changed files with 2901 additions and 0 deletions
62
Pages/Leaderboard.cshtml
Normal file
62
Pages/Leaderboard.cshtml
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
@page "/leaderboard"
|
||||
@using CsWeb.Services
|
||||
@model LeaderboardModel
|
||||
@{
|
||||
ViewData["Title"] = "Leaderboard";
|
||||
var t = Model.Top;
|
||||
var d = t?.Data;
|
||||
}
|
||||
|
||||
<h1>Leaderboard</h1>
|
||||
@if (t is null || d is null)
|
||||
{
|
||||
<div class="notice err">Leaderboards are unavailable right now (no server reachable).</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (!t.Online)
|
||||
{
|
||||
<div class="notice">Servers are offline — showing the last known standings (@Fmt.Age(t)).</div>
|
||||
}
|
||||
<div class="cols">
|
||||
<section>
|
||||
<h2>Progression</h2>
|
||||
<div class="tablewrap">
|
||||
<table>
|
||||
<tr><th>#</th><th>Player</th><th class="num">Prestige</th><th class="num">Level</th></tr>
|
||||
@foreach (var (r, i) in d.Levels.Select((r, i) => (r, i)))
|
||||
{
|
||||
<tr><td class="num">@(i + 1)</td><td>@r.Name</td><td class="num">@r.Prestige</td><td class="num">@r.Level</td></tr>
|
||||
}
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Deepest survival wave</h2>
|
||||
<div class="tablewrap">
|
||||
<table>
|
||||
<tr><th>#</th><th>Player</th><th class="num">Wave</th></tr>
|
||||
@foreach (var (r, i) in d.Waves.Select((r, i) => (r, i)))
|
||||
{
|
||||
<tr><td class="num">@(i + 1)</td><td>@r.Name</td><td class="num">@r.BestWave</td></tr>
|
||||
}
|
||||
@if (d.Waves.Count == 0) { <tr><td colspan="3" class="muted">No cleared waves recorded yet.</td></tr> }
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Fastest Gun Game</h2>
|
||||
<div class="tablewrap">
|
||||
<table>
|
||||
<tr><th>#</th><th>Player</th><th class="num">Time</th></tr>
|
||||
@foreach (var (r, i) in d.GgTimes.Select((r, i) => (r, i)))
|
||||
{
|
||||
<tr><td class="num">@(i + 1)</td><td>@r.Name</td><td class="num">@Fmt.RunTime(r.BestMs)</td></tr>
|
||||
}
|
||||
@if (d.GgTimes.Count == 0) { <tr><td colspan="3" class="muted">No full ladder runs recorded yet.</td></tr> }
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<p class="muted small">The clock starts at your first damage dealt or taken after joining — reconnecting doesn't reset it.</p>
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue