feat: 增加了赞赏码 (#16)
All checks were successful
Build blog docker image / Build-Blog-Image (push) Successful in 55s

Reviewed-on: #16
This commit is contained in:
jackfiled 2025-06-28 18:24:46 +08:00
parent eedfc1ffce
commit 938fe1c715
6 changed files with 49 additions and 8 deletions

1
.gitattributes vendored
View File

@ -1,4 +1,5 @@
*.png filter=lfs diff=lfs merge=lfs -text *.png filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text *.jpg filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.avif filter=lfs diff=lfs merge=lfs -text *.avif filter=lfs diff=lfs merge=lfs -text
*.webp filter=lfs diff=lfs merge=lfs -text *.webp filter=lfs diff=lfs merge=lfs -text

View File

@ -0,0 +1,29 @@
<div class="flex flex-wrap justify-center gap-12 max-w-md md:max-w-lg">
<div class="relative w-40 h-48 md:w-48 md:w-48 overflow-hidden
transition-all duration-300 ease-out hover:scale-125 group">
<img
src="./images/wechat-code.jpeg"
alt="微信赞赏码"
class="w-full h-full object-cover"
/>
<div class="absolute -bottom-8 left-0 right-0 text-center
text-white bg-black opacity-60 text-sm font-medium
backdrop-blur-sm group-hover:bottom-2 transition-all duration-300">
请我喝奶茶<br/>
</div>
</div>
<div class="relative w-40 h-48 md:w-48 md:h-48 overflow-hidden
transition-all duration-300 ease-out hover:scale-125 group">
<img
src="./images/alipay-code.jpeg"
alt="支付宝赞赏码"
class="w-full h-full object-cover"/>
<div class="absolute -bottom-8 left-0 right-0 text-center
text-white bg-black opacity-60 text-sm font-medium
backdrop-blur-sm group-hover:bottom-2 transition-all duration-300">
请我吃晚饭<br/>
</div>
</div>
</div>

View File

@ -1,6 +1,3 @@
@using YaeBlog.Models
@inject BlogOptions Options
<div class="px-4 py-8 border border-sky-700 rounded-md bg-sky-200"> <div class="px-4 py-8 border border-sky-700 rounded-md bg-sky-200">
<div class="flex flex-col gap-3 text-md"> <div class="flex flex-col gap-3 text-md">
<div> <div>
@ -24,6 +21,17 @@
Ricardo's Blog Ricardo's Blog
</a>”。 </a>”。
</div> </div>
<div class="flex flex-col">
<div class="flex justify-center">
<p>如果觉得不错的话,可以支持一下作者哦~</p>
</div>
<div class="flex justify-center">
<AppreciationCode/>
</div>
</div>
</div> </div>
</div> </div>

View File

@ -6,10 +6,7 @@ namespace YaeBlog.Models;
public record BlogContents(ConcurrentBag<BlogContent> Drafts, ConcurrentBag<BlogContent> Posts) public record BlogContents(ConcurrentBag<BlogContent> Drafts, ConcurrentBag<BlogContent> Posts)
: IEnumerable<BlogContent> : IEnumerable<BlogContent>
{ {
IEnumerator<BlogContent> IEnumerable<BlogContent>.GetEnumerator() public IEnumerator<BlogContent> GetEnumerator() => Posts.Concat(Drafts).GetEnumerator();
{
return Posts.Concat(Drafts).GetEnumerator();
}
public IEnumerator GetEnumerator() => ((IEnumerable<BlogContent>)this).GetEnumerator(); IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
} }

BIN
YaeBlog/wwwroot/images/alipay-code.jpeg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
YaeBlog/wwwroot/images/wechat-code.jpeg (Stored with Git LFS) Normal file

Binary file not shown.