This commit is contained in:
2026-06-10 21:31:37 -04:00
parent 01a49c1c30
commit 3e80ce78a0
119 changed files with 6234 additions and 8 deletions
+44
View File
@@ -0,0 +1,44 @@
@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">&larr; Back to Docs</a>
}
else
{
<h1>@doc.Title</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 OnInitializedAsync()
{
doc = await DocsService.GetNoteAsync(Slug);
loading = false;
}
}
+32
View File
@@ -0,0 +1,32 @@
@page "/docs"
@inject Web.Services.DocsService DocsService
<PageTitle>Docs</PageTitle>
<h1>Documentation</h1>
@if (notes == null)
{
<p>Loading...</p>
}
else
{
<div class="docs-grid">
@foreach (var note in notes.OrderBy(n => n.Title))
{
<a href="/docs/@note.Slug" class="docs-card">
<h3>@note.Title</h3>
</a>
}
</div>
}
@code {
private List<Web.Models.NoteInfo>? notes;
protected override async Task OnInitializedAsync()
{
var index = await DocsService.GetIndexAsync();
notes = index.Notes;
}
}