Day 2 vibes
This commit is contained in:
+38
-3
@@ -1,7 +1,42 @@
|
||||
@page "/docs"
|
||||
@inject DocsService DocsService
|
||||
|
||||
<PageTitle>Docs</PageTitle>
|
||||
<PageTitle>Documentation</PageTitle>
|
||||
|
||||
<h1>Documentation</h1>
|
||||
<div class="section-header d-flex align-items-center mb-4">
|
||||
<h1 class="mb-0">Documentation</h1>
|
||||
<div class="ms-3 flex-grow-1 border-bottom opacity-25"></div>
|
||||
</div>
|
||||
|
||||
<p>Select a note from the sidebar to view its contents.</p>
|
||||
@if (index == null)
|
||||
{
|
||||
<div class="d-flex justify-content-center py-5">
|
||||
<div class="spinner-border text-success" role="status">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="docs-grid">
|
||||
@foreach (var note in index.Notes.OrderBy(n => n.Title))
|
||||
{
|
||||
<NavLink href="@($"docs/{note.Slug}")" class="docs-card">
|
||||
<div class="d-flex justify-content-between align-items-start mb-2">
|
||||
<span class="badge bg-dark text-success border border-success border-opacity-25">@note.Category</span>
|
||||
</div>
|
||||
<h3>@note.Title</h3>
|
||||
<p class="text-muted small mb-0">Explore details about @note.Title</p>
|
||||
</NavLink>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
@code {
|
||||
private NotesIndex? index;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
index = await DocsService.GetIndexAsync();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user