Stable run with tailwind

This commit is contained in:
2026-07-18 12:08:14 +02:00
parent c9a5d3a79c
commit e3a735acda
116 changed files with 8230 additions and 66158 deletions
+44 -40
View File
@@ -1,49 +1,53 @@
@page "/Error"
@using System.Diagnostics
@inject NavigationManager Navigation
@namespace MidrandBooks.Components.Pages
@using Microsoft.AspNetCore.Components
<PageTitle>System Exception | Midrand Books</PageTitle>
<div id="error-razor" class="w-full max-w-xl mx-auto px-4 py-16 text-center space-y-6">
<div class="mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-red-500/10 text-red-600 border border-red-500/20">
<svg class="h-8 w-8" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
</svg>
</div>
<div class="artistic-error-container">
<div class="container h-100">
<div class="row align-items-center justify-content-center min-vh-70 py-5">
<div class="space-y-2">
<h2 class="font-serif text-2xl md:text-3xl font-bold text-slate-800">Something went wrong</h2>
<p class="text-xs text-slate-500 max-w-sm mx-auto leading-relaxed">
@Message
</p>
</div>
<div class="col-12 col-md-5 d-flex justify-content-center mb-5 mb-md-0">
<svg viewBox="0 0 400 400" width="300" height="300" fill="none" stroke="#1A1A1A" stroke-width="1.5">
<rect x="100" y="100" width="200" height="200" transform="rotate(45 200 200)" opacity="0.2" />
<line x1="150" y1="150" x2="250" y2="250" />
<line x1="250" y1="150" x2="150" y2="250" />
<circle cx="200" cy="200" r="80" stroke-dasharray="10 10" />
</svg>
</div>
<div class="col-12 col-md-6 offset-md-1">
<div class="meta-tag font-monospace text-uppercase text-danger mb-3">System Exception // Critical Halt</div>
<h1 class="display-4 text-dark mb-4 editorial-headline">An unexpected<br />interruption.</h1>
<p class="text-muted mb-5 body-manifesto-text">
We are experiencing a technical disruption in our processing stream. Our team has been notified of this structural anomaly.
</p>
@if (ShowRequestId)
{
<p class="font-monospace text-muted small mb-4">
Ref: <code>@RequestId</code>
</p>
}
<button class="btn btn-outline-dark rounded-pill px-5 py-3" @onclick='() => Navigation.NavigateTo("/")'>Return to Library</button>
</div>
@if (!string.IsNullOrEmpty(ErrorCode))
{
<div class="p-3 bg-slate-50 rounded-xl border border-slate-100 inline-block font-mono text-[10px] text-slate-400">
Error Code: <span class="font-bold text-slate-600">@ErrorCode</span>
</div>
}
<div class="flex justify-center gap-3 pt-2">
@if (OnRetry.HasDelegate)
{
<button @onclick="HandleRetry" class="px-5 py-2 rounded-xl bg-violet-600 hover:bg-violet-500 text-white font-bold text-xs transition-all shadow-md shadow-violet-500/15 cursor-pointer">
Try Again
</button>
}
<button @onclick="HandleBackToHome" class="px-5 py-2 rounded-xl border border-slate-200 hover:bg-slate-50 text-slate-600 font-bold text-xs transition-all cursor-pointer">
Back to Catalog
</button>
</div>
</div>
@code {
[CascadingParameter] private HttpContext? HttpContext { get; set; }
private string? RequestId { get; set; }
private bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
[Parameter] public string Message { get; set; } = "An unexpected error occurred while processing your request. Please try again later.";
[Parameter] public string? ErrorCode { get; set; } = "ERR_CONNECTION_FAILED";
[Parameter] public EventCallback OnRetry { get; set; }
[Parameter] public EventCallback OnBackToHome { get; set; }
protected override void OnInitialized() =>
RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier;
}
private async Task HandleRetry()
{
await OnRetry.InvokeAsync();
}
private async Task HandleBackToHome()
{
await OnBackToHome.InvokeAsync();
}
}