From 9306af07b3a7d130499e5daaeee820ecc3419025 Mon Sep 17 00:00:00 2001 From: jackfiled Date: Thu, 15 Feb 2024 21:20:32 +0800 Subject: [PATCH] =?UTF-8?q?add:=20=E9=94=99=E8=AF=AF=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=92=8C=E8=87=AA=E5=8A=A8=E9=87=8D=E5=AE=9A=E5=90=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BlogApplicationBuilderExtensions.cs | 1 + YaeBlog.Theme.FluentUI/Pages/Essay.razor | 6 +++++- YaeBlog.Theme.FluentUI/Pages/NotFound.razor | 17 +++++++++++++++++ YaeBlog.sln | 14 +++++++------- 4 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 YaeBlog.Theme.FluentUI/Pages/NotFound.razor diff --git a/YaeBlog.Theme.FluentUI/BlogApplicationBuilderExtensions.cs b/YaeBlog.Theme.FluentUI/BlogApplicationBuilderExtensions.cs index 476fd1e..3d8ccca 100644 --- a/YaeBlog.Theme.FluentUI/BlogApplicationBuilderExtensions.cs +++ b/YaeBlog.Theme.FluentUI/BlogApplicationBuilderExtensions.cs @@ -24,6 +24,7 @@ public static class BlogApplicationBuilderExtensions { application.UseStaticFiles(); application.UseAntiforgery(); + application.UseStatusCodePagesWithRedirects("~/NotFound"); application.MapRazorComponents(); } } diff --git a/YaeBlog.Theme.FluentUI/Pages/Essay.razor b/YaeBlog.Theme.FluentUI/Pages/Essay.razor index c91913c..76e4c76 100644 --- a/YaeBlog.Theme.FluentUI/Pages/Essay.razor +++ b/YaeBlog.Theme.FluentUI/Pages/Essay.razor @@ -41,7 +41,7 @@
- +
@((MarkupString)_essay!.HtmlContent)
@@ -49,7 +49,11 @@
+ + + +
diff --git a/YaeBlog.Theme.FluentUI/Pages/NotFound.razor b/YaeBlog.Theme.FluentUI/Pages/NotFound.razor new file mode 100644 index 0000000..5d4c07b --- /dev/null +++ b/YaeBlog.Theme.FluentUI/Pages/NotFound.razor @@ -0,0 +1,17 @@ +@page "/NotFound" + +
+
+ +
+ + + 前面的区域,以后再来探索吧,, + + +
+
+ +@code { + +} diff --git a/YaeBlog.sln b/YaeBlog.sln index 4df021c..da8f005 100644 --- a/YaeBlog.sln +++ b/YaeBlog.sln @@ -3,22 +3,19 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "YaeBlog.Core", "YaeBlog.Core\YaeBlog.Core.csproj", "{1671A8AE-78F6-4641-B97D-D8ABA5E9CBEF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "YaeBlog.Core", "YaeBlog.Core\YaeBlog.Core.csproj", "{1671A8AE-78F6-4641-B97D-D8ABA5E9CBEF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "YaeBlog.Theme.FluentUI", "YaeBlog.Theme.FluentUI\YaeBlog.Theme.FluentUI.csproj", "{E3EB73E2-0267-416A-BA0A-9D0FC93AAFA0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "YaeBlog.Theme.FluentUI", "YaeBlog.Theme.FluentUI\YaeBlog.Theme.FluentUI.csproj", "{E3EB73E2-0267-416A-BA0A-9D0FC93AAFA0}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "YaeBlog.Example", "YaeBlog.Example\YaeBlog.Example.csproj", "{3A768948-D4E8-4111-A1FE-DF98EBFC4991}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "YaeBlog.Example", "YaeBlog.Example\YaeBlog.Example.csproj", "{3A768948-D4E8-4111-A1FE-DF98EBFC4991}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "YaeBlog.Tests", "YaeBlog.Tests\YaeBlog.Tests.csproj", "{5866CB58-6FE2-4DB8-AE20-8439D8C6C3B9}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "YaeBlog.Tests", "YaeBlog.Tests\YaeBlog.Tests.csproj", "{5866CB58-6FE2-4DB8-AE20-8439D8C6C3B9}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {1671A8AE-78F6-4641-B97D-D8ABA5E9CBEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1671A8AE-78F6-4641-B97D-D8ABA5E9CBEF}.Debug|Any CPU.Build.0 = Debug|Any CPU @@ -37,4 +34,7 @@ Global {5866CB58-6FE2-4DB8-AE20-8439D8C6C3B9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5866CB58-6FE2-4DB8-AE20-8439D8C6C3B9}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection EndGlobal