From 4c939ae353759afb33903590942cb295e2112edb Mon Sep 17 00:00:00 2001 From: jackfiled Date: Wed, 26 Jun 2024 21:54:51 +0800 Subject: [PATCH] add: customize font size. --- YaeBlog/Components/App.razor | 6 ++-- YaeBlog/Components/WebsiteCard.razor | 36 ++++++++++++++++++++++++ YaeBlog/Components/WebsiteCard.razor.css | 0 YaeBlog/Layout/MainLayout.razor | 7 ++--- YaeBlog/Pages/Index.razor | 24 ++++++++++++---- YaeBlog/wwwroot/themes.js | 8 ++++++ 6 files changed, 67 insertions(+), 14 deletions(-) create mode 100644 YaeBlog/Components/WebsiteCard.razor create mode 100644 YaeBlog/Components/WebsiteCard.razor.css create mode 100644 YaeBlog/wwwroot/themes.js diff --git a/YaeBlog/Components/App.razor b/YaeBlog/Components/App.razor index 073c765..3ee60cd 100644 --- a/YaeBlog/Components/App.razor +++ b/YaeBlog/Components/App.razor @@ -1,5 +1,4 @@ -@using Microsoft.FluentUI.AspNetCore.Components.DesignTokens - + @@ -8,7 +7,7 @@ - + @@ -22,6 +21,7 @@ + diff --git a/YaeBlog/Components/WebsiteCard.razor b/YaeBlog/Components/WebsiteCard.razor new file mode 100644 index 0000000..afe4cd4 --- /dev/null +++ b/YaeBlog/Components/WebsiteCard.razor @@ -0,0 +1,36 @@ + + +
+ + + +
+ @Name +
+ + + + @Name + + + + @Description + + +
+
+
+
+
+
+ + +@code { + [Parameter] public string Name { get; set; } = string.Empty; + + [Parameter] public string Description { get; set; } = string.Empty; + + [Parameter] public string ImageAddress { get; set; } = string.Empty; + + [Parameter] public string Address { get; set; } = string.Empty; +} diff --git a/YaeBlog/Components/WebsiteCard.razor.css b/YaeBlog/Components/WebsiteCard.razor.css new file mode 100644 index 0000000..e69de29 diff --git a/YaeBlog/Layout/MainLayout.razor b/YaeBlog/Layout/MainLayout.razor index 5e956ca..3b758bb 100644 --- a/YaeBlog/Layout/MainLayout.razor +++ b/YaeBlog/Layout/MainLayout.razor @@ -1,7 +1,8 @@ @inherits LayoutComponentBase + - + Ricardo's Index @@ -15,7 +16,3 @@ - -@code { - -} diff --git a/YaeBlog/Pages/Index.razor b/YaeBlog/Pages/Index.razor index 3f4feaf..2b527d2 100644 --- a/YaeBlog/Pages/Index.razor +++ b/YaeBlog/Pages/Index.razor @@ -5,7 +5,7 @@ -
+
@@ -48,20 +48,32 @@ - - - -
+ + + + +
+ + + + + +
+ +
- 2021 - 2023 By
Ricardo Ren + 2021 - @(DateTimeOffset.Now.Year) By Ricardo Ren diff --git a/YaeBlog/wwwroot/themes.js b/YaeBlog/wwwroot/themes.js new file mode 100644 index 0000000..0c9ad18 --- /dev/null +++ b/YaeBlog/wwwroot/themes.js @@ -0,0 +1,8 @@ +import * as fluentUI + from '/_content/Microsoft.FluentUI.AspNetCore.Components/Microsoft.FluentUI.AspNetCore.Components.lib.module.js'; + +fluentUI.typeRampBaseFontSize.withDefault("16px"); +fluentUI.typeRampBaseLineHeight.withDefault("16px"); + + +