feat: 美化文章界面 #3

Merged
jackfiled merged 8 commits from feat-markdown into master 2024-07-29 22:32:27 +08:00
3 changed files with 48 additions and 1 deletions
Showing only changes of commit 12777c227d - Show all commits

View File

@ -0,0 +1,36 @@
@using YaeBlog.Core.Models
@inject BlogOptions Options
<div class="row px-2 py-4 copyright border border-primary rounded-1 bg-primary-subtle">
<div class="col">
<div class="row p-1">
<div class="col">
文章作者:<a href="https://rrricardo.top" target="_blank">@(Options.Author)</a>
</div>
</div>
<div class="row p-1">
<div class="col">
文章地址:
<a href="/blog/essays/@(EssayAddress)" target="_blank">
@($"https://rrricardo.top/blog/essays/{EssayAddress}")
</a>
</div>
</div>
<div class="row p-1">
<div class="col">
版权声明:本博客所有文章除特别声明外,均采用
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a>
许可协议,转载请注明来自
<a href="https://rrricardo.top/blog/" target="_blank">Ricardo's Blog</a>。
</div>
</div>
</div>
</div>
@code
{
[Parameter] public string? EssayAddress { get; set; }
}

View File

@ -0,0 +1,2 @@
.copyright {
}

View File

@ -16,7 +16,7 @@
</div> </div>
</div> </div>
<div class="row p-4"> <div class="row px-4 py-1">
<div class="col-auto fw-light"> <div class="col-auto fw-light">
@(_essay!.PublishTime.ToString("yyyy-MM-dd")) @(_essay!.PublishTime.ToString("yyyy-MM-dd"))
</div> </div>
@ -29,11 +29,20 @@
} }
</div> </div>
<div class="row px-4 py-1">
<div class="col-auto fw-light">
总字数:@(_essay!.WordCount)字。
</div>
</div>
<div class="row"> <div class="row">
<div class="col-lg-8 col-md-12"> <div class="col-lg-8 col-md-12">
@((MarkupString)_essay!.HtmlContent) @((MarkupString)_essay!.HtmlContent)
<LicenseDisclaimer EssayAddress="@BlogKey"/>
</div> </div>
</div> </div>
</div> </div>
@code { @code {