From 78c6a806bf57304ea51dafdfd0d8e33c1ed5b7fe Mon Sep 17 00:00:00 2001 From: jackfiled Date: Wed, 24 Jan 2024 20:53:41 +0800 Subject: [PATCH] =?UTF-8?q?add:=20=E5=AD=90=E6=A0=87=E9=A2=98=E5=92=8C?= =?UTF-8?q?=E6=96=87=E7=AB=A0=E7=AE=80=E4=BB=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Layout/MainLayout.razor | 12 ++++----- YaeBlog.Theme.FluentUI/Pages/Essay.razor | 26 +++++++++++++++---- YaeBlog.Theme.FluentUI/Pages/Essay.razor.css | 6 ++++- YaeBlog.Theme.FluentUI/Pages/Home.razor | 10 ++++++- YaeBlog.Theme.FluentUI/Pages/Home.razor.css | 8 +++++- 5 files changed, 48 insertions(+), 14 deletions(-) diff --git a/YaeBlog.Theme.FluentUI/Layout/MainLayout.razor b/YaeBlog.Theme.FluentUI/Layout/MainLayout.razor index 59315f2..197df14 100644 --- a/YaeBlog.Theme.FluentUI/Layout/MainLayout.razor +++ b/YaeBlog.Theme.FluentUI/Layout/MainLayout.razor @@ -9,7 +9,7 @@
- + @BlogOptionsInstance.Author @@ -17,31 +17,31 @@ - + 首页 - + 归档 - + 标签 - + 关于 - + 友链 diff --git a/YaeBlog.Theme.FluentUI/Pages/Essay.razor b/YaeBlog.Theme.FluentUI/Pages/Essay.razor index 3c1021c..9df0164 100644 --- a/YaeBlog.Theme.FluentUI/Pages/Essay.razor +++ b/YaeBlog.Theme.FluentUI/Pages/Essay.razor @@ -9,9 +9,26 @@
- - @(_essay!.Title) - + + + @(_essay!.Title) + +
+ + + @(_essay!.PublishTime.ToString("yyyy年MM月dd日")) + +
+
+ + + @(_essay!.WordCount)字 + +
+
@@ -35,8 +52,7 @@
@code { - [Parameter] - public string? Filename { get; set; } + [Parameter] public string? Filename { get; set; } private BlogEssay? _essay; diff --git a/YaeBlog.Theme.FluentUI/Pages/Essay.razor.css b/YaeBlog.Theme.FluentUI/Pages/Essay.razor.css index bdf0648..c622659 100644 --- a/YaeBlog.Theme.FluentUI/Pages/Essay.razor.css +++ b/YaeBlog.Theme.FluentUI/Pages/Essay.razor.css @@ -8,7 +8,6 @@ .essay-title { color: white; - text-align: center; top: 43%; position: absolute; width: 100%; @@ -18,3 +17,8 @@ font-size: 1rem; line-height: 1.6; } + +.essay-subtitle { + display: flex; + align-items: center; +} diff --git a/YaeBlog.Theme.FluentUI/Pages/Home.razor b/YaeBlog.Theme.FluentUI/Pages/Home.razor index 6252556..f328421 100644 --- a/YaeBlog.Theme.FluentUI/Pages/Home.razor +++ b/YaeBlog.Theme.FluentUI/Pages/Home.razor @@ -31,10 +31,18 @@
- @essay.Value.Title + @(essay.Value.Title) +
+ +
+ @(essay.Value.Description) +
+
+
+ diff --git a/YaeBlog.Theme.FluentUI/Pages/Home.razor.css b/YaeBlog.Theme.FluentUI/Pages/Home.razor.css index 51764bb..5e00071 100644 --- a/YaeBlog.Theme.FluentUI/Pages/Home.razor.css +++ b/YaeBlog.Theme.FluentUI/Pages/Home.razor.css @@ -56,7 +56,13 @@ } .essay-description { - vertical-align: middle; + width: 100%; + line-height: 1.4rem; + word-break: break-word; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; } .pagination {