Updated admin page to be more streamlined and added the beginning of the blogging features

This commit is contained in:
Vincent Allen
2025-10-21 13:32:39 -04:00
parent 0e24ce2073
commit b34449808f
224 changed files with 27064 additions and 396 deletions

View File

@@ -0,0 +1,36 @@
@using Microsoft.Extensions.Options
@using OpenArchival.Blazor.Config;
@page "/about"
<PageTitle>About</PageTitle>
@if (string.IsNullOrEmpty(_htmlContent))
{
<p>Loading content...</p>
}
else
{
@((MarkupString)_htmlContent)
}
@inject IOptions<ApplicationOptions> AppOptions;
@code {
private string _htmlContent = $"<h1>HTML file not found for about page. Create one at /admin/aboutpageeditor</h1>";
protected override async void OnInitialized()
{
try
{
using var reader = new StreamReader(AppOptions.Value.AboutPageContentLocation);
_htmlContent = await reader.ReadToEndAsync();
}
catch (Exception ex)
{
_htmlContent = $"<h1>HTML file not found for homepage. Create one at /admin/aboutpageeditor</h1>";
}
StateHasChanged();
}
}