feat: rewrite about page for 2026. (#21)
Some checks failed
Build blog docker image / Build-Blog-Image (push) Failing after 14s

Signed-off-by: jackfiled <xcrenchangjun@outlook.com>
Reviewed-on: #21
This commit is contained in:
2026-03-03 09:09:49 +00:00
parent 6ea14b186a
commit 462fbb28ac
386 changed files with 1258 additions and 473 deletions

View File

@@ -12,7 +12,7 @@ indent_style = space
indent_size = 4
trim_trailing_whitespace = true
[project.json]
[{project.json,appsettings.json,appsettings.*.json}]
indent_size = 2
[*.{yaml,yml}]

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "third-party/BlazorSvgComponents"]
path = third-party/BlazorSvgComponents
url = https://git.rrricardo.top/jackfiled/BlazorSvgComponents.git

View File

@@ -7,9 +7,17 @@
<File Path=".editorconfig" />
<File Path=".gitattributes" />
<File Path=".gitignore" />
<File Path="build.ps1" />
<File Path="LICENSE" />
<File Path="README.md" />
</Folder>
<Project Path="YaeBlog.Tests/YaeBlog.Tests.csproj" />
<Project Path="YaeBlog/YaeBlog.csproj" />
<Folder Name="/src/">
<Project Path="src/YaeBlog.Tests/YaeBlog.Tests.csproj" />
<Project Path="src/YaeBlog/YaeBlog.csproj" />
</Folder>
<Folder Name="/third-party/" />
<Folder Name="/third-party/BlazorSvgComponents/" />
<Folder Name="/third-party/BlazorSvgComponents/src/">
<Project Path="third-party/BlazorSvgComponents/src/BlazorSvgComponents/BlazorSvgComponents.csproj" />
</Folder>
</Solution>

View File

