feat(widget): 新增文章更新检测与通知组件

- 添加新文章通知组件,通过比对 RSS 源检测新发布的文章并在页面右下角显示通知
- 添加内容差异高亮组件,通过比对本地缓存检测文章内容更新并高亮显示变化部分
- 新增 diff 依赖包用于文本差异比较,同时添加对应的类型定义
- 在布局中引入新组件,支持开发者调试模式
This commit is contained in:
二叉树树
2026-01-25 19:02:57 +08:00
parent bc419d631d
commit a3ea4896fe
5 changed files with 284 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ import "@fontsource/roboto/700.css";
import { profileConfig, siteConfig } from "@/config";
import ConfigCarrier from "@components/ConfigCarrier.astro";
import NewPostNotification from "@components/widget/NewPostNotification.astro";
import {
AUTO_MODE,
BANNER_HEIGHT,
@@ -248,6 +249,7 @@ const bannerOffset =
</noscript>
<div id="bg-box"></div>
<ConfigCarrier></ConfigCarrier>
<NewPostNotification></NewPostNotification>
<slot />
<!-- increase the page height during page transition to prevent the scrolling animation from jumping -->