Styled not found page
This commit is contained in:
@@ -1,36 +1,49 @@
|
||||
@page "/Error"
|
||||
@using System.Diagnostics
|
||||
@inject NavigationManager Navigation
|
||||
|
||||
<PageTitle>Error</PageTitle>
|
||||
<PageTitle>System Exception | Midrand Books</PageTitle>
|
||||
|
||||
<h1 class="text-danger">Error.</h1>
|
||||
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
||||
<div class="artistic-error-container">
|
||||
<div class="container h-100">
|
||||
<div class="row align-items-center justify-content-center min-vh-70 py-5">
|
||||
|
||||
@if (ShowRequestId)
|
||||
{
|
||||
<p>
|
||||
<strong>Request ID:</strong> <code>@RequestId</code>
|
||||
</p>
|
||||
}
|
||||
<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>
|
||||
|
||||
<h3>Development Mode</h3>
|
||||
<p>
|
||||
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
|
||||
</p>
|
||||
<p>
|
||||
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
|
||||
It can result in displaying sensitive information from exceptions to end users.
|
||||
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
|
||||
and restarting the app.
|
||||
</p>
|
||||
<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>
|
||||
|
||||
@code{
|
||||
[CascadingParameter]
|
||||
private HttpContext? HttpContext { get; set; }
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
[CascadingParameter] private HttpContext? HttpContext { get; set; }
|
||||
private string? RequestId { get; set; }
|
||||
private bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||
|
||||
protected override void OnInitialized() =>
|
||||
RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user