feat: 新增「记得」插件(plugin-important-dates)主题适配页面 (v1.1.10)
- 新增 templates/important-dates.html 覆盖插件默认模板,融入暖屿外观 - 居中标题区(标题/副标题可配置)+ 强调线,与书架、友链等页面一致 - 生活 / 爱车双视图切换,地址栏记忆 ?view=car - 到期提醒横幅(重要日期 + 座驾到期),支持逐条忽略并记录在本地 - 重要日期便签卡片:倒计时、日期、农历标记、关联的人 - 牵挂的人卡片:大头贴(失效回退首字)、昵称、关系、脱敏生日与倒计时 - 爱车卡片:封面相册、分类品牌、脱敏车牌、到期徽章(临近/逾期)、车主与驾驶人 - 相册浮层运行时移到 body,避免被 .wi-main 层叠上下文困住而被导航/页脚遮挡 - 暗黑模式随主题变量自动适配 - settings.yaml 新增 important_dates 设置组(页面标题/副标题) - 文档:README 插件表、docs/config/important-dates.md、docs/pages/important-dates.md - 版本升至 1.1.10
This commit is contained in:
@@ -36,6 +36,7 @@ export default defineConfig({
|
||||
{ text: '图库', link: '/config/photos' },
|
||||
{ text: '友情链接', link: '/config/links' },
|
||||
{ text: '朋友圈', link: '/config/friends' },
|
||||
{ text: '记得', link: '/config/important-dates' },
|
||||
{ text: '留言板', link: '/config/messageboard' },
|
||||
{ text: '评论', link: '/config/comment' },
|
||||
{ text: '页脚', link: '/config/footer' },
|
||||
@@ -53,6 +54,7 @@ export default defineConfig({
|
||||
{ text: '图库', link: '/pages/photos' },
|
||||
{ text: '友情链接', link: '/pages/links' },
|
||||
{ text: '朋友圈', link: '/pages/friends' },
|
||||
{ text: '记得', link: '/pages/important-dates' },
|
||||
{ text: '自定义页面', link: '/pages/custom-page' },
|
||||
{ text: '扩展页面', link: '/pages/extended' },
|
||||
]
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
# 记得
|
||||
|
||||
「记得」模块对应 [plugin-important-dates](https://github.com/yyliucha/plugin-important-dates) 插件的前台页面 `/important-dates`,用于展示重要日期、牵挂的人与座驾(爱车)信息。
|
||||
|
||||
## 配置项一览
|
||||
|
||||
| 配置项 | 类型 | 默认值 | 说明 |
|
||||
| --- | --- | --- | --- |
|
||||
| `idates_page_title` | 文本 | `记得` | 页面标题,留空时使用插件自带标题 |
|
||||
| `idates_page_subtitle` | 文本 | `记着重要的日子、惦记的人,还有陪你跑的爱车` | 页面副标题 |
|
||||
|
||||
```yaml
|
||||
idates_page_title: "记得" # 默认
|
||||
idates_page_title: "纪念日" # 自定义
|
||||
idates_page_subtitle: "记着重要的日子、惦记的人,还有陪你跑的爱车"
|
||||
```
|
||||
|
||||
## 前置依赖
|
||||
|
||||
::: danger
|
||||
本页依赖 Halo 的 **plugin-important-dates**(记得)插件。未安装插件时 `/important-dates` 路由不存在,页面不会显示。
|
||||
|
||||
安装方式:Halo 后台 → **插件** → **安装** → 上传 jar,或直接前往 [GitHub Releases](https://github.com/yyliucha/plugin-important-dates/releases) 下载。
|
||||
:::
|
||||
|
||||
## 数据来源
|
||||
|
||||
页面数据全部由插件提供,主题不读取任何隐私字段:
|
||||
|
||||
- `dates` — 重要日期(名称、日期、农历标记、关联人员、倒计时)
|
||||
- `people` — 牵挂的人(昵称、关系、脱敏生日、生日倒计时、大头贴)
|
||||
- `cars` — 座驾(分类、品牌型号、脱敏车牌、到期事项、相册)
|
||||
- `reminders` / `carEvents` — 顶部到期提醒横幅
|
||||
|
||||
是否展示「重要」标记、大头贴、爱车视图等,均由插件自己的「设置」控制,主题侧只负责呈现。
|
||||
|
||||
## 相关页面
|
||||
|
||||
- [扩展页面](/pages/extended) — 全部插件扩展页面一览
|
||||
- [记得页面](/pages/important-dates) — 页面结构与模板覆盖说明
|
||||
@@ -14,6 +14,7 @@ WarmIsland 主题深度集成了多款 Halo 插件,提供了丰富的扩展页
|
||||
| 装备 | [equipment](https://www.halo.run/store/apps/app-ytygyqml) | /equipments |
|
||||
| 足迹 | [footprint](https://www.halo.run/store/apps/app-XCtAQ) | /footprints |
|
||||
| Steam | [steam](https://www.halo.run/store/apps/app-0ojqyzfh) | /steam |
|
||||
| 记得 | [plugin-important-dates](https://github.com/yyliucha/plugin-important-dates) | /important-dates |
|
||||
|
||||
## 豆瓣页面
|
||||
[豆瓣插件](https://www.halo.run/store/apps/app-srBOL)
|
||||
@@ -36,6 +37,18 @@ WarmIsland 主题深度集成了多款 Halo 插件,提供了丰富的扩展页
|
||||
- 徽章展示
|
||||
- 最近游戏
|
||||
|
||||
## 记得页面
|
||||
|
||||
[记得插件](https://github.com/yyliucha/plugin-important-dates)
|
||||
记录重要的日子、牵挂的人与座驾,「生活 / 爱车」双视图展示:
|
||||
|
||||
- 重要日期(含农历)与倒计时便签
|
||||
- 牵挂的人:大头贴、昵称、关系与生日倒计时
|
||||
- 座驾:脱敏车牌、到期事项徽章、车主与驾驶人
|
||||
- 相册:点击车辆封面全屏只读浏览
|
||||
|
||||
详见 [记得页面](/pages/important-dates)。
|
||||
|
||||
::: info
|
||||
扩展页面需要安装对应的 Halo 插件才能使用。如果插件未安装,页面会显示友好的提示信息。
|
||||
:::
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
# 记得页面
|
||||
|
||||
`/important-dates` 由 [plugin-important-dates](https://github.com/yyliucha/plugin-important-dates) 插件提供路由,主题提供同名模板 `templates/important-dates.html` 覆盖插件默认样式,使页面完全融入 WarmIsland 的外观(导航、页脚、暗色模式)。
|
||||
|
||||
## 页面结构
|
||||
|
||||
```
|
||||
记得(标题 + 副标题 + 强调线)
|
||||
├─ 生活 / 爱车 视图切换(插件开启「前台爱车模块」时出现)
|
||||
├─ 到期提醒横幅(生活:重要日期;爱车:保险 / 年检 / 保养)
|
||||
├─ 生活视图
|
||||
│ ├─ 重要日期(便签卡片:倒计时、日期、农历标记、关联的人)
|
||||
│ └─ 牵挂的人(大头贴、昵称、关系、脱敏生日与倒计时)
|
||||
└─ 爱车视图
|
||||
├─ 我的爱车(封面、分类品牌、脱敏车牌、到期徽章、车主/驾驶人)
|
||||
└─ 车主与驾驶人 / 其他重要的人
|
||||
```
|
||||
|
||||
## 交互
|
||||
|
||||
- **视图切换**:点击「生活 / 爱车」即时切换,地址栏记忆 `?view=car`
|
||||
- **相册**:点击车辆封面全屏浏览相册(只读),`Esc` 或点击空白处关闭;未上传照片时给出轻提示
|
||||
- **忽略提醒**:横幅右侧 ✕ 表示「本次到期周期内不再提示」,记录在浏览器本地,到期日变化后自动恢复
|
||||
|
||||
## 模板覆盖机制
|
||||
|
||||
插件通过 Halo 的 `TemplateNameResolver` 解析模板名:
|
||||
|
||||
1. 主题存在 `templates/important-dates.html` → 使用主题模板
|
||||
2. 否则回退插件自带默认模板(会用主题的 `layout.html` 页面布局契约)
|
||||
|
||||
删除主题内的 `important-dates.html` 即可回到插件默认样式;插件不会写入或修改任何主题文件。
|
||||
|
||||
## 可用模板变量
|
||||
|
||||
| 变量 | 说明 |
|
||||
| --- | --- |
|
||||
| `title` | 页面标题(插件默认「记得」) |
|
||||
| `dates` / `people` | 重要日期、人员列表 |
|
||||
| `reminders` | 即将到来的重要日期(提醒横幅) |
|
||||
| `cars` / `carEvents` | 座驾列表、即将到期的座驾事项 |
|
||||
| `carPeople` / `otherPeople` / `personCars` | 车主驾驶人、其他人员、人员与车辆关系 |
|
||||
| `showCarSection` / `carSkinEnabled` / `showAvatar` / `showImportantTag` | 各展示开关 |
|
||||
| `allowDismiss` | 是否允许逐条忽略提醒 |
|
||||
|
||||
## 注意事项
|
||||
|
||||
::: warning
|
||||
`PersonVo` 没有 `gender` 字段,自定义模板时不要写 `${p.gender}`,否则会触发 SpEL `EL1008E` 导致页面 500。
|
||||
:::
|
||||
|
||||
## 相关页面
|
||||
|
||||
- [记得配置](/config/important-dates) — 页面标题与副标题
|
||||
- [扩展页面](/pages/extended) — 其它插件扩展页面
|
||||
Reference in New Issue
Block a user