diff --git a/YaeBlog/Components/App.razor b/YaeBlog/Components/App.razor index 2fb0132..073c765 100644 --- a/YaeBlog/Components/App.razor +++ b/YaeBlog/Components/App.razor @@ -1,4 +1,5 @@ - +@using Microsoft.FluentUI.AspNetCore.Components.DesignTokens + @@ -6,6 +7,7 @@ + @@ -13,6 +15,11 @@ + + + + + diff --git a/YaeBlog/Components/Routes.razor b/YaeBlog/Components/Routes.razor index 2641859..281a9c4 100644 --- a/YaeBlog/Components/Routes.razor +++ b/YaeBlog/Components/Routes.razor @@ -1,6 +1,14 @@  - + @if (routeData.Template is not null && routeData.Template.StartsWith("/blog")) + { + + } + else + { + + } + diff --git a/YaeBlog/Layout/BlogLayout.razor b/YaeBlog/Layout/BlogLayout.razor new file mode 100644 index 0000000..7eae5bc --- /dev/null +++ b/YaeBlog/Layout/BlogLayout.razor @@ -0,0 +1,77 @@ +@using YaeBlog.Core.Models +@inherits LayoutComponentBase + +@inject BlogOptions BlogOptionsInstance + + + + +
+ + + + @BlogOptionsInstance.Author + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ @Body +
+
+
diff --git a/YaeBlog/Layout/BlogLayout.razor.css b/YaeBlog/Layout/BlogLayout.razor.css new file mode 100644 index 0000000..4a33391 --- /dev/null +++ b/YaeBlog/Layout/BlogLayout.razor.css @@ -0,0 +1,4 @@ +.quick-link { + display: flex; + align-items: center; +} diff --git a/YaeBlog/Layout/MainLayout.razor b/YaeBlog/Layout/MainLayout.razor index 1b3010a..5e956ca 100644 --- a/YaeBlog/Layout/MainLayout.razor +++ b/YaeBlog/Layout/MainLayout.razor @@ -1,77 +1,21 @@ -@using YaeBlog.Core.Models @inherits LayoutComponentBase -@inject BlogOptions BlogOptionsInstance - - + - -
- - - - @BlogOptionsInstance.Author - - - - - - - - - - - - - - - - - - - - - - - - - -
-
+ + + Ricardo's Index + +
- + +
@Body
+ +@code { + +} diff --git a/YaeBlog/Layout/MainLayout.razor.css b/YaeBlog/Layout/MainLayout.razor.css index 4a33391..e69de29 100644 --- a/YaeBlog/Layout/MainLayout.razor.css +++ b/YaeBlog/Layout/MainLayout.razor.css @@ -1,4 +0,0 @@ -.quick-link { - display: flex; - align-items: center; -} diff --git a/YaeBlog/Pages/About.razor b/YaeBlog/Pages/About.razor index c99fc80..5cea198 100644 --- a/YaeBlog/Pages/About.razor +++ b/YaeBlog/Pages/About.razor @@ -1,4 +1,4 @@ -@page "/about" +@page "/blog/about" @using YaeBlog.Core.Models @inject BlogOptions BlogOptionsInstance diff --git a/YaeBlog/Pages/Archives.razor b/YaeBlog/Pages/Archives.razor index 61d8c38..fa8a96d 100644 --- a/YaeBlog/Pages/Archives.razor +++ b/YaeBlog/Pages/Archives.razor @@ -1,4 +1,4 @@ -@page "/archives" +@page "/blog/archives" @using YaeBlog.Core.Models @using YaeBlog.Core.Services @@ -40,7 +40,7 @@ @foreach (KeyValuePair pair in group) {
- + @(pair.Value.PublishTime.ToString("MM-dd")) diff --git a/YaeBlog/Pages/Home.razor b/YaeBlog/Pages/BlogIndex.razor similarity index 96% rename from YaeBlog/Pages/Home.razor rename to YaeBlog/Pages/BlogIndex.razor index b37b24d..6c13851 100644 --- a/YaeBlog/Pages/Home.razor +++ b/YaeBlog/Pages/BlogIndex.razor @@ -1,4 +1,4 @@ -@page "/" +@page "/blog" @using YaeBlog.Core.Models @using YaeBlog.Core.Services @@ -33,14 +33,14 @@ {
- + @(essay.Value.Title)
- +
@(essay.Value.Description)
@@ -172,7 +172,7 @@ if (flag is false) { - NavigationManagerInstance.NavigateTo("NotFount"); + NavigationManagerInstance.NavigateTo("/NotFount"); } } diff --git a/YaeBlog/Pages/Home.razor.css b/YaeBlog/Pages/BlogIndex.razor.css similarity index 100% rename from YaeBlog/Pages/Home.razor.css rename to YaeBlog/Pages/BlogIndex.razor.css diff --git a/YaeBlog/Pages/Error.razor b/YaeBlog/Pages/Error.razor deleted file mode 100644 index e1369dc..0000000 --- a/YaeBlog/Pages/Error.razor +++ /dev/null @@ -1,36 +0,0 @@ -@page "/Error" -@using System.Diagnostics - -Error - -

Error.

-

An error occurred while processing your request.

- -@if (ShowRequestId) -{ -

- Request ID: @RequestId -

-} - -

Development Mode

-

- Swapping to Development environment will display more detailed information about the error that occurred. -

-

- The Development environment shouldn't be enabled for deployed applications. - It can result in displaying sensitive information from exceptions to end users. - For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development - and restarting the app. -

- -@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; - -} diff --git a/YaeBlog/Pages/Essay.razor b/YaeBlog/Pages/Essay.razor index 76e4c76..206fd82 100644 --- a/YaeBlog/Pages/Essay.razor +++ b/YaeBlog/Pages/Essay.razor @@ -1,4 +1,4 @@ -@page "/essays/{Filename}" +@page "/blog/essays/{Filename}" @using YaeBlog.Core.Models @using YaeBlog.Core.Services diff --git a/YaeBlog/Pages/Index.razor b/YaeBlog/Pages/Index.razor new file mode 100644 index 0000000..3f4feaf --- /dev/null +++ b/YaeBlog/Pages/Index.razor @@ -0,0 +1,76 @@ +@page "/" + + + 初冬的朝阳个人主页 + + + +
+ +
+ + + + + 2021 - 2023 By Ricardo Ren + + + + 蜀ICP备2022004429号-1 + + + + + +@code { + +} diff --git a/YaeBlog/Pages/Index.razor.css b/YaeBlog/Pages/Index.razor.css new file mode 100644 index 0000000..b77f461 --- /dev/null +++ b/YaeBlog/Pages/Index.razor.css @@ -0,0 +1,15 @@ +.index-container { + background-color: #f0f2f5; +} + +.avatar-image { + margin: 25px; + width: 100%; + height: auto; + max-width: 300px; + max-height: 300px; +} + +.footer-zone { + text-align: center; +} diff --git a/YaeBlog/Pages/Links.razor b/YaeBlog/Pages/Links.razor index 8d10eb0..c5fb922 100644 --- a/YaeBlog/Pages/Links.razor +++ b/YaeBlog/Pages/Links.razor @@ -1,4 +1,4 @@ -@page "/links" +@page "/blog/links" @using YaeBlog.Core.Models @inject BlogOptions BlogOptionsInstance diff --git a/YaeBlog/Pages/Tags.razor b/YaeBlog/Pages/Tags.razor index f04960f..d988d8f 100644 --- a/YaeBlog/Pages/Tags.razor +++ b/YaeBlog/Pages/Tags.razor @@ -1,4 +1,4 @@ -@page "/tags" +@page "/blog/tags" @using YaeBlog.Core.Models @using YaeBlog.Core.Services @@ -33,7 +33,7 @@ @foreach (KeyValuePair pair in EssayContentInstance.Tags) {
- + @pair.Key @@ -52,7 +52,7 @@ {
- + @(essay.PublishTime.ToString("yyyy-MM-dd")) diff --git a/YaeBlog/YaeBlog.csproj b/YaeBlog/YaeBlog.csproj index b498de4..8c04e9b 100644 --- a/YaeBlog/YaeBlog.csproj +++ b/YaeBlog/YaeBlog.csproj @@ -4,30 +4,6 @@ - - - - - - - - - - - - - - <_ContentIncludedByDefault Remove="Components\Pages\About.razor" /> - <_ContentIncludedByDefault Remove="Components\Pages\Archives.razor" /> - <_ContentIncludedByDefault Remove="Components\Pages\Error.razor" /> - <_ContentIncludedByDefault Remove="Components\Pages\Essay.razor" /> - <_ContentIncludedByDefault Remove="Components\Pages\Home.razor" /> - <_ContentIncludedByDefault Remove="Components\Pages\Links.razor" /> - <_ContentIncludedByDefault Remove="Components\Pages\NotFound.razor" /> - <_ContentIncludedByDefault Remove="Components\Pages\Tags.razor" /> - <_ContentIncludedByDefault Remove="Components\Layout\MainLayout.razor" /> - - net8.0 enable diff --git a/YaeBlog/appsettings.json b/YaeBlog/appsettings.json index 3ebd202..9bc3b85 100644 --- a/YaeBlog/appsettings.json +++ b/YaeBlog/appsettings.json @@ -29,7 +29,7 @@ }, { "Name": "志田千陽", - "Description": "日出多期待", + "Description": "日出多值得", "Link": "https://zzachary.top/", "AvatarImage": "https://zzachary.top/img/ztqy_hub928259802d192ff5718c06370f0f2c4_48203_300x0_resize_q75_box.jpg" }, diff --git a/YaeBlog/wwwroot/images/blog-icon.png b/YaeBlog/wwwroot/images/blog-icon.png new file mode 100644 index 0000000..6f05694 Binary files /dev/null and b/YaeBlog/wwwroot/images/blog-icon.png differ diff --git a/YaeBlog/wwwroot/images/git-icon.png b/YaeBlog/wwwroot/images/git-icon.png new file mode 100644 index 0000000..cfb5436 Binary files /dev/null and b/YaeBlog/wwwroot/images/git-icon.png differ diff --git a/YaeBlog/wwwroot/images/wiki-icon.png b/YaeBlog/wwwroot/images/wiki-icon.png new file mode 100644 index 0000000..436f27f Binary files /dev/null and b/YaeBlog/wwwroot/images/wiki-icon.png differ