@@ -1,79 +0,0 @@
@page "/about"
<PageTitle>
关于
</PageTitle>
<div class="flex flex-col">
<div>
<h1 class="text-4xl">关于</h1>
</div>
<div class="py-4">
<span class="italic">把字刻在石头上!(・’ω’・)</span>
</div>
<div class="flex flex-col p-2">
<div class="flex flex-col p-2">
<div class="pb-2">
<h3 class="text-2xl">关于我</h3>
</div>
<div class="py-2">
计算机科学与技术在读大学生,明光村幼儿园附属大学所属。正处于读书和失业的叠加态。
一般在互联网上使用<span class="italic">初冬的朝阳</span>或者<span class="italic">jackfiled</span>的名字活动。
<span class="line-through">都是ICP备案过的人了网名似乎没有太大的用处</span>
</div>
<div class="py-2">
主要是一个C#程序员目前也在尝试写一点Rust。
总体上对于编程语言的态度是“<span>大家都是我的翅膀.jpg</span>”。
前后端分离的项目本当上手。
常常因为现实的压力而写一些C/C++。
<span class="line-through">对于Java和Go的评价很低。</span>
日常使用ArchLinux。
</div>
<div class="py-2">
100%社恐。日常生活是宅在电脑前面自言自语。
兴趣活动是读书和看番,目前在玩原神和三角洲。
</div>
<div class="py-4">
常常被人批评没有梦想,这里就随便瞎编一下。
成为嵌入式工程师,修好桌面上的<a href="https://www.bilibili.com/video/BV1VA411p7MD">HoloCubic</a>。
完成第一个不是课程设计的个人开源项目。
遇到能够搭伙过日子的人也算是一大梦想,虽然社恐人根本不知道从何开始的说,
<span class="line-through">什么时候天上才能掉美少女?</span>
</div>
<div class="py-2">
公开的联系渠道是<a href="mailto:shicangjuner@outlook.com">电子邮件</a>。
也可以试试在各大平台搜索上面提到的名字。
</div>
</div>
<div class="flex flex-col p-2">
<div class="pb-2">
<h3 class="text-2xl">关于本站</h3>
</div>
<div class="py-2">
本站肇始于2021年下半年在开始的两年中个人网站和博客是分别的两个网站个人网站是裸HTML写的博客是用
<a href="https://hexo.io">Hexo</a>渲染的。
</div>
<div class="py-2">
2024年我们决定使用.NET技术完全重构两个网站合二为一。虽然目前这个版本还是一个半成品但是我们一定会努力的~(确信。
</div>
<div class="py-2">
2025年我们将使用的样式库从Bootstrap迁移到Tailwind CSS将现代的前端技术同Blazor结合起来。
</div>
</div>
</div>
</div>
@code {
}

View File

@@ -1,59 +0,0 @@
@page "/"
<PageTitle>
Ricardo's Index
</PageTitle>
<div class="mx-20">
<div class="grid grid-cols-3 py-4">
<div class="col-span-3 md:col-span-1 p-5 p-lg-0">
<img src="@Assets["images/avatar.png"]" alt="Ricardo's Avatar" class="h-auto max-w-full">
</div>
<div class="col-span-3 md:col-span-2">
<div class="flex flex-col px-3 gap-y-3">
<div class="">
<div class="text-3xl font-bold">初冬的朝阳 (Ricardo Ren)</div>
</div>
<div class="">
<p class="text-lg">a.k.a jackfiled</p>
</div>
<div class="">
<p class="text-lg italic">世界很大,时间很长。</p>
</div>
<div class="">
<p class="text-lg">
学过一些基础的计算机知识,略懂一些代码。
</p>
</div>
</div>
</div>
</div>
<div class="py-5">
<p class="text-lg">恕我不能亲自为您沏茶(?),还是非常欢迎您能够来到我的主页。</p>
</div>
<div>
<p class="text-lg py-1">
如果您想四处看看,了解一下屏幕对面的人,可以在我的 <Anchor Address="/blog/" Text="博客"/> 看看。
如果您对于明光村幼儿园某附属技校的计算机教学感兴趣,您可以移步到
<Anchor Address="https://jackfiled.github.io/wiki/" Text="我的学习笔记"/>
<span class="fs-5 text-decoration-line-through">虽然这笔记我自己也木有看过。</span>
如果您想批判一下我的代码,在
<Anchor Address="https://github.com/jackfiled/" Text="Github"/> 和
<Anchor Address="https://git.rrricardo.top/jackfiled/" Text="Gitea"/>
都可以找到。
</p>
<p class="text-lg py-1">
如果您真的很闲,也可以四处搜寻一下,也许存在着一些不为人知的彩蛋。
</p>
</div>
</div>
@code {
}

View File

@@ -1,33 +0,0 @@
using Markdig;
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions;
namespace YaeBlog.Extensions;
public static class ServiceCollectionExtensions
{
public static IServiceCollection AddMarkdig(this IServiceCollection collection)
{
MarkdownPipelineBuilder builder = new();
builder.UseAdvancedExtensions();
collection.AddSingleton<MarkdownPipeline>(_ => builder.Build());
return collection;
}
public static IServiceCollection AddYamlParser(this IServiceCollection collection)
{
DeserializerBuilder deserializerBuilder = new();
deserializerBuilder.WithNamingConvention(CamelCaseNamingConvention.Instance);
deserializerBuilder.IgnoreUnmatchedProperties();
collection.AddSingleton(deserializerBuilder.Build());
SerializerBuilder serializerBuilder = new();
serializerBuilder.WithNamingConvention(CamelCaseNamingConvention.Instance);
collection.AddSingleton(serializerBuilder.Build());
return collection;
}
}

View File

@@ -1,47 +0,0 @@
using AngleSharp;
using Microsoft.Extensions.Options;
using YaeBlog.Abstraction;
using YaeBlog.Services;
using YaeBlog.Models;
using YaeBlog.Processors;
namespace YaeBlog.Extensions;
public static class WebApplicationBuilderExtensions
{
public static WebApplicationBuilder AddYaeBlog(this WebApplicationBuilder builder)
{
builder.Services.Configure<BlogOptions>(builder.Configuration.GetSection(BlogOptions.OptionName));
builder.Services.AddHttpClient();
builder.Services.AddMarkdig();
builder.Services.AddYamlParser();
builder.Services.AddSingleton<AngleSharp.IConfiguration>(_ => Configuration.Default);
builder.Services.AddSingleton<IEssayScanService, EssayScanService>();
builder.Services.AddSingleton<RendererService>();
builder.Services.AddSingleton<IEssayContentService, EssayContentService>();
builder.Services.AddTransient<ImagePostRenderProcessor>();
builder.Services.AddTransient<HeadlinePostRenderProcessor>();
builder.Services.AddTransient<EssayStylesPostRenderProcessor>();
builder.Services.AddTransient<BlogOptions>(provider =>
provider.GetRequiredService<IOptions<BlogOptions>>().Value);
return builder;
}
public static WebApplicationBuilder AddServer(this WebApplicationBuilder builder)
{
builder.Services.AddHostedService<BlogHostedService>();
return builder;
}
public static WebApplicationBuilder AddWatcher(this WebApplicationBuilder builder)
{
builder.Services.AddTransient<BlogChangeWatcher>();
builder.Services.AddHostedService<BlogHotReloadService>();
return builder;
}
}

View File

@@ -1,64 +0,0 @@
namespace YaeBlog.Models;
public class BlogEssay : IComparable<BlogEssay>
{
public required string Title { get; init; }
public required string FileName { get; init; }
public required bool IsDraft { get; init; }
public required DateTimeOffset PublishTime { get; init; }
public required DateTimeOffset UpdateTime { get; init; }
public required string Description { get; init; }
public required uint WordCount { get; init; }
public required string ReadTime { get; init; }
public List<string> Tags { get; } = [];
public required string HtmlContent { get; init; }
public BlogEssay WithNewHtmlContent(string newHtmlContent)
{
var essay = new BlogEssay
{
Title = Title,
FileName = FileName,
IsDraft = IsDraft,
PublishTime = PublishTime,
UpdateTime = UpdateTime,
Description = Description,
WordCount = WordCount,
ReadTime = ReadTime,
HtmlContent = newHtmlContent
};
essay.Tags.AddRange(Tags);
return essay;
}
public int CompareTo(BlogEssay? other)
{
if (other is null)
{
return -1;
}
// 草稿文章应当排在前面
if (IsDraft != other.IsDraft)
{
return IsDraft ? -1 : 1;
}
return other.PublishTime.CompareTo(PublishTime);
}
public override string ToString()
{
return $"{Title}-{PublishTime}";
}
}

View File

@@ -1,26 +0,0 @@
namespace YaeBlog.Models;
public class BlogOptions
{
public const string OptionName = "Blog";
/// <summary>
/// 博客markdown文件的根目录
/// </summary>
public required string Root { get; set; }
/// <summary>
/// 博客正文的广而告之
/// </summary>
public required string Announcement { get; set; }
/// <summary>
/// 博客的起始年份
/// </summary>
public required int StartYear { get; set; }
/// <summary>
/// 博客的友链
/// </summary>
public required List<FriendLink> Links { get; set; }
}

View File

@@ -1,27 +0,0 @@
namespace YaeBlog.Models;
/// <summary>
/// 友链模型类
/// </summary>
public class FriendLink
{
/// <summary>
/// 友链名称
/// </summary>
public required string Name { get; set; }
/// <summary>
/// 友链的简单介绍
/// </summary>
public required string Description { get; set; }
/// <summary>
/// 友链地址
/// </summary>
public required string Link { get; set; }
/// <summary>
/// 头像地址
/// </summary>
public required string AvatarImage { get; set; }
}

View File

@@ -1,44 +0,0 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"Tailwind": {
"InputFile": "wwwroot/input.css",
"OutputFile": "wwwroot/output.css"
},
"Blog": {
"Root": "source",
"Announcement": "博客锐意装修中,敬请期待!测试阶段如有问题还请海涵。",
"StartYear": 2021,
"Links": [
{
"Name": "Ichirinko",
"Description": "这是个大哥",
"Link": "https://ichirinko.top",
"AvatarImage": "https://ichirinko-blog-img-1.oss-cn-shenzhen.aliyuncs.com/Pic_res/img/202209122110798.png"
},
{
"Name": "志田千陽",
"Description": "日出多值得",
"Link": "https://zzachary.top/",
"AvatarImage": "https://zzachary.top/img/ztqy_hub928259802d192ff5718c06370f0f2c4_48203_300x0_resize_q75_box.jpg"
},
{
"Name": "不会写程序的晨旭",
"Description": "一个普通大学生",
"Link": "https://chenxutalk.top",
"AvatarImage": "https://www.chenxutalk.top/img/photo.png"
},
{
"Name": "万木长风",
"Description": "世界渲染中...",
"Link": "https://ryohai.fun",
"AvatarImage": "https://ryohai.fun/static/favicons/favicon-32x32.png"
}
]
}
}

