Day 1 vibes
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
@page "/docs/{Slug}"
|
||||
@inject Web.Services.DocsService DocsService
|
||||
|
||||
<PageTitle>@(doc?.Title ?? "Not Found")</PageTitle>
|
||||
|
||||
@if (loading)
|
||||
{
|
||||
<p>Loading...</p>
|
||||
}
|
||||
else if (doc == null)
|
||||
{
|
||||
<h1>Not Found</h1>
|
||||
<p>The document "@Slug" could not be found.</p>
|
||||
<a href="/docs">← Back to Docs</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h1>
|
||||
@doc.Title
|
||||
@if (!string.IsNullOrEmpty(doc.Category))
|
||||
{
|
||||
<span class="category-badge">@doc.Category</span>
|
||||
}
|
||||
</h1>
|
||||
|
||||
@if (!string.IsNullOrEmpty(doc.FrontmatterHtml))
|
||||
{
|
||||
<details class="frontmatter-section" open>
|
||||
<summary>Frontmatter</summary>
|
||||
@((MarkupString)doc.FrontmatterHtml)
|
||||
</details>
|
||||
}
|
||||
|
||||
<div class="markdown-body">
|
||||
@((MarkupString)doc.HtmlContent)
|
||||
</div>
|
||||
}
|
||||
|
||||
@code {
|
||||
[Parameter] public string Slug { get; set; } = "";
|
||||
|
||||
private Web.Models.NoteDocument? doc;
|
||||
private bool loading = true;
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
loading = true;
|
||||
doc = null;
|
||||
doc = await DocsService.GetNoteAsync(Slug);
|
||||
loading = false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
@page "/docs"
|
||||
|
||||
<PageTitle>Docs</PageTitle>
|
||||
|
||||
<h1>Documentation</h1>
|
||||
|
||||
<p>Select a note from the sidebar to view its contents.</p>
|
||||
@@ -0,0 +1,9 @@
|
||||
@page "/"
|
||||
|
||||
<PageTitle>Earthborne Trailblazer</PageTitle>
|
||||
|
||||
<h1>Earthborne Trailblazer</h1>
|
||||
|
||||
<div class="map-container">
|
||||
<object data="docs/map.svg" type="image/svg+xml" class="map-svg"></object>
|
||||
</div>
|
||||
@@ -0,0 +1,5 @@
|
||||
@page "/not-found"
|
||||
@layout MainLayout
|
||||
|
||||
<h3>Not Found</h3>
|
||||
<p>Sorry, the content you are looking for does not exist.</p>
|
||||
Reference in New Issue
Block a user