63 lines
2.6 KiB
Plaintext
63 lines
2.6 KiB
Plaintext
@page "/StarSystem"
|
|
|
|
<PageTitle>Star Systems</PageTitle>
|
|
|
|
<div class="section-header d-flex align-items-center mb-4">
|
|
<h1 class="mb-0">Star Systems</h1>
|
|
<div class="ms-3 flex-grow-1 border-bottom opacity-25"></div>
|
|
<a href="/galaxy" class="btn btn-sm btn-scifi-primary ms-3">
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor" class="me-1" viewBox="0 0 16 16">
|
|
<circle cx="8" cy="8" r="2.5"/>
|
|
<circle cx="2.5" cy="4" r="1.5"/>
|
|
<circle cx="13.5" cy="5" r="1.5"/>
|
|
<path stroke="currentColor" stroke-width="1.2" stroke-linecap="round" d="M2.5 4L8 8m0 0l5.5-3" opacity=".65"/>
|
|
</svg>
|
|
<span>Galaxy Map</span>
|
|
</a>
|
|
</div>
|
|
|
|
@foreach (var category in Enum.GetValues<StarSystemCategory>())
|
|
{
|
|
var systems = StarSystems.All.Where(s => s.SystemCategory == category).OrderBy(s => s.Name).ToList();
|
|
var badgeClass = category switch {
|
|
StarSystemCategory.HomeworldSystem => "badge-homeworld",
|
|
StarSystemCategory.CoreSystem => "badge-core",
|
|
StarSystemCategory.SideSystem => "badge-side",
|
|
_ => "badge-side"
|
|
};
|
|
|
|
<div class="mb-4">
|
|
<div class="d-flex align-items-center gap-2 mb-3">
|
|
<h2 class="h4 mb-0 text-white">@category.ToDisplayName()</h2>
|
|
<span class="badge @badgeClass">@systems.Count</span>
|
|
</div>
|
|
<ul class="list-unstyled row g-2">
|
|
@foreach (var system in systems)
|
|
{
|
|
<li class="col-md-4 col-lg-3">
|
|
<a class="d-block p-2 rounded zs-glass-card text-decoration-none" href="/StarSystem/@system.Id">
|
|
<div class="d-flex align-items-center justify-content-between">
|
|
<span class="fw-semibold text-white">@system.Name</span>
|
|
<span class="badge @OwnerBadgeClass(system.Owner) fs-8">@system.Owner</span>
|
|
</div>
|
|
@if (!string.IsNullOrWhiteSpace(system.OccupationBuff))
|
|
{
|
|
<div class="small text-dim text-truncate mt-1" title="@system.OccupationBuff">@system.OccupationBuff</div>
|
|
}
|
|
</a>
|
|
</li>
|
|
}
|
|
</ul>
|
|
</div>
|
|
}
|
|
|
|
@code {
|
|
private static string OwnerBadgeClass(string owner) => owner switch
|
|
{
|
|
StarSystemOwners.EdenAccord => "badge-eden",
|
|
StarSystemOwners.KeeperCouncil => "badge-keeper",
|
|
StarSystemOwners.ObsidianOrder => "badge-obsidian",
|
|
_ => "badge-side"
|
|
};
|
|
}
|