BIN
YaeBlog/wwwroot/fonts/fa-regular-400.ttf (Stored with Git LFS)

Binary file not shown.

BIN
YaeBlog/wwwroot/fonts/fa-regular-400.woff2 (Stored with Git LFS)

Binary file not shown.

BIN
YaeBlog/wwwroot/fonts/fa-solid-900.ttf (Stored with Git LFS)

Binary file not shown.

BIN
YaeBlog/wwwroot/fonts/fa-solid-900.woff2 (Stored with Git LFS)

Binary file not shown.

View File

@@ -3,14 +3,32 @@
[cmdletbinding()]
param(
[Parameter(Mandatory = $true, Position = 0, HelpMessage = "Specify the build target")]
[ValidateSet("tailwind", "publish", "compress", "build", "dev", "new")]
[ValidateSet("tailwind", "publish", "compress", "build", "dev", "new", "watch", "serve", "list")]
[string]$Target,
[string]$Output = "wwwroot",
[string]$Essay,
[switch]$Compress
[switch]$Compress,
[string]$Root = "source"
)
begin {
if ($Target -eq "tailwind")
{
# Handle tailwind specially.
return
}
# Set the content root.
$fullRootPath = Join-Path $(Get-Location) $Root
if (-not (Test-Path $fullRootPath))
{
Write-Error "Content root $fullRootPath not existed."
exit 1
}
Write-Host "Use content from" $fullRootPath
$env:BLOG__ROOT=$fullRootPath
Write-Host "Building $Target..."
if ($Target -eq "publish")
@@ -30,6 +48,9 @@ begin {
exit 1
}
}
# Set to the current location.
Push-Location src/YaeBlog
}
process {
@@ -87,6 +108,7 @@ process {
}
}
switch ($Target)
{
"tailwind" {
@@ -119,6 +141,21 @@ process {
"new" {
dotnet run -- new $Essay
}
"watch" {
dotnet run -- watch
break
}
"serve" {
dotnet run -- serve
break
}
"list" {
dotnet run -- list
break
}
}
}
end {
Pop-Location
}

View File

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Some files were not shown because too many files have changed in this diff Show More