Initial Commit
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
@page "/games"
|
||||
@inject GameService Service
|
||||
|
||||
<PageTitle>Games</PageTitle>
|
||||
|
||||
<h1>Games</h1>
|
||||
|
||||
<div class="game-cards">
|
||||
@foreach (var game in Service.Games)
|
||||
{
|
||||
<div class="game-card" @onclick="() => ShowDetail(game)">
|
||||
<h3>@game.Title</h3>
|
||||
@if (!string.IsNullOrEmpty(game.Link) || !string.IsNullOrEmpty(game.Git))
|
||||
{
|
||||
<div class="links">
|
||||
@if (!string.IsNullOrEmpty(game.Link))
|
||||
{
|
||||
<a href="@game.Link" target="_blank" @onclick:stopPropagation>
|
||||
<span class="label">link</span> @game.Link
|
||||
</a>
|
||||
}
|
||||
@if (!string.IsNullOrEmpty(game.Git))
|
||||
{
|
||||
<a href="@game.Git" target="_blank" @onclick:stopPropagation>
|
||||
<span class="label">git</span> @game.Git
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@if (_selected is not null)
|
||||
{
|
||||
<div class="dialog-overlay" @onclick="CloseDetail">
|
||||
<div class="dialog" @onclick:stopPropagation>
|
||||
<div class="dialog-header">
|
||||
<h2>@_selected.Title</h2>
|
||||
<button class="dialog-close" @onclick="CloseDetail">×</button>
|
||||
</div>
|
||||
<div class="dialog-body">
|
||||
@((MarkupString)_selected.ContentHtml)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@code {
|
||||
private GameDoc? _selected;
|
||||
|
||||
private void ShowDetail(GameDoc game) => _selected = game;
|
||||
|
||||
private void CloseDetail() => _selected = null;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
@page "/"
|
||||
@inject GameService Service
|
||||
|
||||
<PageTitle>Game Slop Reference</PageTitle>
|
||||
|
||||
<h1>Game Slop Reference</h1>
|
||||
|
||||
@if (Service.OverviewHtml is { } html)
|
||||
{
|
||||
<div class="overview-content">@((MarkupString)html)</div>
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
@page "/not-found"
|
||||
@layout MainLayout
|
||||
|
||||
<div class="not-found">
|
||||
<h1>404</h1>
|
||||
<p>Sorry, the page you're looking for doesn't exist.</p>
|
||||
<a href="">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
|
||||
Back to Home
|
||||
</a>
|
||||
</div>
|
||||
Reference in New Issue
Block a user