Configured default styling and restyled the NotFound page
This commit is contained in:
@@ -1,19 +1,26 @@
|
||||
@inherits LayoutComponentBase
|
||||
@using Blazored.Toast
|
||||
|
||||
<div class="page">
|
||||
<main>
|
||||
<div class="top-row px-4">
|
||||
<a href="https://learn.microsoft.com/aspnet/core/" target="_blank">About</a>
|
||||
<header class="top-bar">
|
||||
<a href="/" class="brand">
|
||||
<svg class="brand-mark" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M70,25 C65,18 58,15 50,15 C30,15 15,30 15,50 C15,70 30,85 50,85 C58,85 65,82 70,75 L62,68 C58,72 54,74 50,74 C37,74 27,63 27,50 C27,37 37,26 50,26 C54,26 58,28 62,32 L70,25 Z" fill="#0096c7" />
|
||||
<circle cx="85" cy="50" r="8" fill="#4dabff" opacity="0.9" />
|
||||
<circle cx="75" cy="80" r="5" fill="#4dabff" opacity="0.6" />
|
||||
<circle cx="75" cy="20" r="5" fill="#4dabff" opacity="0.6" />
|
||||
</svg>
|
||||
|
||||
<div class="text-column">
|
||||
<span class="brand-main">Lite<span class="brand-accent">Charms</span></span>
|
||||
<span class="payoff-line">Shop Admin Console</span>
|
||||
</div>
|
||||
</a>
|
||||
</header>
|
||||
|
||||
<article class="content px-4">
|
||||
@* @Body *@
|
||||
</article>
|
||||
</main>
|
||||
<div class="page-wrapper">
|
||||
<main>
|
||||
@Body
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<div id="blazor-error-ui" data-nosnippet>
|
||||
An unhandled error has occurred.
|
||||
<a href="." class="reload">Reload</a>
|
||||
<span class="dismiss">🗙</span>
|
||||
</div>
|
||||
<BlazoredToasts />
|
||||
@@ -1,98 +1,92 @@
|
||||
.page {
|
||||
position: relative;
|
||||
/* --- Blazored Toast Branded Styling --- */
|
||||
::deep .blazored-toast-container {
|
||||
position: fixed;
|
||||
bottom: 20px;
|
||||
left: 20px;
|
||||
z-index: 9999;
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
gap: 12px;
|
||||
width: 350px;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
::deep .blazored-toast {
|
||||
pointer-events: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
background: rgba(11, 17, 20, 0.95);
|
||||
backdrop-filter: blur(10px);
|
||||
border: 1px solid rgba(0, 150, 199, 0.3);
|
||||
border-left: 4px solid #0096c7;
|
||||
border-radius: 8px;
|
||||
padding: 16px 40px 16px 16px;
|
||||
color: #fff;
|
||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
|
||||
animation: slideInLeft 0.3s ease-out;
|
||||
}
|
||||
|
||||
main {
|
||||
flex: 1;
|
||||
::deep .blazored-toast-header {
|
||||
font-weight: 800;
|
||||
font-size: 1rem;
|
||||
color: #0096c7;
|
||||
margin-bottom: 4px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
|
||||
::deep .blazored-toast-message {
|
||||
font-size: 0.9rem;
|
||||
color: #e0e0e0;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.top-row {
|
||||
background-color: #f7f7f7;
|
||||
border-bottom: 1px solid #d6d5d5;
|
||||
justify-content: flex-end;
|
||||
height: 3.5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
::deep .blazored-toast-close {
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
right: 12px;
|
||||
cursor: pointer;
|
||||
background: none;
|
||||
border: none;
|
||||
color: #888;
|
||||
font-size: 20px;
|
||||
line-height: 1;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
.top-row ::deep a, .top-row ::deep .btn-link {
|
||||
white-space: nowrap;
|
||||
margin-left: 1.5rem;
|
||||
text-decoration: none;
|
||||
::deep .blazored-toast-close::before {
|
||||
content: "×";
|
||||
}
|
||||
|
||||
.top-row ::deep a:hover, .top-row ::deep .btn-link:hover {
|
||||
text-decoration: underline;
|
||||
::deep .blazored-toast-close:hover {
|
||||
color: #ff4d4d;
|
||||
}
|
||||
|
||||
.top-row ::deep a:first-child {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
@media (max-width: 640.98px) {
|
||||
.top-row {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.top-row ::deep a, .top-row ::deep .btn-link {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 641px) {
|
||||
.page {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 250px;
|
||||
height: 100vh;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.top-row {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.top-row.auth ::deep a:first-child {
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.top-row, article {
|
||||
padding-left: 2rem !important;
|
||||
padding-right: 1.5rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
#blazor-error-ui {
|
||||
color-scheme: light only;
|
||||
background: lightyellow;
|
||||
::deep .blazored-toast-progressbar {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
|
||||
box-sizing: border-box;
|
||||
display: none;
|
||||
left: 0;
|
||||
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 1000;
|
||||
height: 3px;
|
||||
background: rgba(0, 150, 199, 0.5);
|
||||
}
|
||||
|
||||
#blazor-error-ui .dismiss {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: 0.75rem;
|
||||
top: 0.5rem;
|
||||
@keyframes slideInLeft {
|
||||
from {
|
||||
transform: translateX(-100%);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translateX(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
::deep .blazored-toast-container {
|
||||
width: calc(100% - 40px);
|
||||
left: 20px;
|
||||
bottom: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
@page "/counter"
|
||||
@rendermode InteractiveServer
|
||||
|
||||
<PageTitle>Counter</PageTitle>
|
||||
|
||||
<h1>Counter</h1>
|
||||
|
||||
<p role="status">Current count: @currentCount</p>
|
||||
|
||||
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
|
||||
|
||||
@code {
|
||||
private int currentCount = 0;
|
||||
|
||||
private void IncrementCount()
|
||||
{
|
||||
currentCount++;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
@page "/"
|
||||
|
||||
|
||||
@@ -1,5 +1,40 @@
|
||||
@page "/not-found"
|
||||
@layout MainLayout
|
||||
@page "/404"
|
||||
@page "/not-found"
|
||||
|
||||
<h3>Not Found</h3>
|
||||
<p>Sorry, the content you are looking for does not exist</p>
|
||||
<div class="error-container">
|
||||
<div class="error-visual">
|
||||
<svg viewBox="0 0 200 200" fill="none" xmlns="http://www.w3.org/2000/svg" class="tech-svg">
|
||||
<line x1="20" y1="100" x2="180" y2="100" stroke="rgba(144, 224, 239, 0.08)" stroke-width="2" stroke-dasharray="4 4" />
|
||||
<line x1="100" y1="20" x2="100" y2="180" stroke="rgba(144, 224, 239, 0.08)" stroke-width="2" stroke-dasharray="4 4" />
|
||||
|
||||
<circle cx="100" cy="100" r="70" stroke="var(--brand-blue)" stroke-width="1.5" stroke-dasharray="5 10" opacity="0.4" />
|
||||
<circle cx="100" cy="100" r="50" stroke="var(--payoff-color)" stroke-width="1" opacity="0.15" />
|
||||
|
||||
<path d="M65,65 L135,135" stroke="var(--brand-blue)" stroke-width="2" stroke-linecap="round" opacity="0.3" />
|
||||
<path d="M135,65 L65,135" stroke="rgba(144, 224, 239, 0.2)" stroke-width="1.5" stroke-linecap="round" />
|
||||
|
||||
<circle cx="100" cy="100" r="14" fill="var(--bar-bg)" stroke="var(--brand-blue)" stroke-width="3" />
|
||||
<circle cx="100" cy="100" r="4" fill="#4dabff" />
|
||||
|
||||
<circle cx="65" cy="65" r="6" fill="var(--bar-bg)" stroke="var(--payoff-color)" stroke-width="2" />
|
||||
<circle cx="135" cy="65" r="6" fill="var(--bar-bg)" stroke="var(--payoff-color)" stroke-width="2" />
|
||||
<circle cx="135" cy="135" r="6" fill="var(--bar-bg)" stroke="var(--payoff-color)" stroke-width="2" />
|
||||
<circle cx="65" cy="135" r="6" fill="var(--bar-bg)" stroke="var(--payoff-color)" stroke-width="2" />
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<div class="error-meta">
|
||||
<h1 class="error-code">404</h1>
|
||||
<h2 class="error-title">Resource Location Failure</h2>
|
||||
<p class="error-desc">
|
||||
The operational route, package schema, or data record you are querying cannot be resolved within this cluster context.
|
||||
</p>
|
||||
<a href="/" class="btn-return">
|
||||
<svg class="icon-left" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
||||
<line x1="19" y1="12" x2="5" y2="12"></line>
|
||||
<polyline points="12 19 5 12 12 5"></polyline>
|
||||
</svg>
|
||||
Return to Core Dashboard
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,102 @@
|
||||
.error-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
padding: 2rem;
|
||||
max-width: 520px;
|
||||
width: 100%;
|
||||
margin: auto; /* Works alongside layout flex to keep perfectly centered */
|
||||
animation: fadeIn 0.4s ease-out;
|
||||
}
|
||||
|
||||
/* Technical SVG Frame Handling */
|
||||
.error-visual {
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
margin-bottom: 1.5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.tech-svg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
filter: drop-shadow(0 0 25px rgba(0, 150, 199, 0.25));
|
||||
}
|
||||
|
||||
/* Typography Hierarchy */
|
||||
.error-code {
|
||||
font-family: 'Poppins', sans-serif;
|
||||
font-size: 3.5rem;
|
||||
font-weight: 900;
|
||||
line-height: 1;
|
||||
color: var(--brand-blue);
|
||||
letter-spacing: -1px;
|
||||
margin: 0 0 0.5rem 0;
|
||||
text-shadow: 0 0 20px rgba(0, 150, 199, 0.2);
|
||||
}
|
||||
|
||||
.error-title {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 700;
|
||||
color: var(--text-white);
|
||||
margin-bottom: 0.75rem;
|
||||
letter-spacing: -0.2px;
|
||||
}
|
||||
|
||||
.error-desc {
|
||||
font-size: 0.9rem;
|
||||
line-height: 1.6;
|
||||
color: var(--payoff-color);
|
||||
opacity: 0.75;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
/* Control Actions styled precisely to match your existing brand colors */
|
||||
.btn-return {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
background-color: rgba(0, 150, 199, 0.08);
|
||||
color: var(--text-white);
|
||||
border: 1px solid rgba(0, 150, 199, 0.4);
|
||||
padding: 12px 28px;
|
||||
border-radius: 6px;
|
||||
font-weight: 600;
|
||||
font-size: 0.95rem;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
transition: all 0.25s ease;
|
||||
}
|
||||
|
||||
.btn-return:hover {
|
||||
background-color: var(--brand-blue);
|
||||
border-color: var(--hover-blue);
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 20px rgba(0, 150, 199, 0.3);
|
||||
}
|
||||
|
||||
.icon-left {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
transition: transform 0.25s ease;
|
||||
}
|
||||
|
||||
.btn-return:hover .icon-left {
|
||||
transform: translateX(-3px);
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(10px);
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,11 @@
|
||||
<Router AppAssembly="typeof(Program).Assembly" NotFoundPage="typeof(Pages.NotFound)">
|
||||
<Router AppAssembly="@typeof(Program).Assembly">
|
||||
<Found Context="routeData">
|
||||
<RouteView RouteData="routeData" DefaultLayout="typeof(Layout.MainLayout)" />
|
||||
<FocusOnNavigate RouteData="routeData" Selector="h1" />
|
||||
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
|
||||
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
|
||||
</Found>
|
||||
</Router>
|
||||
<NotFound>
|
||||
<LayoutView Layout="@typeof(MainLayout)">
|
||||
<ShopAdmin.Components.Pages.NotFound />
|
||||
</LayoutView>
|
||||
</NotFound>
|
||||
</Router>
|
||||
Reference in New Issue
Block a user