add: License disclaimer.

This commit is contained in:
jackfiled 2024-07-28 14:30:08 +08:00
parent 56a0cc2e9b
commit 12777c227d
3 changed files with 48 additions and 1 deletions

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