From 50306e2943d781e0f15a97550a0a3c88c36bbaad Mon Sep 17 00:00:00 2001 From: jackfiled Date: Sun, 21 Jan 2024 19:57:14 +0800 Subject: [PATCH] =?UTF-8?q?add:=20=E5=8D=9A=E5=AE=A2=E4=B8=BB=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YaeBlog.Core/Models/BlogOptions.cs | 4 + .../Layout/MainLayout.razor | 31 ++++---- YaeBlog.Theme.FluentUI/Pages/Home.razor | 78 ++++++++++++++++++- YaeBlog.Theme.FluentUI/Pages/Home.razor.css | 55 ++++++++++++- .../YaeBlog.Theme.FluentUI.csproj | 5 ++ YaeBlog.Theme.FluentUI/_Imports.razor | 10 ++- YaeBlog.Theme.FluentUI/wwwroot/globals.css | 4 + 7 files changed, 168 insertions(+), 19 deletions(-) diff --git a/YaeBlog.Core/Models/BlogOptions.cs b/YaeBlog.Core/Models/BlogOptions.cs index 5313860..62a5a80 100644 --- a/YaeBlog.Core/Models/BlogOptions.cs +++ b/YaeBlog.Core/Models/BlogOptions.cs @@ -6,5 +6,9 @@ public class BlogOptions public required string Root { get; set; } + public required string Author { get; set; } + public required string ProjectName { get; set; } + + public required string BannerImage { get; set; } } diff --git a/YaeBlog.Theme.FluentUI/Layout/MainLayout.razor b/YaeBlog.Theme.FluentUI/Layout/MainLayout.razor index e1af66e..d0323c7 100644 --- a/YaeBlog.Theme.FluentUI/Layout/MainLayout.razor +++ b/YaeBlog.Theme.FluentUI/Layout/MainLayout.razor @@ -1,44 +1,47 @@ +@using YaeBlog.Core.Models @inherits LayoutComponentBase +@inject BlogOptions BlogOptionsInstance +
- - Ricardo Ren + + @BlogOptionsInstance.Author - - + + 首页 - - + + 归档 - - + + 标签 - - + + 关于 - - + + 友链 @@ -46,8 +49,8 @@
- -
+ +
@Body
diff --git a/YaeBlog.Theme.FluentUI/Pages/Home.razor b/YaeBlog.Theme.FluentUI/Pages/Home.razor index e8a367e..1fd8d9d 100644 --- a/YaeBlog.Theme.FluentUI/Pages/Home.razor +++ b/YaeBlog.Theme.FluentUI/Pages/Home.razor @@ -1,7 +1,81 @@ @page "/" -

Home

+@using YaeBlog.Core.Models + +@inject BlogOptions BlogOptionsInstance + +
+ + +
+ +
+ asdfasdfsadf +
+
+ asdfasdfsadf +
+
+ asdfasdfsadf +
+
+ asdfasdfsadf +
+
+ asdfasdfsadf +
+
+ asdfasdfsadf +
+
+ asdfasdfsadf +
+
+ asdfasdfsadf +
+
+ asdfasdfsadf +
+
+ asdfasdfsadf +
+
+ asdfasdfsadf +
+
+ asdfasdfsadf +
+
+ asdfasdfsadf +
+
+ asdfasdfsadf +
+
+ asdfasdfsadf +
+
+ asdfasdfsadf +
+
+ asdfasdfsadf +
+
+ asdfasdfsadf +
+
+
+
-

Color Text

@code { diff --git a/YaeBlog.Theme.FluentUI/Pages/Home.razor.css b/YaeBlog.Theme.FluentUI/Pages/Home.razor.css index 9e07b97..09f00f1 100644 --- a/YaeBlog.Theme.FluentUI/Pages/Home.razor.css +++ b/YaeBlog.Theme.FluentUI/Pages/Home.razor.css @@ -1,3 +1,54 @@ -.test { - color: purple; +.banner { + position: relative; + height: 100%; + overflow: hidden; + background-size: cover; + background-repeat: no-repeat; + background-attachment: fixed; +} + +.blog-title { + color: white; + text-align: center; + top: 43%; + position: absolute; + width: 100%; +} + +.scroll-down { + position: absolute; + bottom: 0; + width: 100%; +} + +.scroll-down-tag::before { + content: "V"; +} + +.scroll-down-tag { + font-family: "Font Awesome 6 Free", sans-serif; + font-size: 36px; + color: white; + text-align: center; + position: relative; + display: inline-block; + width: 100%; + animation: scroll-down-animation 1.5s infinite; +} + +@keyframes scroll-down-animation { + 0% { + top: 0; + opacity: 0.4; + } + + 50% { + top: -20px; + opacity: 1; + } + + 100% { + top: 0; + opacity: 0.4; + } } diff --git a/YaeBlog.Theme.FluentUI/YaeBlog.Theme.FluentUI.csproj b/YaeBlog.Theme.FluentUI/YaeBlog.Theme.FluentUI.csproj index 0dddf28..545c700 100644 --- a/YaeBlog.Theme.FluentUI/YaeBlog.Theme.FluentUI.csproj +++ b/YaeBlog.Theme.FluentUI/YaeBlog.Theme.FluentUI.csproj @@ -13,6 +13,11 @@ + + + + + diff --git a/YaeBlog.Theme.FluentUI/_Imports.razor b/YaeBlog.Theme.FluentUI/_Imports.razor index 7728512..6b48efb 100644 --- a/YaeBlog.Theme.FluentUI/_Imports.razor +++ b/YaeBlog.Theme.FluentUI/_Imports.razor @@ -1 +1,9 @@ -@using Microsoft.AspNetCore.Components.Web +@using System.Net.Http +@using System.Net.Http.Json +@using Microsoft.AspNetCore.Components.Forms +@using Microsoft.AspNetCore.Components.Routing +@using Microsoft.AspNetCore.Components.Web +@using static Microsoft.AspNetCore.Components.Web.RenderMode +@using Microsoft.AspNetCore.Components.Web.Virtualization +@using Microsoft.JSInterop +@using Microsoft.FluentUI.AspNetCore.Components diff --git a/YaeBlog.Theme.FluentUI/wwwroot/globals.css b/YaeBlog.Theme.FluentUI/wwwroot/globals.css index e861f02..2a6da98 100644 --- a/YaeBlog.Theme.FluentUI/wwwroot/globals.css +++ b/YaeBlog.Theme.FluentUI/wwwroot/globals.css @@ -1,3 +1,7 @@ body a { text-decoration: none; } + +html, body { + height: 100%; +}