add: 博客脚注

This commit is contained in:
jackfiled 2024-01-21 22:46:12 +08:00
parent a7286c86e3
commit 6bbfd83ef3
5 changed files with 72 additions and 0 deletions

View File

@ -4,11 +4,33 @@ public class BlogOptions
{
public const string OptionName = "Blog";
/// <summary>
/// 博客markdown文件的根目录
/// </summary>
public required string Root { get; set; }
/// <summary>
/// 博客作者
/// </summary>
public required string Author { get; set; }
/// <summary>
/// 博客的起始年份
/// </summary>
public required int StartYear { get; set; }
/// <summary>
/// 博客项目的名称
/// </summary>
public required string ProjectName { get; set; }
/// <summary>
/// 博客起始页面的背景图片
/// </summary>
public required string BannerImage { get; set; }
/// <summary>
/// 博客底部是否显示ICP备案信息
/// </summary>
public string? RegisterInformation { get; set; }
}

View File

@ -0,0 +1,33 @@
@using YaeBlog.Core.Models
@inject BlogOptions BlogOptionsInstance
<div class="footer-content">
<div>
<a href="https://learn.microsoft.com/zh-cn/aspnet/core/blazor/" target="_blank" rel="nofollow noopener">
<span> Blazor </span>
</a>
<i class="love-tag"></i>
<span> YaeBlog </span>
<i class="love-tag"></i>
<span>FluentUI</span>
</div>
<div style="padding-top: 0.3rem">
<span>
©@(BlogOptionsInstance.StartYear) - @(DateTime.Now.Year) By @(BlogOptionsInstance.Author)
</span>
</div>
@if (!string.IsNullOrEmpty(BlogOptionsInstance.RegisterInformation))
{
<div style="padding-top: 0.3rem">
<a href="https://beian.miit.gov.cn/" target="_blank" rel="nofollow noopener">
<span>@(BlogOptionsInstance.RegisterInformation)</span>
</a>
</div>
}
</div>
@code {
}

View File

@ -0,0 +1,14 @@
.footer-content {
padding: 2rem 0 1rem 0;
text-align: center;
}
.love-tag {
font-style: normal;
font-weight: 400;
font-family: "Font Awesome 6 Free", sans-serif;
}
.love-tag::before {
content: "\f004";
}

View File

@ -76,6 +76,8 @@
</div>
</FluentCard>
</div>
<BlogFooter/>
</div>

View File

@ -7,3 +7,4 @@
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
@using Microsoft.FluentUI.AspNetCore.Components
@using YaeBlog.Theme.FluentUI.Components