add: 错误页面和自动重定向
This commit is contained in:
@@ -24,6 +24,7 @@ public static class BlogApplicationBuilderExtensions
|
||||
{
|
||||
application.UseStaticFiles();
|
||||
application.UseAntiforgery();
|
||||
application.UseStatusCodePagesWithRedirects("~/NotFound");
|
||||
application.MapRazorComponents<App>();
|
||||
}
|
||||
}
|
||||
|
@@ -41,7 +41,7 @@
|
||||
<div style="margin: 0 8% 0 8%">
|
||||
<FluentGrid>
|
||||
<FluentGridItem xs="12" sm="12" md="8" lg="8">
|
||||
<FluentCard>
|
||||
<FluentCard Style="margin: 2rem 0">
|
||||
<div class="essay-content">
|
||||
@((MarkupString)_essay!.HtmlContent)
|
||||
</div>
|
||||
@@ -49,7 +49,11 @@
|
||||
</FluentGridItem>
|
||||
|
||||
<FluentGridItem xs="12" sm="12" md="4" lg="4">
|
||||
<FluentStack Orientation="@Orientation.Vertical">
|
||||
<AuthorInformation/>
|
||||
|
||||
<Announcement/>
|
||||
</FluentStack>
|
||||
</FluentGridItem>
|
||||
</FluentGrid>
|
||||
</div>
|
||||
|
17
YaeBlog.Theme.FluentUI/Pages/NotFound.razor
Normal file
17
YaeBlog.Theme.FluentUI/Pages/NotFound.razor
Normal file
@@ -0,0 +1,17 @@
|
||||
@page "/NotFound"
|
||||
|
||||
<div style="height: 100%">
|
||||
<div style="height: 2rem"></div>
|
||||
|
||||
<div style="margin: 0 8%">
|
||||
<FluentCard>
|
||||
<FluentLabel Typo="@Typography.H4">
|
||||
前面的区域,以后再来探索吧,,
|
||||
</FluentLabel>
|
||||
</FluentCard>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
|
||||
}
|
Reference in New Issue
Block a user