Compare commits
12
Commits
v1.1.1
...
c1b08ad915
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c1b08ad915 | ||
|
|
125d0592c9 | ||
|
|
a127d5a314 | ||
|
|
a08782a959 | ||
|
|
28b1f90b26 | ||
|
|
d3ba189a7d | ||
|
|
9f677a9f0d | ||
|
|
c1950e142a | ||
|
|
032b5601ac | ||
|
|
d01664197f | ||
|
|
bcc221c3bd | ||
|
|
430d107d44 |
+11
-2
@@ -1,18 +1,24 @@
|
||||
# build output
|
||||
dist/
|
||||
templates/
|
||||
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
||||
# docs site
|
||||
docs/.vitepress/cache/
|
||||
docs/.vitepress/dist/
|
||||
docs/node_modules/
|
||||
|
||||
# logs
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
|
||||
# environment variables
|
||||
.env
|
||||
.env.production
|
||||
@@ -23,4 +29,7 @@ pnpm-debug.log*
|
||||
# jetbrains setting folder
|
||||
.idea/
|
||||
|
||||
templates/
|
||||
# AI working artifacts
|
||||
llms.txt
|
||||
|
||||
.workbuddy/
|
||||
|
||||
@@ -4,13 +4,19 @@
|
||||
|
||||
> 本项目由 AI 开发完成,人工仅进行部分功能测试及问题找寻
|
||||
|
||||
## 环境要求
|
||||
|
||||
- Halo **2.26.0 及以上**(页面布局契约、微信读书页面均依赖 2.26 的新能力)
|
||||
- v1.2.0 起内置主题配色系统(纯 CSS 变量实现);更低版本的 Halo 请使用主题 v1.1.x
|
||||
|
||||
## 特点
|
||||
|
||||
1. **响应式设计** — 适配桌面端与移动端,支持暗色模式
|
||||
2. **插件兼容性** — 适配 8 款常用 Halo 插件,安装即用
|
||||
3. **内置灯箱** — 主题内置 LightGallery 灯箱,支持 EXIF 信息展示;安装 lightgallery.js 插件后自动禁用内置灯箱
|
||||
4. **可配置性** — 丰富的后台设置项,支持自定义首页模块、文章卡片、导航栏样式等
|
||||
5. **性能优化** — 图片懒加载、CSS/HTML 压缩、requestAnimationFrame 节流、Vue 组件按需加载
|
||||
1. **响应式设计** — 适配桌面端与移动端,支持暗色模式,移动端使用动态视口单位适配地址栏
|
||||
2. **插件兼容性** — 适配 11 款常用 Halo 插件,安装即用;提供页面布局契约,插件前台页面自动复用主题外观
|
||||
3. **内置灯箱** — 主题内置 LightGallery 灯箱,支持 EXIF 信息展示;安装 lightgallery.js 插件后自动禁用
|
||||
4. **可配置性** — 17 个设置分组、122 个配置项,几乎所有模块可独立开关
|
||||
5. **性能优化** — 服务端字数统计(API 扩展包)、图片懒加载与响应式缩略图、滚动吸附、CSS/HTML 压缩
|
||||
6. **页面布局契约** — 提供 `templates/layout.html`,插件页面不再回退到 Halo 内置布局
|
||||
|
||||
## 预览
|
||||
|
||||
@@ -20,15 +26,53 @@
|
||||
|
||||
| 插件名称 | 插件标识 | 适配页面路由 | 说明 |
|
||||
|----------|---------|-------------|------|
|
||||
| [瞬间](https://halo.run/store/apps/app-SnwWD) | `PluginMoments` | `/moments` | 瞬间动态页面,支持点赞、评论、标签筛选 |
|
||||
| [瞬间](https://halo.run/store/apps/app-SnwWD) | `PluginMoments` | `/moments` | 瞬间动态页面,支持点赞、评论、标签筛选、顶部封面 |
|
||||
| [图库](https://halo.run/store/apps/app-BmQJW) | `PluginPhotos` | `/photos` | 图片展示页面,支持分组、灯箱预览 |
|
||||
| [友情链接](https://halo.run/store/apps/app-hqbe) | `PluginLinks` | `/links` | 友链展示页面,支持分组展示 |
|
||||
| [友情链接](https://halo.run/store/apps/app-hfbQg) | `PluginLinks` | `/links` | 友链展示页面,支持随机排列、随机传送门、评论区开关 |
|
||||
| [朋友圈](https://github.com/halo-sigs/plugin-friends) | `plugin-friends` | `/friends` | RSS 订阅朋友圈页面 |
|
||||
| [装备管理](https://github.com/chengzhongxue/plugin-equipment) | `equipment` | `/equipments` | 装备展示页面,按分组展示,支持封面图 |
|
||||
| [豆瓣](https://github.com/chengzhongxue/plugin-douban) | `plugin-douban` | `/douban` | 豆瓣记录页面,支持类型/状态/标签筛选,默认电影 |
|
||||
| [豆瓣](https://github.com/chengzhongxue/plugin-douban) | `plugin-douban` | `/douban` | 豆瓣记录页面,支持类型/状态/标签筛选,默认音乐;需插件 **v1.2.6+**(SQLite 数据结构) |
|
||||
| [Steam 信息展示](https://github.com/Tim0x0/halo-plugin-steam) | `PluginSteam` | `/steam` | Steam 游戏库页面,含用户资料、统计数据、最近游玩、游戏库分页 |
|
||||
| [微信读书](https://github.com/yeora26/halo-weread-plugin) | `halo-weread-plugin` | 自定义页面 | 书架展示页面,见下方「自定义页面模板」 |
|
||||
| [记得](https://github.com/yyliucha/plugin-important-dates) | `plugin-important-dates` | `/important-dates` | 重要日期 / 牵挂的人 / 爱车双视图页面,见下方「扩展页面」 |
|
||||
| [文章组件](https://github.com/acanyo/plugin-content-widgets) | `plugin-content-widgets` | 文章内 | 提示框、标签页、时间线等内容组件,主题已映射 `--xhhao-com-*` 变量,自动跟随明暗模式 |
|
||||
| [API 扩展包](https://github.com/HowieHz/halo-plugin-extra-api) | `extra-api` | 全站 | 服务端字数统计、中英文混排排版、可选服务端代码高亮 |
|
||||
|
||||
> **注意**:插件需要单独安装,安装后主题会自动适配对应页面。若未安装某插件,对应页面不会出现。
|
||||
> **注意**:插件需要单独安装,安装后主题会自动适配对应页面。若未安装某插件,对应页面或功能自动隐藏/降级,不会报错。
|
||||
|
||||
## 自定义页面模板
|
||||
|
||||
在 Halo 后台「页面 → 新建 → 自定义模板」中选择使用:
|
||||
|
||||
| 模板名 | 模板文件 | 说明 |
|
||||
|--------|---------|------|
|
||||
| 留言板 | `page_messageboard.html` | 留言墙页面,标题与副标题可配置 |
|
||||
| 订阅 | `page_subscriptions.html` | 博友文章订阅动态,依赖链接管理插件的 RSS 订阅,支持分页/下滑加载与列表/网格布局 |
|
||||
| 微信读书 | `weread.html` | 微信读书书架展示,依赖微信读书插件,访客免登录查看 |
|
||||
|
||||
## 主要功能
|
||||
|
||||
### 首页
|
||||
|
||||
- Hero 首屏:明暗双背景图、大标题/副标题独立配色、一言(支持自动刷新与淡入淡出过渡)、下滑箭头平滑滚动
|
||||
- 欢迎弹窗:基于访客 IP 地理定位的欢迎提示,支持 5 种位置、自定义 API 与会话去重开关
|
||||
- 滚动吸附:首屏与内容区之间滚轮/触摸自动吸附
|
||||
- 文章卡片:可配置显示字数(依赖 API 扩展包)、阅读量、分类、标签、摘要行数
|
||||
|
||||
### 文章
|
||||
|
||||
- 目录(TOC):桌面端侧栏 + 移动端抽屉,滚动高亮、展开模式可选
|
||||
- 上下篇导航:悬停反馈与方向箭头动画
|
||||
- 相关推荐、分享按钮、赞赏、版权声明可独立开关
|
||||
- 字数与阅读时间:优先使用 API 扩展包的服务端统计,未安装时前端计算兜底
|
||||
|
||||
### 全局
|
||||
|
||||
- 点击特效:核心价值观 / 爱心 / 烟花 / 粒子等 9 种可选
|
||||
- 页脚全站统计:文章、分类、评论、访问、点赞、总字数,支持开关与统计项选择(默认开启)
|
||||
- 动效:呼吸动画、滚动渐入,可独立关闭
|
||||
- 备案信息:ICP 与公网安备号,公网安备自动带徽标
|
||||
- 鼠标光感跟随已移除(性能考量)
|
||||
|
||||
## 灯箱集成
|
||||
|
||||
@@ -53,36 +97,84 @@
|
||||
2. 进入 Halo 后台 → 主题管理 → 安装主题 → 上传 ZIP 包
|
||||
3. 安装完成后点击「启用」
|
||||
|
||||
> **升级后如果整站没了样式**:Halo 页面缓存或前置反向代理里可能还留着上一版本的 HTML,
|
||||
> 它引用的 CSS 文件名带内容哈希,升级后已被删除,请求会直接 500。
|
||||
> 先在 Halo 后台执行一次「清理缓存」(并刷新 CDN / Nginx 缓存)即可。
|
||||
> 主题从 v1.2.1 起会把历史版本的哈希资源一并发进安装包,旧 HTML 也不会请求失败。
|
||||
>
|
||||
> **升级主题或修改配色后,部分页面不生效**:如果安装了「页面静态缓存」插件,
|
||||
> 它只随文章变更自动刷新,主题层的变更需要手动点一次「刷新页面缓存」,
|
||||
> 详见 [FAQ:升级主题或修改配色后部分页面不生效](docs/faq.md#升级主题或修改配色后部分页面的新样式配色不生效)。
|
||||
|
||||
或从源码构建:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/warm-island/theme-warm-island.git
|
||||
cd theme-warm-island
|
||||
npm install
|
||||
npm run build
|
||||
git clone https://git.nxxy335.top/nxxy335/halo-theme-WarmIsland.git
|
||||
cd halo-theme-WarmIsland
|
||||
pnpm install
|
||||
pnpm build
|
||||
```
|
||||
|
||||
构建产物在 `templates/` 目录下,将其复制到 Halo 主题目录即可。
|
||||
构建产物在 `templates/` 目录下,同时会生成 `dist/` 内的安装包。
|
||||
|
||||
## 开发
|
||||
|
||||
```bash
|
||||
# 安装依赖
|
||||
npm install
|
||||
pnpm install
|
||||
|
||||
# 开发模式(监听文件变化)
|
||||
npm run dev
|
||||
# 开发模式(监听文件变化,自动构建到 templates/)
|
||||
pnpm dev
|
||||
|
||||
# 构建
|
||||
npm run build
|
||||
# 构建(输出到 templates/,并自动合并历史版本的静态资源)
|
||||
pnpm build
|
||||
|
||||
# 把本次构建的哈希资源快照进 compat/assets(发版前必做)
|
||||
pnpm snapshot
|
||||
|
||||
# 打包 dist/warm-island-<version>.zip
|
||||
pnpm package
|
||||
|
||||
# 点击特效脚本冒烟测试
|
||||
pnpm smoke
|
||||
```
|
||||
|
||||
发版流程:`pnpm build` → `pnpm snapshot` → `pnpm package`,并把 `compat/assets` 的新增文件一起提交。
|
||||
|
||||
### 目录结构
|
||||
|
||||
```
|
||||
├── src/
|
||||
│ ├── components/ # 组件(导航、页脚、Hero、弹窗、特效等)
|
||||
│ ├── layouts/ # Layout.astro(含页面布局契约渲染模式)
|
||||
│ ├── pages/ # 页面模板(构建后输出到 templates/)
|
||||
│ └── styles/ # SCSS 样式(正文样式在 _content.scss,全局生效)
|
||||
├── compat/
|
||||
│ └── assets/ # 历史版本哈希静态资源,构建时合并进 templates/assets
|
||||
├── scripts/ # 构建后置、资源快照、打包、冒烟测试
|
||||
├── templates/ # 构建产物,Halo 实际加载的模板
|
||||
├── settings.yaml # 后台设置项定义
|
||||
└── theme.yaml # 主题清单与自定义页面模板注册
|
||||
```
|
||||
|
||||
### 主题开发注意事项
|
||||
|
||||
- **静态资源文件名带内容哈希**:升级后旧文件被删除,被缓存的 HTML 仍会请求旧文件名并触发 500,
|
||||
所以每个版本的哈希文件都要留一份(见 `compat/assets` 与 `pnpm snapshot`)
|
||||
- **Thymeleaf 字符串字面量必须加单引号**:`th:text="'文本'"`,裸中文遇到逗号/空格/emoji 会导致页面 500
|
||||
- **`th:attr` 只用简单表达式**(取属性、Elvis 默认值、三元、拼接、等值比较),表达式对象方法调用会被受限求值器拒绝
|
||||
- **凡是与后台开关绑定的模板表达式都要给默认值**:`?: '默认值'`,配置未落库时属性会被整体移除,功能会静默失效
|
||||
- **正文样式必须写在全局样式表**(`src/styles/_content.scss`):Astro scoped 样式对 Thymeleaf 运行时注入的内容无效
|
||||
- **内联脚本统一加 `th:inline="none"`**:避免 Thymeleaf 解析脚本中的 `[[` / `[(` / `${}`
|
||||
- **新插入的动画元素要强制回流**(读一次 `offsetWidth`):否则初态与终态在同一帧被合并,transition 不触发
|
||||
- 修改主题外观无需单独维护 `layout.astro`:页面布局契约复用 `Layout.astro`,构建时自动生成
|
||||
|
||||
## 技术栈
|
||||
|
||||
- [Halo](https://halo.run) 2.24+
|
||||
- [Halo](https://halo.run) 2.26+
|
||||
- [Astro](https://astro.build) + [vite-plugin-halo-theme](https://github.com/halo-sigs/vite-plugin-halo-theme)
|
||||
- [Thymeleaf](https://www.thymeleaf.org) 模板引擎
|
||||
- [Vue 3](https://vuejs.org) Islands 交互组件
|
||||
- [Sass](https://sass-lang.com/) 样式
|
||||
|
||||
## 许可
|
||||
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
const http = require('http');
|
||||
|
||||
function apiCall(method, path, data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const options = {
|
||||
hostname: 'localhost',
|
||||
port: 8090,
|
||||
path: path,
|
||||
method: method,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
}
|
||||
};
|
||||
|
||||
const req = http.request(options, (res) => {
|
||||
let body = '';
|
||||
res.on('data', chunk => body += chunk);
|
||||
res.on('end', () => {
|
||||
try {
|
||||
const cookies = res.headers['set-cookie'];
|
||||
resolve({ status: res.statusCode, data: JSON.parse(body), cookies });
|
||||
} catch(e) {
|
||||
resolve({ status: res.statusCode, data: body, cookies: res.headers['set-cookie'] });
|
||||
}
|
||||
});
|
||||
});
|
||||
req.on('error', reject);
|
||||
if (data) req.write(JSON.stringify(data));
|
||||
req.end();
|
||||
});
|
||||
}
|
||||
|
||||
async function main() {
|
||||
// Login first
|
||||
const loginRes = await apiCall('POST', '/api/auth/signin', { username: 'admin', password: 'admin' });
|
||||
console.log('Login status:', loginRes.status);
|
||||
|
||||
// Get the session cookie
|
||||
const cookies = loginRes.cookies || [];
|
||||
const cookieStr = cookies.map(c => c.split(';')[0]).join('; ');
|
||||
console.log('Cookies:', cookieStr);
|
||||
|
||||
// Now get theme settings using the cookie
|
||||
const http2 = require('http');
|
||||
function apiWithCookie(method, path, data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const options = {
|
||||
hostname: 'localhost',
|
||||
port: 8090,
|
||||
path: path,
|
||||
method: method,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Cookie': cookieStr
|
||||
}
|
||||
};
|
||||
const req = http2.request(options, (res) => {
|
||||
let body = '';
|
||||
res.on('data', chunk => body += chunk);
|
||||
res.on('end', () => {
|
||||
try {
|
||||
resolve({ status: res.statusCode, data: JSON.parse(body) });
|
||||
} catch(e) {
|
||||
resolve({ status: res.statusCode, data: body });
|
||||
}
|
||||
});
|
||||
});
|
||||
req.on('error', reject);
|
||||
if (data) req.write(JSON.stringify(data));
|
||||
req.end();
|
||||
});
|
||||
}
|
||||
|
||||
// Get activated theme
|
||||
const themeRes = await apiWithCookie('GET', '/apis/api.console.halo.run/v1alpha1/themes?sort=creationTimestamp%2Cdesc');
|
||||
console.log('Themes status:', themeRes.status);
|
||||
|
||||
if (themeRes.data && themeRes.data.items) {
|
||||
const activeTheme = themeRes.data.items.find(t => t.spec && t.spec.activationTime);
|
||||
if (activeTheme) {
|
||||
console.log('Active theme:', activeTheme.metadata.name);
|
||||
|
||||
// Get theme settings
|
||||
const settingsRes = await apiWithCookie('GET', `/apis/api.console.halo.run/v1alpha1/themes/${activeTheme.metadata.name}/setting`);
|
||||
console.log('Settings status:', settingsRes.status);
|
||||
console.log('Settings:', JSON.stringify(settingsRes.data).substring(0, 500));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
.wi-douban[data-astro-cid-nevwzhq2]{padding-block:1rem}.wi-douban__header[data-astro-cid-nevwzhq2]{text-align:center;margin-bottom:var(--space-3xl)}.wi-douban__title[data-astro-cid-nevwzhq2]{font-size:var(--text-4xl);margin-bottom:var(--space-sm)}.wi-page-accent[data-astro-cid-nevwzhq2]{display:block;width:48px;height:3px;margin:var(--space-sm) auto 0;border-radius:9999px;background:var(--accent)}.wi-douban__filters[data-astro-cid-nevwzhq2]{display:flex;flex-direction:column;gap:var(--space-md);margin-bottom:var(--space-2xl)}.wi-douban__filter-group[data-astro-cid-nevwzhq2]{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}.wi-douban__filter-tag[data-astro-cid-nevwzhq2]{display:inline-block;padding:6px 16px;border-radius:20px;font-size:var(--text-sm);color:var(--ink-2);background:var(--bg-raised);border:1px solid var(--rule);text-decoration:none;transition:color var(--duration-fast) var(--ease-out-quart),background var(--duration-fast) var(--ease-out-quart),border-color var(--duration-fast) var(--ease-out-quart)}.wi-douban__filter-tag--sm[data-astro-cid-nevwzhq2]{padding:4px 12px;font-size:var(--text-xs)}.wi-douban__filter-tag[data-astro-cid-nevwzhq2]:hover{color:var(--accent);border-color:var(--accent)}.wi-douban__filter-tag--active[data-astro-cid-nevwzhq2]{color:#fff;background:var(--accent);border-color:var(--accent)}.wi-douban__grid[data-astro-cid-nevwzhq2]{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:var(--space-lg)}.wi-douban__card[data-astro-cid-nevwzhq2]{position:relative;display:flex;gap:var(--space-md);padding:var(--space-lg);background:var(--bg-raised);border:1px solid var(--rule);border-radius:16px;transition:transform var(--duration-normal) var(--ease-out-expo),box-shadow var(--duration-normal) var(--ease-out-expo),border-color var(--duration-normal) var(--ease-out-expo)}.wi-douban__card[data-astro-cid-nevwzhq2]:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg);border-color:var(--accent)}.wi-douban__card-link[data-astro-cid-nevwzhq2]{position:absolute;inset:0;z-index:1}.wi-douban__poster[data-astro-cid-nevwzhq2]{flex-shrink:0;width:80px;height:112px;border-radius:8px;overflow:hidden;background:var(--bg)}.wi-douban__card[data-astro-cid-nevwzhq2][data-type=music] .wi-douban__poster[data-astro-cid-nevwzhq2]{width:80px;height:80px;border-radius:8px}.wi-douban__poster-img[data-astro-cid-nevwzhq2]{width:100%;height:100%;object-fit:cover}.wi-douban__poster--placeholder[data-astro-cid-nevwzhq2]{display:flex;align-items:center;justify-content:center;background:var(--accent-bg);color:var(--accent);font-size:var(--text-2xl);font-weight:700}.wi-douban__body[data-astro-cid-nevwzhq2]{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}.wi-douban__name[data-astro-cid-nevwzhq2]{font-size:var(--text-md);font-weight:600;color:var(--ink);line-height:var(--leading-tight);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-douban__subtitle[data-astro-cid-nevwzhq2]{font-size:var(--text-xs);color:var(--ink-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-douban__meta[data-astro-cid-nevwzhq2]{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:var(--text-xs);color:var(--ink-3)}.wi-douban__score[data-astro-cid-nevwzhq2]{display:inline-flex;align-items:center;gap:2px;color:#f59e0b;font-weight:600}.wi-douban__star[data-astro-cid-nevwzhq2]{color:#f59e0b}.wi-douban__my-score[data-astro-cid-nevwzhq2]{color:var(--accent);font-weight:500}.wi-douban__tags[data-astro-cid-nevwzhq2]{display:flex;flex-wrap:wrap;gap:4px}.wi-douban__tag[data-astro-cid-nevwzhq2]{font-size:11px;color:var(--ink-3);padding:1px 6px;border-radius:4px;background:var(--bg);border:1px solid var(--rule)}.wi-douban__remark[data-astro-cid-nevwzhq2]{font-size:var(--text-sm);color:var(--ink-2);line-height:var(--leading-relaxed);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-top:4px;position:relative;z-index:2}@media(max-width:640px){.wi-douban__grid[data-astro-cid-nevwzhq2]{grid-template-columns:1fr}.wi-douban__card[data-astro-cid-nevwzhq2]{padding:var(--space-md)}.wi-douban__poster[data-astro-cid-nevwzhq2]{width:64px;height:90px}.wi-douban__card[data-astro-cid-nevwzhq2][data-type=music] .wi-douban__poster[data-astro-cid-nevwzhq2]{width:64px;height:64px}}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>
|
||||
<json>
|
||||
<![CDATA[
|
||||
{
|
||||
"fontFamily": "lg",
|
||||
"majorVersion": 2,
|
||||
"minorVersion": 0,
|
||||
"fontURL": "",
|
||||
"copyright": "",
|
||||
"license": "",
|
||||
"licenseURL": "",
|
||||
"description": "Font generated by IcoMoon.",
|
||||
"version": "Version 2.0",
|
||||
"fontId": "lg",
|
||||
"psName": "lg",
|
||||
"subFamily": "Regular",
|
||||
"fullName": "lg"
|
||||
}
|
||||
]]>
|
||||
</json>
|
||||
</metadata>
|
||||
<defs>
|
||||
<font id="lg" horiz-adv-x="1024">
|
||||
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
||||
<missing-glyph horiz-adv-x="1024" />
|
||||
<glyph unicode=" " horiz-adv-x="512" d="" />
|
||||
<glyph unicode="" glyph-name="pause_circle_outline" data-tags="pause_circle_outline" d="M554 256.667v340h86v-340h-86zM512 84.667q140 0 241 101t101 241-101 241-241 101-241-101-101-241 101-241 241-101zM512 852.667q176 0 301-125t125-301-125-301-301-125-301 125-125 301 125 301 301 125zM384 256.667v340h86v-340h-86z" />
|
||||
<glyph unicode="" glyph-name="play_circle_outline" data-tags="play_circle_outline" d="M512 84.667q140 0 241 101t101 241-101 241-241 101-241-101-101-241 101-241 241-101zM512 852.667q176 0 301-125t125-301-125-301-301-125-301 125-125 301 125 301 301 125zM426 234.667v384l256-192z" />
|
||||
<glyph unicode="" glyph-name="stack-2" data-tags="stack-2" d="M384 853.334h426.667q53 0 90.5-37.5t37.5-90.5v-426.667q0-53-37.5-90.5t-90.5-37.5h-426.667q-53 0-90.5 37.5t-37.5 90.5v426.667q0 53 37.5 90.5t90.5 37.5zM170.667 675.334v-547.333q0-17.667 12.5-30.167t30.167-12.5h547.333q-13.333-37.667-46.333-61.5t-74.333-23.833h-426.667q-53 0-90.5 37.5t-37.5 90.5v426.667q0 41.333 23.833 74.333t61.5 46.333zM810.667 768h-426.667q-17.667 0-30.167-12.5t-12.5-30.167v-426.667q0-17.667 12.5-30.167t30.167-12.5h426.667q17.667 0 30.167 12.5t12.5 30.167v426.667q0 17.667-12.5 30.167t-30.167 12.5z" />
|
||||
<glyph unicode="" glyph-name="clear" data-tags="clear" d="M810 664.667l-238-238 238-238-60-60-238 238-238-238-60 60 238 238-238 238 60 60 238-238 238 238z" />
|
||||
<glyph unicode="" glyph-name="arrow-left" data-tags="arrow-left" d="M426.667 768q17.667 0 30.167-12.5t12.5-30.167q0-18-12.667-30.333l-225.667-225.667h665q17.667 0 30.167-12.5t12.5-30.167-12.5-30.167-30.167-12.5h-665l225.667-225.667q12.667-12.333 12.667-30.333 0-17.667-12.5-30.167t-30.167-12.5q-18 0-30.333 12.333l-298.667 298.667q-12.333 13-12.333 30.333t12.333 30.333l298.667 298.667q12.667 12.333 30.333 12.333z" />
|
||||
<glyph unicode="" glyph-name="arrow-right" data-tags="arrow-right" d="M597.333 768q18 0 30.333-12.333l298.667-298.667q12.333-12.333 12.333-30.333t-12.333-30.333l-298.667-298.667q-12.333-12.333-30.333-12.333-18.333 0-30.5 12.167t-12.167 30.5q0 18 12.333 30.333l226 225.667h-665q-17.667 0-30.167 12.5t-12.5 30.167 12.5 30.167 30.167 12.5h665l-226 225.667q-12.333 12.333-12.333 30.333 0 18.333 12.167 30.5t30.5 12.167z" />
|
||||
<glyph unicode="" glyph-name="vertical_align_bottom" data-tags="vertical_align_bottom" d="M170 128.667h684v-86h-684v86zM682 384.667l-170-172-170 172h128v426h84v-426h128z" />
|
||||
<glyph unicode="" glyph-name="apps" data-tags="apps" d="M682 84.667v172h172v-172h-172zM682 340.667v172h172v-172h-172zM426 596.667v172h172v-172h-172zM682 768.667h172v-172h-172v172zM426 340.667v172h172v-172h-172zM170 340.667v172h172v-172h-172zM170 84.667v172h172v-172h-172zM426 84.667v172h172v-172h-172zM170 596.667v172h172v-172h-172z" />
|
||||
<glyph unicode="" glyph-name="fullscreen" data-tags="fullscreen" d="M598 724.667h212v-212h-84v128h-128v84zM726 212.667v128h84v-212h-212v84h128zM214 512.667v212h212v-84h-128v-128h-84zM298 340.667v-128h128v-84h-212v212h84z" />
|
||||
<glyph unicode="" glyph-name="fullscreen_exit" data-tags="fullscreen_exit" d="M682 596.667h128v-84h-212v212h84v-128zM598 128.667v212h212v-84h-128v-128h-84zM342 596.667v128h84v-212h-212v84h128zM214 256.667v84h212v-212h-84v128h-128z" />
|
||||
<glyph unicode="" glyph-name="zoom_in" data-tags="zoom_in" d="M512 512.667h-86v-86h-42v86h-86v42h86v86h42v-86h86v-42zM406 340.667q80 0 136 56t56 136-56 136-136 56-136-56-56-136 56-136 136-56zM662 340.667l212-212-64-64-212 212v34l-12 12q-76-66-180-66-116 0-197 80t-81 196 81 197 197 81 196-81 80-197q0-104-66-180l12-12h34z" />
|
||||
<glyph unicode="" glyph-name="zoom_out" data-tags="zoom_out" d="M298 554.667h214v-42h-214v42zM406 340.667q80 0 136 56t56 136-56 136-136 56-136-56-56-136 56-136 136-56zM662 340.667l212-212-64-64-212 212v34l-12 12q-76-66-180-66-116 0-197 80t-81 196 81 197 197 81 196-81 80-197q0-104-66-180l12-12h34z" />
|
||||
<glyph unicode="" glyph-name="share" data-tags="share" d="M768 252.667c68 0 124-56 124-124s-56-126-124-126-124 58-124 126c0 10 0 20 2 28l-302 176c-24-22-54-34-88-34-70 0-128 58-128 128s58 128 128 128c34 0 64-12 88-34l300 174c-2 10-4 20-4 30 0 70 58 128 128 128s128-58 128-128-58-128-128-128c-34 0-64 14-88 36l-300-176c2-10 4-20 4-30s-2-20-4-30l304-176c22 20 52 32 84 32z" />
|
||||
<glyph unicode="" glyph-name="rotate_left" data-tags="rotate_left" d="M554 764.667q126-16 213-112t87-226-87-226-213-112v86q92 16 153 87t61 165-61 165-153 87v-166l-194 190 194 194v-132zM302 156.667l62 62q46-34 106-44v-86q-96 12-168 68zM260 384.667q10-58 42-106l-60-60q-56 74-68 166h86zM304 574.667q-36-52-44-106h-86q12 90 70 166z" />
|
||||
<glyph unicode="" glyph-name="rotate_right" data-tags="rotate_right" d="M720 278.667q34 46 44 106h86q-12-92-68-166zM554 174.667q60 10 106 44l62-62q-72-56-168-68v86zM850 468.667h-86q-10 60-44 106l62 60q58-72 68-166zM664 702.667l-194-190v166q-92-16-153-87t-61-165 61-165 153-87v-86q-126 16-213 112t-87 226 87 226 213 112v132z" />
|
||||
<glyph unicode="" glyph-name="swap_horiz" data-tags="swap_horiz" d="M896 554.667l-170-170v128h-300v84h300v128zM298 468.667v-128h300v-84h-300v-128l-170 170z" />
|
||||
<glyph unicode="" glyph-name="swap_vert" data-tags="swap_vert" d="M384 810.667l170-170h-128v-300h-84v300h-128zM682 212.667h128l-170-170-170 170h128v300h84v-300z" />
|
||||
<glyph unicode="" glyph-name="facebook-with-circle" data-tags="facebook-with-circle" d="M512 952.32c-271.462 0-491.52-220.058-491.52-491.52s220.058-491.52 491.52-491.52 491.52 220.058 491.52 491.52-220.058 491.52-491.52 491.52zM628.429 612.659h-73.882c-8.755 0-18.483-11.52-18.483-26.829v-53.35h92.416l-13.978-76.083h-78.438v-228.403h-87.194v228.403h-79.104v76.083h79.104v44.749c0 64.205 44.544 116.378 105.677 116.378h73.882v-80.947z" />
|
||||
<glyph unicode="" glyph-name="google-with-circle" data-tags="google+-with-circle" d="M512 952.32c-271.462 0-491.52-220.058-491.52-491.52s220.058-491.52 491.52-491.52 491.52 220.058 491.52 491.52-220.058 491.52-491.52 491.52zM483.686 249.805c-30.874-15.002-64.102-16.589-76.954-16.589-2.458 0-3.84 0-3.84 0s-1.178 0-2.765 0c-20.070 0-119.962 4.608-119.962 95.59 0 89.395 108.8 96.41 142.131 96.41h0.87c-19.251 25.702-15.258 51.61-15.258 51.61-1.69-0.102-4.147-0.205-7.168-0.205-12.544 0-36.762 1.997-57.549 15.411-25.498 16.384-38.4 44.288-38.4 82.893 0 109.107 119.142 113.51 120.32 113.613h118.989v-2.611c0-13.312-23.91-15.923-40.192-18.125-5.53-0.819-16.64-1.894-19.763-3.482 30.157-16.128 35.021-41.421 35.021-79.104 0-42.906-16.794-65.587-34.611-81.51-11.059-9.882-19.712-17.613-19.712-28.006 0-10.189 11.878-20.582 25.702-32.717 22.579-19.917 53.555-47.002 53.555-92.723 0-47.258-20.326-81.050-60.416-100.454zM742.4 460.8h-76.8v-76.8h-51.2v76.8h-76.8v51.2h76.8v76.8h51.2v-76.8h76.8v-51.2zM421.018 401.92c-2.662 0-5.325-0.102-8.038-0.307-22.733-1.69-43.725-10.189-58.88-24.013-15.053-13.619-22.733-30.822-21.658-48.179 2.304-36.403 41.37-57.702 88.832-54.323 46.694 3.379 77.824 30.31 75.571 66.714-2.15 34.202-31.898 60.109-75.827 60.109zM465.766 599.808c-12.39 43.52-32.358 56.422-63.386 56.422-3.328 0-6.707-0.512-9.933-1.382-13.466-3.84-24.166-15.053-30.106-31.744-6.093-16.896-6.451-34.509-1.229-54.579 9.472-35.891 34.97-61.901 60.672-61.901 3.379 0 6.758 0.41 9.933 1.382 28.109 7.885 45.722 50.79 34.048 91.802z" />
|
||||
<glyph unicode="" glyph-name="pinterest-with-circle" data-tags="pinterest-with-circle" d="M512 952.32c-271.462 0-491.52-220.058-491.52-491.52s220.058-491.52 491.52-491.52 491.52 220.058 491.52 491.52-220.058 491.52-491.52 491.52zM545.638 344.32c-31.539 2.406-44.749 18.022-69.427 32.973-13.568-71.219-30.157-139.52-79.309-175.206-15.206 107.725 22.221 188.518 39.629 274.381-29.645 49.92 3.533 150.323 66.099 125.645 76.954-30.515-66.662-185.6 29.747-205.005 100.659-20.173 141.773 174.694 79.36 237.978-90.214 91.494-262.502 2.099-241.306-128.87 5.12-32 38.246-41.728 13.21-85.914-57.702 12.8-74.957 58.317-72.704 118.989 3.533 99.328 89.242 168.909 175.155 178.483 108.698 12.083 210.688-39.885 224.819-142.182 15.821-115.405-49.101-240.282-165.274-231.27z" />
|
||||
<glyph unicode="" glyph-name="twitter-with-circle" data-tags="twitter-with-circle" d="M512 952.32c-271.462 0-491.52-220.058-491.52-491.52s220.058-491.52 491.52-491.52 491.52 220.058 491.52 491.52-220.058 491.52-491.52 491.52zM711.936 549.683c0.205-4.198 0.256-8.397 0.256-12.493 0-128-97.331-275.507-275.405-275.507-54.682 0-105.574 15.974-148.378 43.52 7.526-0.922 15.258-1.28 23.091-1.28 45.363 0 87.091 15.411 120.218 41.421-42.342 0.819-78.080 28.774-90.419 67.174 5.888-1.075 11.93-1.69 18.176-1.69 8.806 0 17.408 1.178 25.498 3.379-44.288 8.909-77.67 48.026-77.67 94.925v1.178c13.056-7.219 28.006-11.622 43.878-12.134-26.010 17.408-43.059 47.002-43.059 80.64 0 17.715 4.762 34.406 13.107 48.691 47.77-58.573 119.040-97.075 199.526-101.222-1.69 7.117-2.509 14.49-2.509 22.118 0 53.402 43.315 96.819 96.819 96.819 27.802 0 52.992-11.776 70.656-30.618 22.067 4.403 42.752 12.39 61.44 23.501-7.219-22.579-22.528-41.574-42.547-53.606 19.61 2.406 38.246 7.578 55.603 15.309-12.954-19.405-29.389-36.506-48.282-50.125z" />
|
||||
<glyph unicode="" glyph-name="message-circle" data-tags="message-circle" d="M938.667 448.128v21.205c0 0.725-0.043 1.621-0.085 2.475-5.803 99.755-47.488 190.336-112.725 258.176-68.352 71.125-162.731 117.419-268.843 123.264-0.683 0.043-1.536 0.085-2.347 0.085h-20.864c-59.947 0.683-122.965-13.227-181.931-43.008-52.181-26.496-97.749-63.488-133.931-108.16-56.405-69.717-89.899-158.080-89.941-253.696-0.597-54.4 10.795-111.36 35.157-165.419l-75.605-226.859c-2.816-8.363-3.072-17.835 0-26.965 7.467-22.357 31.616-34.432 53.973-26.965l226.731 75.563c49.493-22.485 105.984-35.243 165.376-35.115 58.539 0.384 115.797 13.141 168.149 36.949 81.579 37.163 151.040 101.248 193.749 186.667 27.477 53.291 43.307 115.84 43.136 181.803zM853.333 447.872c0.128-52.267-12.459-101.333-33.664-142.464-34.176-68.352-88.832-118.827-153.259-148.139-41.387-18.859-86.827-28.971-133.376-29.269-52.096-0.128-101.163 12.459-142.293 33.664-10.624 5.504-22.528 6.059-33.067 2.56l-162.261-54.101 54.101 162.261c3.755 11.221 2.56 22.912-2.389 32.725-23.552 46.677-34.304 96.171-33.792 142.421 0.043 76.331 26.411 145.92 70.955 200.917 28.629 35.371 64.768 64.725 106.24 85.76 46.592 23.552 96.085 34.304 142.336 33.792h19.456c83.712-4.565 158.037-41.003 212.011-97.152 51.285-53.376 84.139-124.416 89.003-202.795z" />
|
||||
<glyph unicode="" glyph-name="maximize-2" data-tags="maximize-2" d="M793.003 768l-225.835-225.835c-16.683-16.683-16.683-43.691 0-60.331s43.691-16.683 60.331 0l225.835 225.835v-153.003c0-23.552 19.115-42.667 42.667-42.667s42.667 19.115 42.667 42.667v256c0 5.803-1.152 11.307-3.243 16.341s-5.163 9.728-9.216 13.781c-0.043 0.043-0.043 0.043-0.085 0.085-3.925 3.925-8.619 7.083-13.781 9.216-5.035 2.091-10.539 3.243-16.341 3.243h-256c-23.552 0-42.667-19.115-42.667-42.667s19.115-42.667 42.667-42.667zM230.997 85.334l225.835 225.835c16.683 16.683 16.683 43.691 0 60.331s-43.691 16.683-60.331 0l-225.835-225.835v153.003c0 23.552-19.115 42.667-42.667 42.667s-42.667-19.115-42.667-42.667v-256c0-23.552 19.115-42.667 42.667-42.667h256c23.552 0 42.667 19.115 42.667 42.667s-19.115 42.667-42.667 42.667z" />
|
||||
<glyph unicode="" glyph-name="minimize-2" data-tags="minimize-2" d="M700.331 554.667l225.835 225.835c16.683 16.683 16.683 43.691 0 60.331s-43.691 16.683-60.331 0l-225.835-225.835v153.003c0 23.552-19.115 42.667-42.667 42.667s-42.667-19.115-42.667-42.667v-256c0-5.803 1.152-11.307 3.243-16.341s5.163-9.728 9.216-13.781c0.043-0.043 0.043-0.043 0.085-0.085 3.925-3.925 8.619-7.083 13.781-9.216 5.035-2.091 10.539-3.243 16.341-3.243h256c23.552 0 42.667 19.115 42.667 42.667s-19.115 42.667-42.667 42.667zM158.165 12.502l225.835 225.835v-153.003c0-23.552 19.115-42.667 42.667-42.667s42.667 19.115 42.667 42.667v256c0 5.803-1.152 11.307-3.243 16.341s-5.163 9.728-9.216 13.781c-0.043 0.043-0.043 0.043-0.085 0.085-4.096 4.053-8.789 7.125-13.781 9.216-5.035 2.091-10.539 3.243-16.341 3.243h-256c-23.552 0-42.667-19.115-42.667-42.667s19.115-42.667 42.667-42.667h153.003l-225.835-225.835c-16.683-16.683-16.683-43.691 0-60.331s43.691-16.683 60.331 0z" />
|
||||
</font></defs></svg>
|
||||
|
After Width: | Height: | Size: 12 KiB |
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-52
@@ -1,52 +0,0 @@
|
||||
{
|
||||
"hash": "0ed7ed0d",
|
||||
"configHash": "c707d7b6",
|
||||
"lockfileHash": "4f412479",
|
||||
"browserHash": "3aefc297",
|
||||
"optimized": {
|
||||
"vue": {
|
||||
"src": "../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
|
||||
"file": "vue.js",
|
||||
"fileHash": "9027419d",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vitepress > @vue/devtools-api": {
|
||||
"src": "../../../node_modules/@vue/devtools-api/dist/index.js",
|
||||
"file": "vitepress___@vue_devtools-api.js",
|
||||
"fileHash": "3cd67bf3",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vitepress > @vueuse/core": {
|
||||
"src": "../../../node_modules/@vueuse/core/index.mjs",
|
||||
"file": "vitepress___@vueuse_core.js",
|
||||
"fileHash": "cda81787",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vitepress > @vueuse/integrations/useFocusTrap": {
|
||||
"src": "../../../node_modules/@vueuse/integrations/useFocusTrap.mjs",
|
||||
"file": "vitepress___@vueuse_integrations_useFocusTrap.js",
|
||||
"fileHash": "7b4ec920",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vitepress > mark.js/src/vanilla.js": {
|
||||
"src": "../../../node_modules/mark.js/src/vanilla.js",
|
||||
"file": "vitepress___mark__js_src_vanilla__js.js",
|
||||
"fileHash": "3efbcd2b",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vitepress > minisearch": {
|
||||
"src": "../../../node_modules/minisearch/dist/es/index.js",
|
||||
"file": "vitepress___minisearch.js",
|
||||
"fileHash": "8ca06377",
|
||||
"needsInterop": false
|
||||
}
|
||||
},
|
||||
"chunks": {
|
||||
"chunk-4USRTV5H": {
|
||||
"file": "chunk-4USRTV5H.js"
|
||||
},
|
||||
"chunk-XY26LBYQ": {
|
||||
"file": "chunk-XY26LBYQ.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
-9719
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
-13035
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
-3
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -1,583 +0,0 @@
|
||||
import {
|
||||
DefaultMagicKeysAliasMap,
|
||||
StorageSerializers,
|
||||
TransitionPresets,
|
||||
assert,
|
||||
breakpointsAntDesign,
|
||||
breakpointsBootstrapV5,
|
||||
breakpointsElement,
|
||||
breakpointsMasterCss,
|
||||
breakpointsPrimeFlex,
|
||||
breakpointsQuasar,
|
||||
breakpointsSematic,
|
||||
breakpointsTailwind,
|
||||
breakpointsVuetify,
|
||||
breakpointsVuetifyV2,
|
||||
breakpointsVuetifyV3,
|
||||
bypassFilter,
|
||||
camelize,
|
||||
clamp,
|
||||
cloneFnJSON,
|
||||
computedAsync,
|
||||
computedEager,
|
||||
computedInject,
|
||||
computedWithControl,
|
||||
containsProp,
|
||||
controlledRef,
|
||||
createEventHook,
|
||||
createFetch,
|
||||
createFilterWrapper,
|
||||
createGlobalState,
|
||||
createInjectionState,
|
||||
createRef,
|
||||
createReusableTemplate,
|
||||
createSharedComposable,
|
||||
createSingletonPromise,
|
||||
createTemplatePromise,
|
||||
createUnrefFn,
|
||||
customStorageEventName,
|
||||
debounceFilter,
|
||||
defaultDocument,
|
||||
defaultLocation,
|
||||
defaultNavigator,
|
||||
defaultWindow,
|
||||
executeTransition,
|
||||
extendRef,
|
||||
formatDate,
|
||||
formatTimeAgo,
|
||||
get,
|
||||
getLifeCycleTarget,
|
||||
getSSRHandler,
|
||||
hasOwn,
|
||||
hyphenate,
|
||||
identity,
|
||||
increaseWithUnit,
|
||||
injectLocal,
|
||||
invoke,
|
||||
isClient,
|
||||
isDef,
|
||||
isDefined,
|
||||
isIOS,
|
||||
isObject,
|
||||
isWorker,
|
||||
makeDestructurable,
|
||||
mapGamepadToXbox360Controller,
|
||||
noop,
|
||||
normalizeDate,
|
||||
notNullish,
|
||||
now,
|
||||
objectEntries,
|
||||
objectOmit,
|
||||
objectPick,
|
||||
onClickOutside,
|
||||
onElementRemoval,
|
||||
onKeyDown,
|
||||
onKeyPressed,
|
||||
onKeyStroke,
|
||||
onKeyUp,
|
||||
onLongPress,
|
||||
onStartTyping,
|
||||
pausableFilter,
|
||||
promiseTimeout,
|
||||
provideLocal,
|
||||
provideSSRWidth,
|
||||
pxValue,
|
||||
rand,
|
||||
reactify,
|
||||
reactifyObject,
|
||||
reactiveComputed,
|
||||
reactiveOmit,
|
||||
reactivePick,
|
||||
refAutoReset,
|
||||
refDebounced,
|
||||
refDefault,
|
||||
refThrottled,
|
||||
refWithControl,
|
||||
resolveRef,
|
||||
resolveUnref,
|
||||
set,
|
||||
setSSRHandler,
|
||||
syncRef,
|
||||
syncRefs,
|
||||
templateRef,
|
||||
throttleFilter,
|
||||
timestamp,
|
||||
toArray,
|
||||
toReactive,
|
||||
toRef,
|
||||
toRefs,
|
||||
toValue,
|
||||
tryOnBeforeMount,
|
||||
tryOnBeforeUnmount,
|
||||
tryOnMounted,
|
||||
tryOnScopeDispose,
|
||||
tryOnUnmounted,
|
||||
unrefElement,
|
||||
until,
|
||||
useActiveElement,
|
||||
useAnimate,
|
||||
useArrayDifference,
|
||||
useArrayEvery,
|
||||
useArrayFilter,
|
||||
useArrayFind,
|
||||
useArrayFindIndex,
|
||||
useArrayFindLast,
|
||||
useArrayIncludes,
|
||||
useArrayJoin,
|
||||
useArrayMap,
|
||||
useArrayReduce,
|
||||
useArraySome,
|
||||
useArrayUnique,
|
||||
useAsyncQueue,
|
||||
useAsyncState,
|
||||
useBase64,
|
||||
useBattery,
|
||||
useBluetooth,
|
||||
useBreakpoints,
|
||||
useBroadcastChannel,
|
||||
useBrowserLocation,
|
||||
useCached,
|
||||
useClipboard,
|
||||
useClipboardItems,
|
||||
useCloned,
|
||||
useColorMode,
|
||||
useConfirmDialog,
|
||||
useCountdown,
|
||||
useCounter,
|
||||
useCssVar,
|
||||
useCurrentElement,
|
||||
useCycleList,
|
||||
useDark,
|
||||
useDateFormat,
|
||||
useDebounceFn,
|
||||
useDebouncedRefHistory,
|
||||
useDeviceMotion,
|
||||
useDeviceOrientation,
|
||||
useDevicePixelRatio,
|
||||
useDevicesList,
|
||||
useDisplayMedia,
|
||||
useDocumentVisibility,
|
||||
useDraggable,
|
||||
useDropZone,
|
||||
useElementBounding,
|
||||
useElementByPoint,
|
||||
useElementHover,
|
||||
useElementSize,
|
||||
useElementVisibility,
|
||||
useEventBus,
|
||||
useEventListener,
|
||||
useEventSource,
|
||||
useEyeDropper,
|
||||
useFavicon,
|
||||
useFetch,
|
||||
useFileDialog,
|
||||
useFileSystemAccess,
|
||||
useFocus,
|
||||
useFocusWithin,
|
||||
useFps,
|
||||
useFullscreen,
|
||||
useGamepad,
|
||||
useGeolocation,
|
||||
useIdle,
|
||||
useImage,
|
||||
useInfiniteScroll,
|
||||
useIntersectionObserver,
|
||||
useInterval,
|
||||
useIntervalFn,
|
||||
useKeyModifier,
|
||||
useLastChanged,
|
||||
useLocalStorage,
|
||||
useMagicKeys,
|
||||
useManualRefHistory,
|
||||
useMediaControls,
|
||||
useMediaQuery,
|
||||
useMemoize,
|
||||
useMemory,
|
||||
useMounted,
|
||||
useMouse,
|
||||
useMouseInElement,
|
||||
useMousePressed,
|
||||
useMutationObserver,
|
||||
useNavigatorLanguage,
|
||||
useNetwork,
|
||||
useNow,
|
||||
useObjectUrl,
|
||||
useOffsetPagination,
|
||||
useOnline,
|
||||
usePageLeave,
|
||||
useParallax,
|
||||
useParentElement,
|
||||
usePerformanceObserver,
|
||||
usePermission,
|
||||
usePointer,
|
||||
usePointerLock,
|
||||
usePointerSwipe,
|
||||
usePreferredColorScheme,
|
||||
usePreferredContrast,
|
||||
usePreferredDark,
|
||||
usePreferredLanguages,
|
||||
usePreferredReducedMotion,
|
||||
usePreferredReducedTransparency,
|
||||
usePrevious,
|
||||
useRafFn,
|
||||
useRefHistory,
|
||||
useResizeObserver,
|
||||
useSSRWidth,
|
||||
useScreenOrientation,
|
||||
useScreenSafeArea,
|
||||
useScriptTag,
|
||||
useScroll,
|
||||
useScrollLock,
|
||||
useSessionStorage,
|
||||
useShare,
|
||||
useSorted,
|
||||
useSpeechRecognition,
|
||||
useSpeechSynthesis,
|
||||
useStepper,
|
||||
useStorage,
|
||||
useStorageAsync,
|
||||
useStyleTag,
|
||||
useSupported,
|
||||
useSwipe,
|
||||
useTemplateRefsList,
|
||||
useTextDirection,
|
||||
useTextSelection,
|
||||
useTextareaAutosize,
|
||||
useThrottleFn,
|
||||
useThrottledRefHistory,
|
||||
useTimeAgo,
|
||||
useTimeout,
|
||||
useTimeoutFn,
|
||||
useTimeoutPoll,
|
||||
useTimestamp,
|
||||
useTitle,
|
||||
useToNumber,
|
||||
useToString,
|
||||
useToggle,
|
||||
useTransition,
|
||||
useUrlSearchParams,
|
||||
useUserMedia,
|
||||
useVModel,
|
||||
useVModels,
|
||||
useVibrate,
|
||||
useVirtualList,
|
||||
useWakeLock,
|
||||
useWebNotification,
|
||||
useWebSocket,
|
||||
useWebWorker,
|
||||
useWebWorkerFn,
|
||||
useWindowFocus,
|
||||
useWindowScroll,
|
||||
useWindowSize,
|
||||
watchArray,
|
||||
watchAtMost,
|
||||
watchDebounced,
|
||||
watchDeep,
|
||||
watchIgnorable,
|
||||
watchImmediate,
|
||||
watchOnce,
|
||||
watchPausable,
|
||||
watchThrottled,
|
||||
watchTriggerable,
|
||||
watchWithFilter,
|
||||
whenever
|
||||
} from "./chunk-4USRTV5H.js";
|
||||
import "./chunk-XY26LBYQ.js";
|
||||
export {
|
||||
DefaultMagicKeysAliasMap,
|
||||
StorageSerializers,
|
||||
TransitionPresets,
|
||||
assert,
|
||||
computedAsync as asyncComputed,
|
||||
refAutoReset as autoResetRef,
|
||||
breakpointsAntDesign,
|
||||
breakpointsBootstrapV5,
|
||||
breakpointsElement,
|
||||
breakpointsMasterCss,
|
||||
breakpointsPrimeFlex,
|
||||
breakpointsQuasar,
|
||||
breakpointsSematic,
|
||||
breakpointsTailwind,
|
||||
breakpointsVuetify,
|
||||
breakpointsVuetifyV2,
|
||||
breakpointsVuetifyV3,
|
||||
bypassFilter,
|
||||
camelize,
|
||||
clamp,
|
||||
cloneFnJSON,
|
||||
computedAsync,
|
||||
computedEager,
|
||||
computedInject,
|
||||
computedWithControl,
|
||||
containsProp,
|
||||
computedWithControl as controlledComputed,
|
||||
controlledRef,
|
||||
createEventHook,
|
||||
createFetch,
|
||||
createFilterWrapper,
|
||||
createGlobalState,
|
||||
createInjectionState,
|
||||
reactify as createReactiveFn,
|
||||
createRef,
|
||||
createReusableTemplate,
|
||||
createSharedComposable,
|
||||
createSingletonPromise,
|
||||
createTemplatePromise,
|
||||
createUnrefFn,
|
||||
customStorageEventName,
|
||||
debounceFilter,
|
||||
refDebounced as debouncedRef,
|
||||
watchDebounced as debouncedWatch,
|
||||
defaultDocument,
|
||||
defaultLocation,
|
||||
defaultNavigator,
|
||||
defaultWindow,
|
||||
computedEager as eagerComputed,
|
||||
executeTransition,
|
||||
extendRef,
|
||||
formatDate,
|
||||
formatTimeAgo,
|
||||
get,
|
||||
getLifeCycleTarget,
|
||||
getSSRHandler,
|
||||
hasOwn,
|
||||
hyphenate,
|
||||
identity,
|
||||
watchIgnorable as ignorableWatch,
|
||||
increaseWithUnit,
|
||||
injectLocal,
|
||||
invoke,
|
||||
isClient,
|
||||
isDef,
|
||||
isDefined,
|
||||
isIOS,
|
||||
isObject,
|
||||
isWorker,
|
||||
makeDestructurable,
|
||||
mapGamepadToXbox360Controller,
|
||||
noop,
|
||||
normalizeDate,
|
||||
notNullish,
|
||||
now,
|
||||
objectEntries,
|
||||
objectOmit,
|
||||
objectPick,
|
||||
onClickOutside,
|
||||
onElementRemoval,
|
||||
onKeyDown,
|
||||
onKeyPressed,
|
||||
onKeyStroke,
|
||||
onKeyUp,
|
||||
onLongPress,
|
||||
onStartTyping,
|
||||
pausableFilter,
|
||||
watchPausable as pausableWatch,
|
||||
promiseTimeout,
|
||||
provideLocal,
|
||||
provideSSRWidth,
|
||||
pxValue,
|
||||
rand,
|
||||
reactify,
|
||||
reactifyObject,
|
||||
reactiveComputed,
|
||||
reactiveOmit,
|
||||
reactivePick,
|
||||
refAutoReset,
|
||||
refDebounced,
|
||||
refDefault,
|
||||
refThrottled,
|
||||
refWithControl,
|
||||
resolveRef,
|
||||
resolveUnref,
|
||||
set,
|
||||
setSSRHandler,
|
||||
syncRef,
|
||||
syncRefs,
|
||||
templateRef,
|
||||
throttleFilter,
|
||||
refThrottled as throttledRef,
|
||||
watchThrottled as throttledWatch,
|
||||
timestamp,
|
||||
toArray,
|
||||
toReactive,
|
||||
toRef,
|
||||
toRefs,
|
||||
toValue,
|
||||
tryOnBeforeMount,
|
||||
tryOnBeforeUnmount,
|
||||
tryOnMounted,
|
||||
tryOnScopeDispose,
|
||||
tryOnUnmounted,
|
||||
unrefElement,
|
||||
until,
|
||||
useActiveElement,
|
||||
useAnimate,
|
||||
useArrayDifference,
|
||||
useArrayEvery,
|
||||
useArrayFilter,
|
||||
useArrayFind,
|
||||
useArrayFindIndex,
|
||||
useArrayFindLast,
|
||||
useArrayIncludes,
|
||||
useArrayJoin,
|
||||
useArrayMap,
|
||||
useArrayReduce,
|
||||
useArraySome,
|
||||
useArrayUnique,
|
||||
useAsyncQueue,
|
||||
useAsyncState,
|
||||
useBase64,
|
||||
useBattery,
|
||||
useBluetooth,
|
||||
useBreakpoints,
|
||||
useBroadcastChannel,
|
||||
useBrowserLocation,
|
||||
useCached,
|
||||
useClipboard,
|
||||
useClipboardItems,
|
||||
useCloned,
|
||||
useColorMode,
|
||||
useConfirmDialog,
|
||||
useCountdown,
|
||||
useCounter,
|
||||
useCssVar,
|
||||
useCurrentElement,
|
||||
useCycleList,
|
||||
useDark,
|
||||
useDateFormat,
|
||||
refDebounced as useDebounce,
|
||||
useDebounceFn,
|
||||
useDebouncedRefHistory,
|
||||
useDeviceMotion,
|
||||
useDeviceOrientation,
|
||||
useDevicePixelRatio,
|
||||
useDevicesList,
|
||||
useDisplayMedia,
|
||||
useDocumentVisibility,
|
||||
useDraggable,
|
||||
useDropZone,
|
||||
useElementBounding,
|
||||
useElementByPoint,
|
||||
useElementHover,
|
||||
useElementSize,
|
||||
useElementVisibility,
|
||||
useEventBus,
|
||||
useEventListener,
|
||||
useEventSource,
|
||||
useEyeDropper,
|
||||
useFavicon,
|
||||
useFetch,
|
||||
useFileDialog,
|
||||
useFileSystemAccess,
|
||||
useFocus,
|
||||
useFocusWithin,
|
||||
useFps,
|
||||
useFullscreen,
|
||||
useGamepad,
|
||||
useGeolocation,
|
||||
useIdle,
|
||||
useImage,
|
||||
useInfiniteScroll,
|
||||
useIntersectionObserver,
|
||||
useInterval,
|
||||
useIntervalFn,
|
||||
useKeyModifier,
|
||||
useLastChanged,
|
||||
useLocalStorage,
|
||||
useMagicKeys,
|
||||
useManualRefHistory,
|
||||
useMediaControls,
|
||||
useMediaQuery,
|
||||
useMemoize,
|
||||
useMemory,
|
||||
useMounted,
|
||||
useMouse,
|
||||
useMouseInElement,
|
||||
useMousePressed,
|
||||
useMutationObserver,
|
||||
useNavigatorLanguage,
|
||||
useNetwork,
|
||||
useNow,
|
||||
useObjectUrl,
|
||||
useOffsetPagination,
|
||||
useOnline,
|
||||
usePageLeave,
|
||||
useParallax,
|
||||
useParentElement,
|
||||
usePerformanceObserver,
|
||||
usePermission,
|
||||
usePointer,
|
||||
usePointerLock,
|
||||
usePointerSwipe,
|
||||
usePreferredColorScheme,
|
||||
usePreferredContrast,
|
||||
usePreferredDark,
|
||||
usePreferredLanguages,
|
||||
usePreferredReducedMotion,
|
||||
usePreferredReducedTransparency,
|
||||
usePrevious,
|
||||
useRafFn,
|
||||
useRefHistory,
|
||||
useResizeObserver,
|
||||
useSSRWidth,
|
||||
useScreenOrientation,
|
||||
useScreenSafeArea,
|
||||
useScriptTag,
|
||||
useScroll,
|
||||
useScrollLock,
|
||||
useSessionStorage,
|
||||
useShare,
|
||||
useSorted,
|
||||
useSpeechRecognition,
|
||||
useSpeechSynthesis,
|
||||
useStepper,
|
||||
useStorage,
|
||||
useStorageAsync,
|
||||
useStyleTag,
|
||||
useSupported,
|
||||
useSwipe,
|
||||
useTemplateRefsList,
|
||||
useTextDirection,
|
||||
useTextSelection,
|
||||
useTextareaAutosize,
|
||||
refThrottled as useThrottle,
|
||||
useThrottleFn,
|
||||
useThrottledRefHistory,
|
||||
useTimeAgo,
|
||||
useTimeout,
|
||||
useTimeoutFn,
|
||||
useTimeoutPoll,
|
||||
useTimestamp,
|
||||
useTitle,
|
||||
useToNumber,
|
||||
useToString,
|
||||
useToggle,
|
||||
useTransition,
|
||||
useUrlSearchParams,
|
||||
useUserMedia,
|
||||
useVModel,
|
||||
useVModels,
|
||||
useVibrate,
|
||||
useVirtualList,
|
||||
useWakeLock,
|
||||
useWebNotification,
|
||||
useWebSocket,
|
||||
useWebWorker,
|
||||
useWebWorkerFn,
|
||||
useWindowFocus,
|
||||
useWindowScroll,
|
||||
useWindowSize,
|
||||
watchArray,
|
||||
watchAtMost,
|
||||
watchDebounced,
|
||||
watchDeep,
|
||||
watchIgnorable,
|
||||
watchImmediate,
|
||||
watchOnce,
|
||||
watchPausable,
|
||||
watchThrottled,
|
||||
watchTriggerable,
|
||||
watchWithFilter,
|
||||
whenever
|
||||
};
|
||||
//# sourceMappingURL=vitepress___@vueuse_core.js.map
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sourcesContent": [],
|
||||
"mappings": "",
|
||||
"names": []
|
||||
}
|
||||
-1352
File diff suppressed because it is too large
Load Diff
-7
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
-1813
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Vendored
-347
@@ -1,347 +0,0 @@
|
||||
import {
|
||||
BaseTransition,
|
||||
BaseTransitionPropsValidators,
|
||||
Comment,
|
||||
DeprecationTypes,
|
||||
EffectScope,
|
||||
ErrorCodes,
|
||||
ErrorTypeStrings,
|
||||
Fragment,
|
||||
KeepAlive,
|
||||
ReactiveEffect,
|
||||
Static,
|
||||
Suspense,
|
||||
Teleport,
|
||||
Text,
|
||||
TrackOpTypes,
|
||||
Transition,
|
||||
TransitionGroup,
|
||||
TriggerOpTypes,
|
||||
VueElement,
|
||||
assertNumber,
|
||||
callWithAsyncErrorHandling,
|
||||
callWithErrorHandling,
|
||||
camelize,
|
||||
capitalize,
|
||||
cloneVNode,
|
||||
compatUtils,
|
||||
compile,
|
||||
computed,
|
||||
createApp,
|
||||
createBaseVNode,
|
||||
createBlock,
|
||||
createCommentVNode,
|
||||
createElementBlock,
|
||||
createHydrationRenderer,
|
||||
createPropsRestProxy,
|
||||
createRenderer,
|
||||
createSSRApp,
|
||||
createSlots,
|
||||
createStaticVNode,
|
||||
createTextVNode,
|
||||
createVNode,
|
||||
customRef,
|
||||
defineAsyncComponent,
|
||||
defineComponent,
|
||||
defineCustomElement,
|
||||
defineEmits,
|
||||
defineExpose,
|
||||
defineModel,
|
||||
defineOptions,
|
||||
defineProps,
|
||||
defineSSRCustomElement,
|
||||
defineSlots,
|
||||
devtools,
|
||||
effect,
|
||||
effectScope,
|
||||
getCurrentInstance,
|
||||
getCurrentScope,
|
||||
getCurrentWatcher,
|
||||
getTransitionRawChildren,
|
||||
guardReactiveProps,
|
||||
h,
|
||||
handleError,
|
||||
hasInjectionContext,
|
||||
hydrate,
|
||||
hydrateOnIdle,
|
||||
hydrateOnInteraction,
|
||||
hydrateOnMediaQuery,
|
||||
hydrateOnVisible,
|
||||
initCustomFormatter,
|
||||
initDirectivesForSSR,
|
||||
inject,
|
||||
isMemoSame,
|
||||
isProxy,
|
||||
isReactive,
|
||||
isReadonly,
|
||||
isRef,
|
||||
isRuntimeOnly,
|
||||
isShallow,
|
||||
isVNode,
|
||||
markRaw,
|
||||
mergeDefaults,
|
||||
mergeModels,
|
||||
mergeProps,
|
||||
nextTick,
|
||||
nodeOps,
|
||||
normalizeClass,
|
||||
normalizeProps,
|
||||
normalizeStyle,
|
||||
onActivated,
|
||||
onBeforeMount,
|
||||
onBeforeUnmount,
|
||||
onBeforeUpdate,
|
||||
onDeactivated,
|
||||
onErrorCaptured,
|
||||
onMounted,
|
||||
onRenderTracked,
|
||||
onRenderTriggered,
|
||||
onScopeDispose,
|
||||
onServerPrefetch,
|
||||
onUnmounted,
|
||||
onUpdated,
|
||||
onWatcherCleanup,
|
||||
openBlock,
|
||||
patchProp,
|
||||
popScopeId,
|
||||
provide,
|
||||
proxyRefs,
|
||||
pushScopeId,
|
||||
queuePostFlushCb,
|
||||
reactive,
|
||||
readonly,
|
||||
ref,
|
||||
registerRuntimeCompiler,
|
||||
render,
|
||||
renderList,
|
||||
renderSlot,
|
||||
resolveComponent,
|
||||
resolveDirective,
|
||||
resolveDynamicComponent,
|
||||
resolveFilter,
|
||||
resolveTransitionHooks,
|
||||
setBlockTracking,
|
||||
setDevtoolsHook,
|
||||
setTransitionHooks,
|
||||
shallowReactive,
|
||||
shallowReadonly,
|
||||
shallowRef,
|
||||
ssrContextKey,
|
||||
ssrUtils,
|
||||
stop,
|
||||
toDisplayString,
|
||||
toHandlerKey,
|
||||
toHandlers,
|
||||
toRaw,
|
||||
toRef,
|
||||
toRefs,
|
||||
toValue,
|
||||
transformVNodeArgs,
|
||||
triggerRef,
|
||||
unref,
|
||||
useAttrs,
|
||||
useCssModule,
|
||||
useCssVars,
|
||||
useHost,
|
||||
useId,
|
||||
useModel,
|
||||
useSSRContext,
|
||||
useShadowRoot,
|
||||
useSlots,
|
||||
useTemplateRef,
|
||||
useTransitionState,
|
||||
vModelCheckbox,
|
||||
vModelDynamic,
|
||||
vModelRadio,
|
||||
vModelSelect,
|
||||
vModelText,
|
||||
vShow,
|
||||
version,
|
||||
warn,
|
||||
watch,
|
||||
watchEffect,
|
||||
watchPostEffect,
|
||||
watchSyncEffect,
|
||||
withAsyncContext,
|
||||
withCtx,
|
||||
withDefaults,
|
||||
withDirectives,
|
||||
withKeys,
|
||||
withMemo,
|
||||
withModifiers,
|
||||
withScopeId
|
||||
} from "./chunk-XY26LBYQ.js";
|
||||
export {
|
||||
BaseTransition,
|
||||
BaseTransitionPropsValidators,
|
||||
Comment,
|
||||
DeprecationTypes,
|
||||
EffectScope,
|
||||
ErrorCodes,
|
||||
ErrorTypeStrings,
|
||||
Fragment,
|
||||
KeepAlive,
|
||||
ReactiveEffect,
|
||||
Static,
|
||||
Suspense,
|
||||
Teleport,
|
||||
Text,
|
||||
TrackOpTypes,
|
||||
Transition,
|
||||
TransitionGroup,
|
||||
TriggerOpTypes,
|
||||
VueElement,
|
||||
assertNumber,
|
||||
callWithAsyncErrorHandling,
|
||||
callWithErrorHandling,
|
||||
camelize,
|
||||
capitalize,
|
||||
cloneVNode,
|
||||
compatUtils,
|
||||
compile,
|
||||
computed,
|
||||
createApp,
|
||||
createBlock,
|
||||
createCommentVNode,
|
||||
createElementBlock,
|
||||
createBaseVNode as createElementVNode,
|
||||
createHydrationRenderer,
|
||||
createPropsRestProxy,
|
||||
createRenderer,
|
||||
createSSRApp,
|
||||
createSlots,
|
||||
createStaticVNode,
|
||||
createTextVNode,
|
||||
createVNode,
|
||||
customRef,
|
||||
defineAsyncComponent,
|
||||
defineComponent,
|
||||
defineCustomElement,
|
||||
defineEmits,
|
||||
defineExpose,
|
||||
defineModel,
|
||||
defineOptions,
|
||||
defineProps,
|
||||
defineSSRCustomElement,
|
||||
defineSlots,
|
||||
devtools,
|
||||
effect,
|
||||
effectScope,
|
||||
getCurrentInstance,
|
||||
getCurrentScope,
|
||||
getCurrentWatcher,
|
||||
getTransitionRawChildren,
|
||||
guardReactiveProps,
|
||||
h,
|
||||
handleError,
|
||||
hasInjectionContext,
|
||||
hydrate,
|
||||
hydrateOnIdle,
|
||||
hydrateOnInteraction,
|
||||
hydrateOnMediaQuery,
|
||||
hydrateOnVisible,
|
||||
initCustomFormatter,
|
||||
initDirectivesForSSR,
|
||||
inject,
|
||||
isMemoSame,
|
||||
isProxy,
|
||||
isReactive,
|
||||
isReadonly,
|
||||
isRef,
|
||||
isRuntimeOnly,
|
||||
isShallow,
|
||||
isVNode,
|
||||
markRaw,
|
||||
mergeDefaults,
|
||||
mergeModels,
|
||||
mergeProps,
|
||||
nextTick,
|
||||
nodeOps,
|
||||
normalizeClass,
|
||||
normalizeProps,
|
||||
normalizeStyle,
|
||||
onActivated,
|
||||
onBeforeMount,
|
||||
onBeforeUnmount,
|
||||
onBeforeUpdate,
|
||||
onDeactivated,
|
||||
onErrorCaptured,
|
||||
onMounted,
|
||||
onRenderTracked,
|
||||
onRenderTriggered,
|
||||
onScopeDispose,
|
||||
onServerPrefetch,
|
||||
onUnmounted,
|
||||
onUpdated,
|
||||
onWatcherCleanup,
|
||||
openBlock,
|
||||
patchProp,
|
||||
popScopeId,
|
||||
provide,
|
||||
proxyRefs,
|
||||
pushScopeId,
|
||||
queuePostFlushCb,
|
||||
reactive,
|
||||
readonly,
|
||||
ref,
|
||||
registerRuntimeCompiler,
|
||||
render,
|
||||
renderList,
|
||||
renderSlot,
|
||||
resolveComponent,
|
||||
resolveDirective,
|
||||
resolveDynamicComponent,
|
||||
resolveFilter,
|
||||
resolveTransitionHooks,
|
||||
setBlockTracking,
|
||||
setDevtoolsHook,
|
||||
setTransitionHooks,
|
||||
shallowReactive,
|
||||
shallowReadonly,
|
||||
shallowRef,
|
||||
ssrContextKey,
|
||||
ssrUtils,
|
||||
stop,
|
||||
toDisplayString,
|
||||
toHandlerKey,
|
||||
toHandlers,
|
||||
toRaw,
|
||||
toRef,
|
||||
toRefs,
|
||||
toValue,
|
||||
transformVNodeArgs,
|
||||
triggerRef,
|
||||
unref,
|
||||
useAttrs,
|
||||
useCssModule,
|
||||
useCssVars,
|
||||
useHost,
|
||||
useId,
|
||||
useModel,
|
||||
useSSRContext,
|
||||
useShadowRoot,
|
||||
useSlots,
|
||||
useTemplateRef,
|
||||
useTransitionState,
|
||||
vModelCheckbox,
|
||||
vModelDynamic,
|
||||
vModelRadio,
|
||||
vModelSelect,
|
||||
vModelText,
|
||||
vShow,
|
||||
version,
|
||||
warn,
|
||||
watch,
|
||||
watchEffect,
|
||||
watchPostEffect,
|
||||
watchSyncEffect,
|
||||
withAsyncContext,
|
||||
withCtx,
|
||||
withDefaults,
|
||||
withDirectives,
|
||||
withKeys,
|
||||
withMemo,
|
||||
withModifiers,
|
||||
withScopeId
|
||||
};
|
||||
//# sourceMappingURL=vue.js.map
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sourcesContent": [],
|
||||
"mappings": "",
|
||||
"names": []
|
||||
}
|
||||
@@ -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' },
|
||||
]
|
||||
|
||||
@@ -1,5 +1,64 @@
|
||||
# 更新日志
|
||||
|
||||
## v1.2.1
|
||||
|
||||
### 问题修复
|
||||
|
||||
- 🐛 **修复升级后整站没有样式**:Astro 会给 CSS/JS 加内容哈希,升级后旧文件被删除,被缓存的 HTML 仍请求旧文件名,
|
||||
Halo 直接抛 `FileNotFoundException` 返回 500,样式全部丢失。主题现在会把各版本的哈希资源一并保留
|
||||
(`compat/assets` 在构建时合并进 `templates/assets`,已覆盖 v1.1.7 起的所有版本)
|
||||
- 🐛 **避免页面出现 500**:新增构建期静态资源引用校验,模板引用的任一缺失资源都会让构建失败
|
||||
- 🐛 **修复鼠标点击效果开启后没有任何作用**:旧实现用 `th:if` 判断开关、且直接读取配置值,
|
||||
一旦配置项未随版本写入(或被 Thymeleaf 整体移除属性)就读取为空,脚本直接跳过;
|
||||
同时修复了多种特效在插入节点后随即改写 `transform` / `opacity`,导致浏览器把初态与终态合并、
|
||||
transition 完全不触发的问题(表现为点了没反应)
|
||||
- 🐛 次要修复:点击特效节点统一挂载到 `body` 下的独立图层(`z-index: 12050`),不再被导航栏、页脚遮挡
|
||||
|
||||
### 其他
|
||||
|
||||
- 🧰 新增构建脚本:`pnpm snapshot`(历史资源快照)、`pnpm package`(打安装包)、`pnpm smoke`(点击特效冒烟测试)
|
||||
|
||||
### 补充排查记录:升级后部分页面配色/新样式不生效
|
||||
|
||||
上线后收到反馈:更换主题配色后,**首页与瞬间页不跟随**,其他页面正常。经排查
|
||||
(对比浏览器实际加载的资源、CDP 读取计算样式、比对响应头)确认:
|
||||
|
||||
- 浏览器拿到的首页/瞬间 HTML 是 **v1.1.11 / v1.1.12 时期**的旧页面(引用旧哈希 CSS、
|
||||
`<html>` 上没有 v1.2.0 新增的 `data-palette` 属性)
|
||||
- 响应头 `X-Halo-Cache-At` 与 `Cache-Control: max-age=3, s-maxage=120` 表明这些页面
|
||||
被 **「页面静态缓存」插件** 缓存,而该插件只随文章变更自动刷新,
|
||||
**主题升级 / 主题设置变更不会刷新缓存**
|
||||
- 裸 `curl`(无浏览器请求头)会绕过该缓存拿到新 HTML,因此服务端"看起来"一切正常
|
||||
|
||||
这是缓存层行为、不是主题缺陷,**在 Halo 后台点一次「刷新页面缓存」即可**;
|
||||
排查步骤已写入 [FAQ](faq.md#升级主题或修改配色后部分页面的新样式配色不生效)。
|
||||
|
||||
## v1.2.0
|
||||
|
||||
### 主题配色系统
|
||||
|
||||
- ✨ 新增「主题配色」设置(总体样式 → 主题配色),内置 11 套官方预调配色:暖屿·赤陶(默认)、抹茶、黛蓝、樱粉、暮紫、海盐、琥珀、梅酒、石墨、可拿铁、天青
|
||||
- 🎨 每套配色包含浅色 / 深色两套完整色板,玻璃拟态、遮罩、阴影色调自动跟随当前配色
|
||||
- 🎨 自定义「强调色」改为留空跟随所选配色;填写后仍可单独覆盖
|
||||
- 📱 浏览器地址栏 theme-color 随配色与明暗模式联动(含切换按钮)
|
||||
|
||||
### Hero 首屏
|
||||
|
||||
- ✨ 一言文字新增独立颜色配置(浅色 / 深色模式各一项,此前只能跟随副标题颜色)
|
||||
- ✨ 新增「文字显示效果」设置:阴影 / 光晕 / 半透明遮罩层 / 渐变遮罩 / 容器(半透明边框圆角矩形 + 加大留白)
|
||||
- 🐛 默认改为无任何效果:移除标题、副标题与一言自带的白色散光投影
|
||||
|
||||
### 问题修复
|
||||
|
||||
- 🐛 修复 /douban 页面 500:适配豆瓣插件 v1.2.6 的 SQLite 数据结构(字段由 `item.spec.*` / `item.faves.*` 扁平化为 `item.*` / `item.faves*`)
|
||||
- 🐛 修复友情链接卡片悬浮光圈被裁切的问题(卡片容器不再裁切悬浮阴影与上移位移)
|
||||
- 🐛 修复瞬间页面顶图与最新一条瞬间卡片的边框贴合的问题,顶图下方增加间距
|
||||
- 🐛 友情链接卡片徽章简化为仅展示站点可达性(绿点 = 可访问,红点 = 异常),不再联合反链检测结果判断
|
||||
|
||||
### 其他
|
||||
|
||||
- ⬆️ Halo 版本要求提升至 **2.26+**
|
||||
|
||||
## v1.1.1
|
||||
|
||||
### 瞬间页面
|
||||
|
||||
@@ -13,7 +13,17 @@ Hero 首屏是 WarmIsland 主题的标志性区域,占据首页首屏的全部
|
||||
| `hero_hitokoto_api` | URL | `https://v1.hitokoto.cn/` | 一言 API 地址 |
|
||||
| `hero_hitokoto_categories` | 多选 | `d, i, k` | 一言句子类型 |
|
||||
| `hero_custom_description` | 多行文本 | — | 自定义描述文案 |
|
||||
| `hero_hitokoto_auto_refresh` | 开关 | `false` | 一言自动刷新 |
|
||||
| `hero_hitokoto_refresh_interval` | 下拉 | `10000` | 一言刷新间隔(秒) |
|
||||
| `hero_background_image` | 附件 | — | 背景图片 |
|
||||
| `hero_background_image_dark` | 附件 | — | 深色模式背景图片 |
|
||||
| `hero_title_color_light` | 颜色 | — | 大标题颜色(浅色模式),留空使用主题默认 |
|
||||
| `hero_title_color_dark` | 颜色 | — | 大标题颜色(深色模式),留空使用主题默认 |
|
||||
| `hero_subtitle_color_light` | 颜色 | — | 副标题颜色(浅色模式),留空使用主题默认 |
|
||||
| `hero_subtitle_color_dark` | 颜色 | — | 副标题颜色(深色模式),留空使用主题默认 |
|
||||
| `hero_quote_color_light` | 颜色 | — | 一言文字颜色(浅色模式),留空使用主题默认 |
|
||||
| `hero_quote_color_dark` | 颜色 | — | 一言文字颜色(深色模式),留空使用主题默认 |
|
||||
| `hero_text_effect` | 下拉 | `none` | 文字显示效果:`none` / `shadow` / `glow` / `scrim` / `gradient` / `frame` |
|
||||
|
||||
## 详细说明
|
||||
|
||||
@@ -102,6 +112,31 @@ hero_custom_description: "用文字记录生活,用代码构建世界。"
|
||||
背景图片会自动应用模糊和暗化处理,以确保前景文字的可读性。建议选择色彩柔和、不包含大量细节的图片作为背景,避免干扰文案阅读。
|
||||
:::
|
||||
|
||||
### 文字颜色
|
||||
|
||||
标题、副标题、一言的颜色均可分别配置浅色 / 深色模式的取值,留空使用主题默认:
|
||||
|
||||
- **`hero_title_color_light` / `hero_title_color_dark`** — 大标题颜色。
|
||||
- **`hero_subtitle_color_light` / `hero_subtitle_color_dark`** — 副标题颜色。
|
||||
- **`hero_quote_color_light` / `hero_quote_color_dark`** — 一言文字颜色(`hero_description_mode` 为 `hitokoto` 或 `custom` 时生效)。
|
||||
|
||||
### 文字显示效果(hero_text_effect)
|
||||
|
||||
为 Hero 文字(标题 / 副标题 / 一言)叠加辅助可读效果。**默认 `none` 不使用任何效果**——v1.2.0 起,文字周围默认不再有淡淡的白色散光投影:
|
||||
|
||||
| 值 | 效果 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| `none` | 无效果(默认) | 纯净文字,无任何附加投影与衬底 |
|
||||
| `shadow` | 阴影 | 文字下方叠加柔和的深色投影,适合复杂背景图 |
|
||||
| `glow` | 光晕 | 文字周围叠加白色光晕,暗色背景图上更醒目 |
|
||||
| `scrim` | 半透明遮罩层 | 文字背后垫一块毛玻璃圆角衬底,整体提升可读性 |
|
||||
| `gradient` | 渐变遮罩 | 文字背后垫斜向渐变衬底,左深右浅自然过渡 |
|
||||
| `frame` | 容器 | 把文字"装"进一个带半透明边框的圆角矩形,加大内边距与字距留白 |
|
||||
|
||||
::: tip
|
||||
遮罩类(`scrim` / `gradient`)与容器(`frame`)作用于整个文字区块,浅色模式为白色系衬底、深色模式为黑色系衬底;`frame` 会在浅色模式下使用墨色描边、深色模式下使用白色描边。
|
||||
:::
|
||||
|
||||
## 视觉效果
|
||||
|
||||
Hero 区域包含以下精心设计的视觉效果:
|
||||
|
||||
@@ -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) — 页面结构与模板覆盖说明
|
||||
+25
-2
@@ -7,7 +7,8 @@
|
||||
| 配置项 | 类型 | 默认值 | 说明 |
|
||||
| --- | --- | --- | --- |
|
||||
| `color_scheme` | 单选 | `system` | 配色方案:`system` / `light` / `dark` |
|
||||
| `accent_color` | 颜色 | `#d4764e` | 全局强调色 |
|
||||
| `color_palette` | 下拉 | `warm-island` | 主题配色(官方预设调色板,含深浅两套色板) |
|
||||
| `accent_color` | 颜色 | — | 自定义强调色;留空跟随所选主题配色 |
|
||||
| `border_radius` | 下拉 | `medium` | 圆角风格:`small` / `medium` / `large` |
|
||||
| `layout_container_width` | 下拉 | `medium` | 容器宽度:`narrow` / `medium` / `wide` |
|
||||
| `animation_enabled` | 开关 | `true` | 全局动画总开关 |
|
||||
@@ -32,6 +33,28 @@
|
||||
选择 `system` 时,主题会监听操作系统的 `prefers-color-scheme` 媒体查询,实时响应用户的系统设置变化。访问者也可以通过导航栏的主题切换按钮手动覆盖当前模式。
|
||||
:::
|
||||
|
||||
### 主题配色(color_palette)
|
||||
|
||||
v1.2.0 起主题内置配色系统,提供 11 套官方预调配色,每套均包含浅色与深色两套完整色板(背景、文字、分隔线、强调色、玻璃拟态、阴影色调等会整体联动):
|
||||
|
||||
| 值 | 名称 | 色彩倾向 |
|
||||
| --- | --- | --- |
|
||||
| `warm-island` | 暖屿 · 赤陶(默认) | 暖橘陶土,米白纸感 |
|
||||
| `matcha` | 抹茶 | 清新草绿,米绿纸感 |
|
||||
| `indigo` | 黛蓝 | 沉稳蓝调,冷白纸感 |
|
||||
| `sakura` | 樱粉 | 柔和粉调,樱白纸感 |
|
||||
| `violet` | 暮紫 | 温柔紫调,淡紫纸感 |
|
||||
| `sea` | 海盐 | 青碧蓝绿,浅青纸感 |
|
||||
| `amber` | 琥珀 | 蜂蜜金黄,暖黄纸感 |
|
||||
| `plum` | 梅酒 | 酒红梅紫,粉白纸感 |
|
||||
| `graphite` | 石墨 | 中性灰黑,极简无彩 |
|
||||
| `cocoa` | 可拿铁 | 咖啡可可,奶咖纸感 |
|
||||
| `azure` | 天青 | 明快天蓝,浅蓝纸感 |
|
||||
|
||||
::: warning
|
||||
下方「强调色」留空时,将使用所选配色自带的强调色。**老站点升级前如果保存过强调色(默认 `#d4764e`),切换配色后强调色不会变化——清空强调色并保存即可恢复跟随配色。**
|
||||
:::
|
||||
|
||||
### 强调色(accent_color)
|
||||
|
||||
强调色是 WarmIsland 主题的灵魂,它会影响全站以下元素的颜色:
|
||||
@@ -43,7 +66,7 @@
|
||||
- 选中状态颜色
|
||||
- Hero 区域渐变色的组成部分
|
||||
|
||||
默认值 `#d4764e` 是暖屿标志性的暖橘色,与主题的温暖气质相呼应。
|
||||
留空时跟随上方「主题配色」自带的强调色(暖屿·赤陶配色即 `#d4764e` 暖橘色)。
|
||||
|
||||
::: tip
|
||||
选择强调色时,建议同时考虑浅色和深色模式下的可读性。可以在 [CSS 变量](/customize/css-variables) 页面查看所有受影响的变量,进行更精细的调整。
|
||||
|
||||
+53
-1
@@ -6,7 +6,7 @@
|
||||
|
||||
检查以下几点:
|
||||
|
||||
1. 确认 Halo 版本 >= 2.24.0
|
||||
1. 确认 Halo 版本 >= 2.26.0
|
||||
2. 确认主题已启用
|
||||
3. 清除浏览器缓存后重试(Ctrl+Shift+R 强制刷新)
|
||||
4. 检查 Halo 后台日志是否有报错
|
||||
@@ -26,8 +26,60 @@ docker cp templates/ halo:/root/.halo2/themes/warm-island/
|
||||
docker restart halo
|
||||
```
|
||||
|
||||
### 升级主题后整站都没有样式?
|
||||
|
||||
主题的 CSS / JS 文件名带内容哈希,每次构建都会变化。如果 Halo 页面缓存或前置反向代理
|
||||
(OpenResty、CDN 等)里还留着上一版本的 HTML,它请求的仍是已被删除的旧文件名,
|
||||
Halo 找不到文件时会返回 **500**(日志里能看到 `FileNotFoundException: .../templates/assets/Layout.xxxx.css`),
|
||||
于是样式全部失效。
|
||||
|
||||
依次处理:
|
||||
|
||||
1. Halo 后台执行一次「清理缓存」(设置 → 缓存,或直接重启 Halo / 容器)
|
||||
2. 刷新 CDN、反向代理缓存
|
||||
3. 浏览器强制刷新(Ctrl+Shift+R)
|
||||
|
||||
v1.2.1 起安装包会保留各版本的哈希资源(v1.1.7 之后全部覆盖),
|
||||
即使缓存里的旧 HTML 被再次请求也不会 500,但最终仍建议清一次缓存以使用最新样式。
|
||||
|
||||
### 升级主题或修改配色后,部分页面的新样式/配色不生效?
|
||||
|
||||
先说结论:**这不是主题问题,是「页面静态缓存」插件缓存了旧版 HTML。**
|
||||
|
||||
排查特征(本站实际案例):
|
||||
|
||||
- 换了主题配色,首页和瞬间页永远是默认配色,其他页面正常
|
||||
- 用 `curl` 直接请求同一个 URL 却能拿到新 HTML(极具迷惑性——缓存插件对
|
||||
非浏览器请求会绕过缓存,所以服务端"看起来"一切正常)
|
||||
- 响应头里有 `X-Halo-Cache-At` 和 `Cache-Control: max-age=3, s-maxage=120, must-revalidate`
|
||||
—— 这是「页面静态缓存」插件的特征头,`X-Halo-Cache-At` 就是缓存写入时间
|
||||
- 浏览器里页面引用的主题 CSS 还是旧版本的哈希文件名
|
||||
|
||||
原因:「页面静态缓存」插件**只监听文章内容的变动**自动刷新缓存,
|
||||
**主题升级、主题设置(配色、Hero、样式等)变更都不会刷新缓存**。
|
||||
缓存里的旧 HTML 是旧版本主题渲染的:没有新版的配色属性、引用的还是旧 CSS,
|
||||
所以新功能在那些页面上永远不出现,直到缓存被清理或被新访问覆盖。
|
||||
|
||||
处理步骤:
|
||||
|
||||
1. Halo 后台 → 仪表盘 → 快捷访问 → 添加「**刷新页面缓存**」入口 → 点击清理一次
|
||||
2. 浏览器强制刷新(Ctrl+Shift+R)
|
||||
3. 如果配了 CDN(插件会给已缓存页面发 `s-maxage=120`),确认 CDN 缓存策略为
|
||||
**遵循源站**,这样 CDN 最多 2 分钟就会回源,无需手动刷新
|
||||
|
||||
**长期建议**:以后每次**升级主题或修改主题设置**后,都点一次「刷新页面缓存」,
|
||||
否则未登录访客最长会一直看到旧页面(插件不会自动感知主题层的变更)。
|
||||
|
||||
## 功能相关
|
||||
|
||||
### 鼠标点击效果 / 拖尾效果开启了却没反应?
|
||||
|
||||
1. 确认「总体样式 → 鼠标点击效果」开关已开启并点击了保存
|
||||
2. 确认「点击效果类型」没有选择「关闭」(选了关闭时即使开启开关也不会有任何特效)
|
||||
3. 清除浏览器缓存后重试;老版本的浏览器请更新到较新的 Chrome / Edge / Firefox / Safari
|
||||
|
||||
若仍无效,打开浏览器控制台(F12)检查是否有 JS 报错 —— 第三方脚本报错会中断后续脚本执行。
|
||||
|
||||
### 搜索按钮不显示?
|
||||
|
||||
搜索功能依赖 Halo 搜索插件:
|
||||
|
||||
@@ -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) — 其它插件扩展页面
|
||||
@@ -1,2 +0,0 @@
|
||||
const js = `(function(){var h=document.querySelector(".hero");if(!h)return "No .hero element";var s=getComputedStyle(h);return JSON.stringify({width:s.width,marginLeft:s.marginLeft,marginTop:s.marginTop,paddingTop:s.paddingTop})})()`;
|
||||
console.log(Buffer.from(js).toString('base64'));
|
||||
@@ -1,130 +0,0 @@
|
||||
common.home=Home
|
||||
common.search=Search
|
||||
common.themeSwitch=Switch Theme
|
||||
common.menu=Menu
|
||||
common.close=Close
|
||||
common.toc=Table of Contents
|
||||
common.openToc=Open Table of Contents
|
||||
common.closeToc=Close Table of Contents
|
||||
common.newer=Newer
|
||||
common.older=Older
|
||||
common.loading=Loading...
|
||||
common.allLoaded=All posts loaded
|
||||
common.allMomentsLoaded=All moments loaded
|
||||
common.noPosts=No posts yet.
|
||||
common.postCount=Total {0} posts
|
||||
common.categoryCount=Total {0} categories
|
||||
common.tagCount=Total {0} tags
|
||||
common.readMore=Read more
|
||||
common.words=words
|
||||
common.readTime=min read
|
||||
common.views=views
|
||||
common.like=Like
|
||||
common.pagination=Pagination
|
||||
common.toggleMenu=Toggle menu
|
||||
common.all=All
|
||||
common.noPhotos=No photos yet.
|
||||
common.noPhotosInGroup=No photos in this group.
|
||||
common.pluginError=Plugin loading error, please check plugin status.
|
||||
common.installPlugin=This feature requires the {0} plugin, <a href="{1}">go to the marketplace to install</a>
|
||||
common.featured=Featured
|
||||
common.latestPosts=Latest Posts
|
||||
common.timeline=Timeline
|
||||
common.viewAll=View all
|
||||
|
||||
navbar.search=Search
|
||||
navbar.themeSwitch=Switch Theme
|
||||
|
||||
hero.pinned=Pinned
|
||||
hero.posts=Posts
|
||||
|
||||
article.previousPost=Previous
|
||||
article.nextPost=Next
|
||||
article.toc=Table of Contents
|
||||
article.wordCount=words
|
||||
article.readTime=min read
|
||||
article.views=views
|
||||
article.relatedPosts=Related Posts
|
||||
|
||||
share.title=Share
|
||||
share.qq=QQ
|
||||
share.wechat=WeChat
|
||||
share.weibo=Weibo
|
||||
share.twitter=X (Twitter)
|
||||
share.facebook=Facebook
|
||||
share.telegram=Telegram
|
||||
share.copyLink=Copy Link
|
||||
share.copied=Copied!
|
||||
share.qrcode=QR Code
|
||||
share.wechatQR=Scan to Share
|
||||
share.wechatHint=Open WeChat and scan the QR code to share
|
||||
|
||||
archives.title=Archives
|
||||
|
||||
categories.title=Categories
|
||||
|
||||
tags.title=Tags
|
||||
|
||||
links.title=Friends
|
||||
links.subtitle=Mountains and rivers, a journey of a thousand miles
|
||||
|
||||
moments.title=Moments
|
||||
moments.noMoments=No moments yet, go record your mood \U0001f319
|
||||
|
||||
photos.title=Gallery
|
||||
|
||||
friends.title=Friends Circle
|
||||
|
||||
equipment.title=Equipment
|
||||
|
||||
steam.title=Steam
|
||||
steam.homepage=Steam Homepage
|
||||
steam.level=Level
|
||||
steam.ownedGames=Owned Games
|
||||
steam.totalPlaytime=Total Playtime
|
||||
steam.recentPlaytime=Recent 2 Weeks
|
||||
steam.badges=Badges
|
||||
steam.hours=hours
|
||||
steam.recentlyPlayed=Recently Played
|
||||
steam.gameLibrary=Game Library
|
||||
steam.lastPlayed=Last played {0}
|
||||
|
||||
douban.title=Douban
|
||||
douban.wish=Wish
|
||||
douban.done=Done
|
||||
douban.wishRead=Wish
|
||||
douban.reading=Reading
|
||||
douban.listened=Listened
|
||||
douban.wishPlay=Wish
|
||||
douban.played=Played
|
||||
douban.wishListen=Wish
|
||||
douban.listening=Listening
|
||||
douban.playing=Playing
|
||||
douban.myRating=My:
|
||||
|
||||
messageboard.title=Message Board
|
||||
messageboard.subtitle=Leave your footprints here \U0001f319
|
||||
|
||||
footer.poweredBy=Powered by Halo
|
||||
|
||||
error.404.title=Page Not Found
|
||||
error.404.desc=The page you are looking for seems to have wandered off this island
|
||||
error.404.home=Back to Home
|
||||
error.404.back=Go Back
|
||||
error.500.title=Server Error
|
||||
error.500.desc=The island encountered some issues, please try again later
|
||||
error.500.home=Back to Home
|
||||
error.500.back=Go Back
|
||||
|
||||
sidebar.authorInfo=About Author
|
||||
sidebar.latestPosts=Latest Posts
|
||||
sidebar.recommendedPosts=Recommended
|
||||
sidebar.timeProgress=Time Progress
|
||||
sidebar.dayProgress=Day
|
||||
sidebar.monthProgress=Month
|
||||
sidebar.yearProgress=Year
|
||||
sidebar.categories=Categories
|
||||
sidebar.tags=Tags
|
||||
|
||||
comment.style=Warm
|
||||
comment.showAvatar=Show Avatar
|
||||
@@ -1,130 +0,0 @@
|
||||
common.home=Home
|
||||
common.search=Search
|
||||
common.themeSwitch=Switch Theme
|
||||
common.menu=Menu
|
||||
common.close=Close
|
||||
common.toc=Table of Contents
|
||||
common.openToc=Open Table of Contents
|
||||
common.closeToc=Close Table of Contents
|
||||
common.newer=Newer
|
||||
common.older=Older
|
||||
common.loading=Loading...
|
||||
common.allLoaded=All posts loaded
|
||||
common.noPosts=No posts yet.
|
||||
common.postCount=Total {0} posts
|
||||
common.readMore=Read more
|
||||
common.words=words
|
||||
common.readTime=min read
|
||||
common.views=views
|
||||
common.like=Like
|
||||
common.pagination=Pagination
|
||||
common.toggleMenu=Toggle menu
|
||||
common.allMomentsLoaded=All moments loaded
|
||||
common.categoryCount=Total {0} categories
|
||||
common.tagCount=Total {0} tags
|
||||
common.all=All
|
||||
common.noPhotos=No photos yet.
|
||||
common.noPhotosInGroup=No photos in this group.
|
||||
common.pluginError=Plugin loading error, please check plugin status.
|
||||
common.installPlugin=This feature requires the {0} plugin, <a href="{1}">go to the marketplace to install</a>
|
||||
common.featured=Featured
|
||||
common.latestPosts=Latest Posts
|
||||
common.timeline=Timeline
|
||||
common.viewAll=View all
|
||||
|
||||
navbar.search=Search
|
||||
navbar.themeSwitch=Switch Theme
|
||||
|
||||
hero.pinned=Pinned
|
||||
hero.posts=Posts
|
||||
|
||||
article.previousPost=Previous
|
||||
article.nextPost=Next
|
||||
article.toc=Table of Contents
|
||||
article.wordCount=words
|
||||
article.readTime=min read
|
||||
article.views=views
|
||||
article.relatedPosts=Related Posts
|
||||
|
||||
share.title=Share
|
||||
share.qq=QQ
|
||||
share.wechat=WeChat
|
||||
share.weibo=Weibo
|
||||
share.twitter=X (Twitter)
|
||||
share.facebook=Facebook
|
||||
share.telegram=Telegram
|
||||
share.copyLink=Copy Link
|
||||
share.copied=Copied!
|
||||
share.qrcode=QR Code
|
||||
share.wechatQR=Scan to Share
|
||||
share.wechatHint=Open WeChat and scan the QR code to share
|
||||
|
||||
archives.title=Archives
|
||||
|
||||
categories.title=Categories
|
||||
|
||||
tags.title=Tags
|
||||
|
||||
links.title=Friends
|
||||
links.subtitle=Mountains and rivers, a journey of a thousand miles
|
||||
|
||||
moments.title=Moments
|
||||
moments.noMoments=No moments yet, go record your mood \U0001f319
|
||||
|
||||
photos.title=Gallery
|
||||
|
||||
friends.title=Friends Circle
|
||||
|
||||
equipment.title=Equipment
|
||||
|
||||
steam.title=Steam
|
||||
steam.homepage=Steam Homepage
|
||||
steam.level=Level
|
||||
steam.ownedGames=Owned Games
|
||||
steam.totalPlaytime=Total Playtime
|
||||
steam.recentPlaytime=Recent 2 Weeks
|
||||
steam.badges=Badges
|
||||
steam.hours=hours
|
||||
steam.recentlyPlayed=Recently Played
|
||||
steam.gameLibrary=Game Library
|
||||
steam.lastPlayed=Last played {0}
|
||||
|
||||
douban.title=Douban
|
||||
douban.wish=Wish
|
||||
douban.done=Done
|
||||
douban.wishRead=Wish
|
||||
douban.reading=Reading
|
||||
douban.listened=Listened
|
||||
douban.wishPlay=Wish
|
||||
douban.played=Played
|
||||
douban.wishListen=Wish
|
||||
douban.listening=Listening
|
||||
douban.playing=Playing
|
||||
douban.myRating=My:
|
||||
|
||||
messageboard.title=Message Board
|
||||
messageboard.subtitle=Leave your footprints here \U0001f319
|
||||
|
||||
footer.poweredBy=Powered by Halo
|
||||
|
||||
error.404.title=Page Not Found
|
||||
error.404.desc=The page you are looking for seems to have wandered off this island
|
||||
error.404.home=Back to Home
|
||||
error.404.back=Go Back
|
||||
error.500.title=Server Error
|
||||
error.500.desc=The island encountered some issues, please try again later
|
||||
error.500.home=Back to Home
|
||||
error.500.back=Go Back
|
||||
|
||||
sidebar.authorInfo=About Author
|
||||
sidebar.latestPosts=Latest Posts
|
||||
sidebar.recommendedPosts=Recommended
|
||||
sidebar.timeProgress=Time Progress
|
||||
sidebar.dayProgress=Day
|
||||
sidebar.monthProgress=Month
|
||||
sidebar.yearProgress=Year
|
||||
sidebar.categories=Categories
|
||||
sidebar.tags=Tags
|
||||
|
||||
comment.style=Warm
|
||||
comment.showAvatar=Show Avatar
|
||||
@@ -1,130 +0,0 @@
|
||||
common.home=\u9996\u9875
|
||||
common.search=\u641c\u7d22
|
||||
common.themeSwitch=\u5207\u6362\u4e3b\u9898
|
||||
common.menu=\u83dc\u5355
|
||||
common.close=\u5173\u95ed
|
||||
common.toc=\u76ee\u5f55
|
||||
common.openToc=\u6253\u5f00\u76ee\u5f55
|
||||
common.closeToc=\u5173\u95ed\u76ee\u5f55
|
||||
common.newer=\u8f83\u65b0
|
||||
common.older=\u8f83\u65e7
|
||||
common.loading=\u52a0\u8f7d\u4e2d...
|
||||
common.allLoaded=\u5df2\u52a0\u8f7d\u5168\u90e8\u6587\u7ae0
|
||||
common.noPosts=\u6682\u65e0\u6587\u7ae0
|
||||
common.postCount=\u5171 {0} \u7bc7\u6587\u7ae0
|
||||
common.readMore=\u9605\u8bfb\u66f4\u591a
|
||||
common.words=\u5b57
|
||||
common.readTime=\u5206\u949f
|
||||
common.views=\u9605\u8bfb
|
||||
common.like=\u70b9\u8d5e
|
||||
common.pagination=\u5206\u9875
|
||||
common.toggleMenu=\u5207\u6362\u83dc\u5355
|
||||
common.allMomentsLoaded=\u5df2\u52a0\u8f7d\u5168\u90e8\u77ac\u95f4
|
||||
common.categoryCount=\u5171 {0} \u4e2a\u5206\u7c7b
|
||||
common.tagCount=\u5171 {0} \u4e2a\u6807\u7b7e
|
||||
common.all=\u5168\u90e8
|
||||
common.noPhotos=\u6682\u65e0\u56fe\u7247
|
||||
common.noPhotosInGroup=\u8be5\u5206\u7ec4\u6682\u65e0\u56fe\u7247
|
||||
common.pluginError=\u63d2\u4ef6\u52a0\u8f7d\u5f02\u5e38\uff0c\u8bf7\u68c0\u67e5\u63d2\u4ef6\u72b6\u6001
|
||||
common.installPlugin=\u8be5\u529f\u80fd\u9700\u8981\u5b89\u88c5\u300c{0}\u300d\u63d2\u4ef6\uff0c<a href="{1}">\u524d\u5f80\u5e94\u7528\u5e02\u573a\u5b89\u88c5</a>
|
||||
common.featured=\u7cbe\u9009
|
||||
common.latestPosts=\u6700\u65b0\u6587\u7ae0
|
||||
common.timeline=\u65f6\u95f4\u7ebf
|
||||
common.viewAll=\u67e5\u770b\u5168\u90e8
|
||||
|
||||
navbar.search=\u641c\u7d22
|
||||
navbar.themeSwitch=\u5207\u6362\u4e3b\u9898
|
||||
|
||||
hero.pinned=\u7f6e\u9876
|
||||
hero.posts=\u6587\u7ae0
|
||||
|
||||
article.previousPost=\u4e0a\u4e00\u7bc7
|
||||
article.nextPost=\u4e0b\u4e00\u7bc7
|
||||
article.toc=\u76ee\u5f55
|
||||
article.wordCount=\u5b57
|
||||
article.readTime=\u5206\u949f
|
||||
article.views=\u9605\u8bfb
|
||||
article.relatedPosts=\u76f8\u5173\u63a8\u8350
|
||||
|
||||
share.title=\u5206\u4eab
|
||||
share.qq=QQ
|
||||
share.wechat=\u5fae\u4fe1
|
||||
share.weibo=\u5fae\u535a
|
||||
share.twitter=X
|
||||
share.facebook=Facebook
|
||||
share.telegram=Telegram
|
||||
share.copyLink=\u590d\u5236\u94fe\u63a5
|
||||
share.copied=\u5df2\u590d\u5236
|
||||
share.qrcode=\u4e8c\u7ef4\u7801
|
||||
share.wechatQR=\u5fae\u4fe1\u626b\u7801\u5206\u4eab
|
||||
share.wechatHint=\u6253\u5f00\u5fae\u4fe1\uff0c\u626b\u63cf\u4e8c\u7ef4\u7801\u5373\u53ef\u5206\u4eab
|
||||
|
||||
archives.title=\u5f52\u6863
|
||||
|
||||
categories.title=\u5206\u7c7b
|
||||
|
||||
tags.title=\u6807\u7b7e
|
||||
|
||||
links.title=\u53cb\u94fe
|
||||
links.subtitle=\u5c71\u6c34\u4e00\u7a0b\uff0c\u4e09\u751f\u6709\u5e78
|
||||
|
||||
moments.title=\u52a8\u6001
|
||||
moments.noMoments=\u8fd8\u6ca1\u6709\u77ac\u95f4\uff0c\u5feb\u53bb\u8bb0\u5f55\u5f53\u4e0b\u7684\u5fc3\u60c5\u5427 \U0001f319
|
||||
|
||||
photos.title=\u76f8\u518c
|
||||
|
||||
friends.title=\u53cb\u4eba\u5708
|
||||
|
||||
equipment.title=\u88c5\u5907
|
||||
|
||||
steam.title=Steam
|
||||
steam.homepage=Steam \u4e3b\u9875
|
||||
steam.level=\u7b49\u7ea7
|
||||
steam.ownedGames=\u62e5\u6709\u6e38\u620f
|
||||
steam.totalPlaytime=\u603b\u6e38\u73a9\u65f6\u957f
|
||||
steam.recentPlaytime=\u8fd1\u4e24\u5468
|
||||
steam.badges=\u5fbd\u7ae0
|
||||
steam.hours=\u5c0f\u65f6
|
||||
steam.recentlyPlayed=\u6700\u8fd1\u6e38\u73a9
|
||||
steam.gameLibrary=\u6e38\u620f\u5e93
|
||||
steam.lastPlayed=\u6700\u540e\u6e38\u73a9 {0}
|
||||
|
||||
douban.title=\u8c46\u74e3
|
||||
douban.wish=\u60f3\u770b
|
||||
douban.done=\u770b\u8fc7
|
||||
douban.wishRead=\u60f3\u8bfb
|
||||
douban.reading=\u5728\u8bfb
|
||||
douban.listened=\u542c\u8fc7
|
||||
douban.wishPlay=\u60f3\u73a9
|
||||
douban.played=\u73a9\u8fc7
|
||||
douban.wishListen=\u60f3\u542c
|
||||
douban.listening=\u5728\u542c
|
||||
douban.playing=\u5728\u73a9
|
||||
douban.myRating=\u6211\u7684\uff1a
|
||||
|
||||
messageboard.title=\u7559\u8a00\u677f
|
||||
messageboard.subtitle=\u5728\u8fd9\u91cc\u7559\u4e0b\u4f60\u7684\u8db3\u8ff9 \U0001f319
|
||||
|
||||
footer.poweredBy=Powered by Halo
|
||||
|
||||
error.404.title=\u9875\u9762\u672a\u627e\u5230
|
||||
error.404.desc=\u4f60\u5bfb\u627e\u7684\u9875\u9762\u4f3c\u4e4e\u5df2\u7ecf\u8ff7\u8def\u4e86
|
||||
error.404.home=\u8fd4\u56de\u9996\u9875
|
||||
error.404.back=\u8fd4\u56de\u4e0a\u9875
|
||||
error.500.title=\u670d\u52a1\u5668\u9519\u8bef
|
||||
error.500.desc=\u5c0f\u5c9b\u9047\u5230\u4e86\u4e00\u4e9b\u95ee\u9898\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5
|
||||
error.500.home=\u8fd4\u56de\u9996\u9875
|
||||
error.500.back=\u8fd4\u56de\u4e0a\u9875
|
||||
|
||||
sidebar.authorInfo=\u535a\u4e3b\u4fe1\u606f
|
||||
sidebar.latestPosts=\u6700\u65b0\u6587\u7ae0
|
||||
sidebar.recommendedPosts=\u63a8\u8350\u6587\u7ae0
|
||||
sidebar.timeProgress=\u65f6\u5149\u8fdb\u5ea6
|
||||
sidebar.dayProgress=\u65e5
|
||||
sidebar.monthProgress=\u6708
|
||||
sidebar.yearProgress=\u5e74
|
||||
sidebar.categories=\u5206\u7c7b
|
||||
sidebar.tags=\u6807\u7b7e
|
||||
|
||||
comment.style=\u6e29\u6696
|
||||
comment.showAvatar=\u663e\u793a\u5934\u50cf
|
||||
@@ -1,130 +0,0 @@
|
||||
common.home=\u9996\u9801
|
||||
common.search=\u641c\u5c0b
|
||||
common.themeSwitch=\u5207\u63db\u4e3b\u984c
|
||||
common.menu=\u9078\u55ae
|
||||
common.close=\u95dc\u9589
|
||||
common.toc=\u76ee\u9304
|
||||
common.openToc=\u6253\u958b\u76ee\u9304
|
||||
common.closeToc=\u95dc\u9589\u76ee\u9304
|
||||
common.newer=\u8f03\u65b0
|
||||
common.older=\u8f03\u820a
|
||||
common.loading=\u8f09\u5165\u4e2d...
|
||||
common.allLoaded=\u5df2\u8f09\u5165\u5168\u90e8\u6587\u7ae0
|
||||
common.noPosts=\u66ab\u7121\u6587\u7ae0
|
||||
common.postCount=\u5171 {0} \u7bc7\u6587\u7ae0
|
||||
common.readMore=\u95b1\u8b80\u66f4\u591a
|
||||
common.words=\u5b57
|
||||
common.readTime=\u5206\u9418
|
||||
common.views=\u95b1\u8b80
|
||||
common.like=\u6309\u8b9a
|
||||
common.pagination=\u5206\u9801
|
||||
common.toggleMenu=\u5207\u63db\u9078\u55ae
|
||||
common.allMomentsLoaded=\u5df2\u8f09\u5165\u5168\u90e8\u77ac\u9593
|
||||
common.categoryCount=\u5171 {0} \u500b\u5206\u985e
|
||||
common.tagCount=\u5171 {0} \u500b\u6a19\u7c64
|
||||
common.all=\u5168\u90e8
|
||||
common.noPhotos=\u66ab\u7121\u5716\u7247
|
||||
common.noPhotosInGroup=\u8a72\u5206\u7d44\u66ab\u7121\u5716\u7247
|
||||
common.pluginError=\u5916\u639b\u7a0b\u5f0f\u8f09\u5165\u7570\u5e38\uff0c\u8acb\u6aa2\u67e5\u5916\u639b\u7a0b\u5f0f\u72c0\u614b
|
||||
common.installPlugin=\u8a72\u529f\u80fd\u9700\u8981\u5b89\u88dd\u300c{0}\u300d\u5916\u639b\u7a0b\u5f0f\uff0c<a href="{1}">\u524d\u5f80\u61c9\u7528\u5e02\u5834\u5b89\u88dd</a>
|
||||
common.featured=\u7cbe\u9078
|
||||
common.latestPosts=\u6700\u65b0\u6587\u7ae0
|
||||
common.timeline=\u6642\u9593\u7dda
|
||||
common.viewAll=\u67e5\u770b\u5168\u90e8
|
||||
|
||||
navbar.search=\u641c\u5c0b
|
||||
navbar.themeSwitch=\u5207\u63db\u4e3b\u984c
|
||||
|
||||
hero.pinned=\u7f6e\u9802
|
||||
hero.posts=\u6587\u7ae0
|
||||
|
||||
article.previousPost=\u4e0a\u4e00\u7bc7
|
||||
article.nextPost=\u4e0b\u4e00\u7bc7
|
||||
article.toc=\u76ee\u9304
|
||||
article.wordCount=\u5b57
|
||||
article.readTime=\u5206\u9418
|
||||
article.views=\u95b1\u8b80
|
||||
article.relatedPosts=\u76f8\u95dc\u63a8\u85a6
|
||||
|
||||
share.title=\u5206\u4eab
|
||||
share.qq=QQ
|
||||
share.wechat=\u5fae\u4fe1
|
||||
share.weibo=\u5fae\u535a
|
||||
share.twitter=X
|
||||
share.facebook=Facebook
|
||||
share.telegram=Telegram
|
||||
share.copyLink=\u8907\u88fd\u9023\u7d50
|
||||
share.copied=\u5df2\u8907\u88fd
|
||||
share.qrcode=\u4e8c\u7dad\u78bc
|
||||
share.wechatQR=\u5fae\u4fe1\u6383\u78bc\u5206\u4eab
|
||||
share.wechatHint=\u6253\u958b\u5fae\u4fe1\uff0c\u6383\u63cf\u4e8c\u7dad\u78bc\u5373\u53ef\u5206\u4eab
|
||||
|
||||
archives.title=\u6b78\u6a94
|
||||
|
||||
categories.title=\u5206\u985e
|
||||
|
||||
tags.title=\u6a19\u7c64
|
||||
|
||||
links.title=\u53cb\u93c8
|
||||
links.subtitle=\u5c71\u6c34\u4e00\u7a0b\uff0c\u4e09\u751f\u6709\u5e78
|
||||
|
||||
moments.title=\u52d5\u614b
|
||||
moments.noMoments=\u9084\u6c92\u6709\u77ac\u9593\uff0c\u5feb\u53bb\u8a18\u9304\u7576\u4e0b\u7684\u5fc3\u60c5\u5427 \U0001f319
|
||||
|
||||
photos.title=\u76f8\u7c3f
|
||||
|
||||
friends.title=\u53cb\u4eba\u5708
|
||||
|
||||
equipment.title=\u88dd\u5099
|
||||
|
||||
steam.title=Steam
|
||||
steam.homepage=Steam \u4e3b\u9801
|
||||
steam.level=\u7b49\u7d1a
|
||||
steam.ownedGames=\u64c1\u6709\u904a\u6232
|
||||
steam.totalPlaytime=\u7e3d\u904a\u73a9\u6642\u9577
|
||||
steam.recentPlaytime=\u8fd1\u5169\u9031
|
||||
steam.badges=\u5fbd\u7ae0
|
||||
steam.hours=\u5c0f\u6642
|
||||
steam.recentlyPlayed=\u6700\u8fd1\u904a\u73a9
|
||||
steam.gameLibrary=\u904a\u6232\u5eab
|
||||
steam.lastPlayed=\u6700\u5f8c\u904a\u73a9 {0}
|
||||
|
||||
douban.title=\u8c46\u74e3
|
||||
douban.wish=\u60f3\u770b
|
||||
douban.done=\u770b\u904e
|
||||
douban.wishRead=\u60f3\u8b80
|
||||
douban.reading=\u5728\u8b80
|
||||
douban.listened=\u807d\u904e
|
||||
douban.wishPlay=\u60f3\u73a9
|
||||
douban.played=\u73a9\u904e
|
||||
douban.wishListen=\u60f3\u807d
|
||||
douban.listening=\u5728\u807d
|
||||
douban.playing=\u5728\u73a9
|
||||
douban.myRating=\u6211\u7684\uff1a
|
||||
|
||||
messageboard.title=\u7559\u8a00\u677f
|
||||
messageboard.subtitle=\u5728\u9019\u88cf\u7559\u4e0b\u4f60\u7684\u8db3\u8de1 \U0001f319
|
||||
|
||||
footer.poweredBy=Powered by Halo
|
||||
|
||||
error.404.title=\u9801\u9762\u672a\u627e\u5230
|
||||
error.404.desc=\u4f60\u5c0b\u627e\u7684\u9801\u9762\u4f3c\u4e4e\u5df2\u7d93\u8ff7\u8def\u4e86
|
||||
error.404.home=\u8fd4\u56de\u9996\u9801
|
||||
error.404.back=\u8fd4\u56de\u4e0a\u9801
|
||||
error.500.title=\u4f3a\u670d\u5668\u932f\u8aa4
|
||||
error.500.desc=\u5c0f\u5cf6\u9047\u5230\u4e86\u4e00\u4e9b\u554f\u984c\uff0c\u8acb\u7a0d\u5f8c\u518d\u8a66
|
||||
error.500.home=\u8fd4\u56de\u9996\u9801
|
||||
error.500.back=\u8fd4\u56de\u4e0a\u9801
|
||||
|
||||
sidebar.authorInfo=\u535a\u4e3b\u8cc7\u8a0a
|
||||
sidebar.latestPosts=\u6700\u65b0\u6587\u7ae0
|
||||
sidebar.recommendedPosts=\u63a8\u85a6\u6587\u7ae0
|
||||
sidebar.timeProgress=\u6642\u5149\u9032\u5ea6
|
||||
sidebar.dayProgress=\u65e5
|
||||
sidebar.monthProgress=\u6708
|
||||
sidebar.yearProgress=\u5e74
|
||||
sidebar.categories=\u5206\u985e
|
||||
sidebar.tags=\u6a19\u7c64
|
||||
|
||||
comment.style=\u6eab\u6696
|
||||
comment.showAvatar=\u986f\u793a\u982d\u50cf
|
||||
+8
-14
@@ -1,12 +1,15 @@
|
||||
{
|
||||
"version": "1.1.1",
|
||||
"version": "1.2.1",
|
||||
"type": "module",
|
||||
"engines": {
|
||||
"node": ">=22.12.0"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nodemon --config nodemon.json --exec 'astro build'",
|
||||
"build": "astro build && node -e \"const fs=require('fs');const src='templates/logo.png';const dst='templates/assets/logo.png';if(fs.existsSync(src)){fs.copyFileSync(src,dst)}\"",
|
||||
"build": "astro build && node scripts/postbuild.mjs",
|
||||
"snapshot": "node scripts/snapshot-assets.mjs",
|
||||
"package": "node scripts/package.mjs",
|
||||
"smoke": "node scripts/smoke-clickfx.mjs",
|
||||
"astro": "astro",
|
||||
"format": "prettier --write ."
|
||||
},
|
||||
@@ -23,24 +26,15 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"pnpm": {
|
||||
"onlyBuiltDependencies": [
|
||||
"@parcel/watcher",
|
||||
"sharp"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/vue": "^6.0.1",
|
||||
"astro": "^6.1.4",
|
||||
"lightgallery": "^2.9.0",
|
||||
"vue": "^3.5.32"
|
||||
"lightgallery": "^2.9.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify-json/mingcute": "^1.2.7",
|
||||
"@halo-dev/theme-package-cli": "^1.1.1",
|
||||
"nodemon": "^3.1.14",
|
||||
"prettier": "3.8.1",
|
||||
"prettier-plugin-astro": "0.14.1",
|
||||
"sass": "^1.87.0",
|
||||
"unplugin-icons": "^23.0.1"
|
||||
"sass": "^1.87.0"
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+682
-1061
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -1,5 +1,5 @@
|
||||
allowBuilds:
|
||||
'@parcel/watcher': true
|
||||
"@parcel/watcher": true
|
||||
esbuild: true
|
||||
sharp: true
|
||||
onlyBuiltDependencies:
|
||||
|
||||
@@ -1,455 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-cn">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>字体分包构建报告</title>
|
||||
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://fastly.jsdelivr.net/npm/vant@4.9.15/lib/index.css"
|
||||
/>
|
||||
<link
|
||||
href="https://unpkg.com/vue3-easy-data-table@1.5.47/dist/style.css"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<link rel="stylesheet" href="./result.css" />
|
||||
<style>
|
||||
body {
|
||||
overflow-wrap: break-word;
|
||||
font-size: 18px;
|
||||
background-color: #edf0f3;
|
||||
--easy-table-border: 0;
|
||||
}
|
||||
main {
|
||||
padding: 20px;
|
||||
margin-top: var(--van-nav-bar-height);
|
||||
margin-bottom: var(--van-tabbar-height);
|
||||
}
|
||||
.light-blue {
|
||||
--easy-table-body-row-font-color: #427cb7;
|
||||
}
|
||||
.light-red {
|
||||
--easy-table-body-row-font-color: #b74273;
|
||||
}
|
||||
.hint {
|
||||
display: block;
|
||||
text-align: center;
|
||||
color: gray;
|
||||
margin: 1rem;
|
||||
}
|
||||
.scroller {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.user {
|
||||
height: 32%;
|
||||
padding: 0 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<van-nav-bar
|
||||
:title="reporter.state?.css?.family +' 分包报告'"
|
||||
right-text="Github"
|
||||
@click-right="toGithub"
|
||||
style="position: fixed; width: 100%; top: 0"
|
||||
></van-nav-bar>
|
||||
<div v-if="reporter.isLoading">加载中</div>
|
||||
<div v-if="reporter.isError">加载错误</div>
|
||||
|
||||
<main :style="style">
|
||||
<van-cell-group inset title="样式控制">
|
||||
<van-field
|
||||
v-model="fontSize"
|
||||
label="字体大小"
|
||||
placeholder="请输入字体大小"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="fontWeight"
|
||||
label="字体重量"
|
||||
placeholder="请输入字重"
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
<!-- 汇总信息 -->
|
||||
<display-chart
|
||||
v-if="reporter.isOk() && activePage === 0"
|
||||
:reporter="reporter.state"
|
||||
></display-chart>
|
||||
<!-- 字体信息表格 -->
|
||||
<name-table
|
||||
v-if="reporter.isOk() && activePage === 1"
|
||||
:reporter="reporter.state"
|
||||
></name-table>
|
||||
<!-- 单包查询 -->
|
||||
<pkg-list
|
||||
v-if="reporter.isOk() && activePage === 2"
|
||||
:reporter="reporter.state"
|
||||
></pkg-list>
|
||||
<div class="hint">
|
||||
<a href="https://chinese-font.netlify.app">中文网字计划</a>
|
||||
<span> cn-font-split 生成 </span>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<!-- 底部导航栏 -->
|
||||
<van-tabbar v-model="activePage">
|
||||
<van-tabbar-item icon="home-o">汇总</van-tabbar-item>
|
||||
<van-tabbar-item icon="home-o">字体信息</van-tabbar-item>
|
||||
<van-tabbar-item icon="search">分包</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
</body>
|
||||
<script src="https://unpkg.com/vue@3.4.33"></script>
|
||||
<script src="https://unpkg.com/vant@4/lib/vant.min.js"></script>
|
||||
<script src="https://unpkg.com/vue3-easy-data-table@1.5.47/dist/vue3-easy-data-table.umd.js"></script>
|
||||
<script src="https://unpkg.com/echarts@5.5.1"></script>
|
||||
<script src="https://unpkg.com/vue-echarts@7.0.3"></script>
|
||||
<script src="https://unpkg.com/protobufjs@7.4.0/dist/protobuf.min.js"></script>
|
||||
<script>
|
||||
const { createApp } = Vue;
|
||||
const app = createApp({
|
||||
data() {
|
||||
return {
|
||||
reporter: PromiseToState(loadReport),
|
||||
activePage: 0,
|
||||
fontWeight: '',
|
||||
fontSize: 16,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
toGithub() {
|
||||
window.open('https://github.com/KonghaYao/cn-font-split');
|
||||
},
|
||||
},
|
||||
async mounted() {
|
||||
const state = await this.reporter.refetch();
|
||||
this.fontWeight = state.css.weight;
|
||||
},
|
||||
computed: {
|
||||
style() {
|
||||
const size = this.fontSize < 12 ? 12 : this.fontSize;
|
||||
return (
|
||||
`font-family: '${this.reporter.state?.css?.family}';` +
|
||||
`font-weight: ${this.fontWeight};` +
|
||||
`--van-cell-font-size: ${size}px;`
|
||||
);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
/** 封装Promise为状态对象 **/
|
||||
function PromiseToState(fn) {
|
||||
return {
|
||||
state: {},
|
||||
isOk() {
|
||||
return !this.isLoading && !this.isError && this.state;
|
||||
},
|
||||
isLoading: false,
|
||||
isError: false,
|
||||
async refetch() {
|
||||
this.isLoading = true;
|
||||
this.isError = false;
|
||||
try {
|
||||
this.state = await fn();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
this.isError = true;
|
||||
}
|
||||
this.isLoading = false;
|
||||
return this.state;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
/** 载入构建出来的二进制报告文件 **/
|
||||
async function loadReport() {
|
||||
return new Promise((resolve, reject) => {
|
||||
protobuf.load('./index.proto', (err, root) => {
|
||||
if (err) return reject(err);
|
||||
fetch('./reporter.bin')
|
||||
.then((res) => res.arrayBuffer())
|
||||
.then((buf) => {
|
||||
const OutputReport = root.lookup('OutputReport');
|
||||
const data = OutputReport.decode(
|
||||
new Uint8Array(buf),
|
||||
);
|
||||
console.log(data);
|
||||
resolve(data);
|
||||
})
|
||||
.catch(reject);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
globalThis.app = app;
|
||||
app.use(vant);
|
||||
app.component('v-chart', VueECharts);
|
||||
app.component('easy-data-table', window['vue3-easy-data-table']);
|
||||
</script>
|
||||
|
||||
<!-- 汇总数据 -->
|
||||
<template id="display-chart">
|
||||
<van-cell-group inset title="构建信息">
|
||||
<van-cell title="构建工具" value="cn-font-split"></van-cell>
|
||||
<van-cell title="构建版本" :value="reporter.version"></van-cell>
|
||||
<van-cell title="构建平台" :value="reporter.platform"></van-cell>
|
||||
</van-cell-group>
|
||||
<van-cell-group inset title="构建详情">
|
||||
<div style="height: 300px; width: 400px">
|
||||
<v-chart :option="pieOptions"></v-chart>
|
||||
</div>
|
||||
<div style="height: 400px; width: 100%">
|
||||
<v-chart :option="option"></v-chart>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
<script>
|
||||
const tooltip = {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
crossStyle: {
|
||||
color: '#999',
|
||||
},
|
||||
},
|
||||
};
|
||||
app.component('display-chart', {
|
||||
template: '#display-chart',
|
||||
props: {
|
||||
reporter: Object,
|
||||
},
|
||||
computed: {
|
||||
option() {
|
||||
const data = this.reporter.subsetDetail ?? [];
|
||||
return {
|
||||
title: {
|
||||
text: '构建耗时',
|
||||
x: 'center',
|
||||
},
|
||||
xAxis: { type: 'category' },
|
||||
tooltip,
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
|
||||
name: 'time / ms',
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: 'bytes / KB',
|
||||
},
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: 'time',
|
||||
type: 'bar',
|
||||
data: data.map((i) => i.duration),
|
||||
},
|
||||
{
|
||||
name: 'bytes',
|
||||
type: 'line',
|
||||
data: data.map((i) =>
|
||||
(i.bytes / 1024).toFixed(2),
|
||||
),
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
pieOptions() {
|
||||
const message = this.reporter.bundleMessage;
|
||||
if (!message) return {};
|
||||
return {
|
||||
title: {
|
||||
text: '构建大小对比',
|
||||
x: 'center',
|
||||
},
|
||||
series: [
|
||||
{
|
||||
type: 'pie',
|
||||
radius: ['45%', '60%'],
|
||||
label: {
|
||||
formatter(b, c) {
|
||||
return `${b.name}\n${(
|
||||
b.value /
|
||||
(1024 * 1024)
|
||||
).toFixed(2)}MB`;
|
||||
},
|
||||
},
|
||||
data: [
|
||||
{
|
||||
value: message.bundledBytes,
|
||||
name: 'bundled',
|
||||
},
|
||||
{
|
||||
value: message.originBytes,
|
||||
name: 'origin',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'pie',
|
||||
radius: [0, '30%'],
|
||||
label: {
|
||||
formatter(b, c) {
|
||||
return `${b.name}\n${b.value}`;
|
||||
},
|
||||
},
|
||||
data: [
|
||||
{
|
||||
value: message.bundledSize,
|
||||
name: 'bundled',
|
||||
},
|
||||
{
|
||||
value: message.originSize,
|
||||
name: 'origin',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- 字体信息表格 -->
|
||||
<template id="name-table">
|
||||
<van-cell-group inset title="CSS 信息">
|
||||
<van-cell
|
||||
title="font-family"
|
||||
:value="reporter.css?.family"
|
||||
></van-cell>
|
||||
<van-cell
|
||||
title="font-weight"
|
||||
:value="reporter.css?.weight"
|
||||
></van-cell>
|
||||
<van-cell
|
||||
title="font-style"
|
||||
:value="reporter.css?.style"
|
||||
></van-cell>
|
||||
<van-cell
|
||||
title="font-display"
|
||||
:value="reporter.css?.display"
|
||||
></van-cell>
|
||||
</van-cell-group>
|
||||
<van-cell-group inset title="字体信息">
|
||||
<easy-data-table
|
||||
:headers="columns"
|
||||
:items="reporter.nameTable??[]"
|
||||
:rows-per-page="1000"
|
||||
:body-row-class-name="useColor"
|
||||
></easy-data-table>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
<script>
|
||||
app.component('name-table', {
|
||||
template: '#name-table',
|
||||
props: {
|
||||
reporter: Object,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
color: {
|
||||
Windows: 'light-blue',
|
||||
Macintosh: 'light-red',
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
text: '语言',
|
||||
value: 'language',
|
||||
sortable: true,
|
||||
|
||||
minWidth: '36px',
|
||||
},
|
||||
{
|
||||
text: '平台',
|
||||
value: 'platform',
|
||||
sortable: true,
|
||||
|
||||
minWidth: '20px',
|
||||
},
|
||||
{
|
||||
text: '名称',
|
||||
value: 'name',
|
||||
sortable: true,
|
||||
minWidth: '50px',
|
||||
},
|
||||
{
|
||||
text: '值',
|
||||
value: 'value',
|
||||
sortable: true,
|
||||
width: '200px',
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
useColor(item) {
|
||||
return this.color[item.platform];
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- 每个包的数据 -->
|
||||
<template id="pkg-list">
|
||||
<van-cell-group inset>
|
||||
<van-field
|
||||
v-model="search"
|
||||
label="搜索"
|
||||
placeholder="请输入关键字"
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset title="字体分包详情">
|
||||
<v-list
|
||||
ref="list"
|
||||
:items="items"
|
||||
:first-render="10"
|
||||
style="height: 80vh"
|
||||
>
|
||||
<template #default="{ item, index }">
|
||||
<div style="padding: 0 1rem">
|
||||
<h2 :style="{ width: item.width }">
|
||||
ITEM: {{ index }} - {{ item.hash }}
|
||||
</h2>
|
||||
<span> {{String.fromCodePoint(...item.chars)}} </span>
|
||||
</div>
|
||||
</template>
|
||||
</v-list>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
<script src="https://unpkg.com/@virtual-list/vue/dist/v3/index.iife.js"></script>
|
||||
<script>
|
||||
app.component('v-list', virtualListVue);
|
||||
app.component('pkg-list', {
|
||||
template: '#pkg-list',
|
||||
props: {
|
||||
reporter: Object,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeNames: [],
|
||||
search: '',
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
computed: {
|
||||
items() {
|
||||
const list = this.reporter.subsetDetail ?? [];
|
||||
if (this.search) {
|
||||
return list.filter((i) => i.hash.includes(this.search));
|
||||
}
|
||||
return list;
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
app.mount('#app');
|
||||
</script>
|
||||
</html>
|
||||
@@ -1,117 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package api_interface;
|
||||
|
||||
message InputTemplate {
|
||||
bytes input = 1; // ttf/woff2 文件的 buffer
|
||||
optional string out_dir = 2; // 切割后放置文件的文件夹
|
||||
|
||||
// ====== 构建产物配置 ======
|
||||
|
||||
optional CssProperties css = 5; // CSS 配置
|
||||
optional string target_type = 6; // 目标类型
|
||||
repeated bytes subsets = 7; // 子集
|
||||
optional int32 chunk_size = 9; // 包大小
|
||||
optional float chunk_size_tolerance = 10; // 包大小容差
|
||||
optional int32 max_allow_subsets_count = 11; // 最大允许子集数量
|
||||
|
||||
optional bool test_html = 13; // 是否生成测试 HTML
|
||||
optional bool reporter = 14; // 是否生成 reporter.bin
|
||||
optional PreviewImage preview_image = 15; // 预览图像
|
||||
|
||||
optional string rename_output_font = 18; // 重命名输出字体
|
||||
optional string build_mode = 20; // TODO 构建模式
|
||||
|
||||
// ====== 预分包优化项配置 =======
|
||||
|
||||
optional bool language_areas = 8; // 是否进行语言区域优化
|
||||
optional bool multi_threads = 21; // TODO 是否使用多线程
|
||||
optional bool font_feature = 22; // 是否启用字体特性
|
||||
optional bool reduce_mins = 23; // 是否减少最小分包,
|
||||
optional bool auto_subset = 24; // 是否自动子集化
|
||||
optional bool subset_remain_chars = 25; // 是否自动添加没有声明的字符
|
||||
|
||||
// CSS 属性配置
|
||||
message CssProperties {
|
||||
optional string font_family = 1; // 字体家族名称
|
||||
optional string font_weight = 2; // 字体粗细
|
||||
optional string font_style = 3; // 字体样式
|
||||
optional string font_display = 4; // 字体显示方式
|
||||
repeated string local_family = 5; // 本地字体家族名称
|
||||
repeated PolyfillType polyfill = 6; // Polyfill 类型
|
||||
|
||||
// 注释属性
|
||||
|
||||
optional bool comment_base = 11; // 基础注释
|
||||
optional bool comment_name_table = 12; // 名称表注释
|
||||
optional bool comment_unicodes = 13; // Unicode 注释
|
||||
optional bool compress = 8; // 是否压缩
|
||||
optional string file_name = 9; // 文件名
|
||||
}
|
||||
|
||||
// Polyfill 类型
|
||||
message PolyfillType {
|
||||
string name = 1; // 名称
|
||||
string format = 2; // 格式
|
||||
}
|
||||
|
||||
// 预览图像
|
||||
message PreviewImage {
|
||||
string text = 1; // 会显示在 svg 中的文本
|
||||
string name = 2; // svg 文件的名称
|
||||
}
|
||||
}
|
||||
|
||||
enum EventName {
|
||||
UNSPECIFIED = 0;
|
||||
OUTPUT_DATA = 1; // "output_data"
|
||||
END = 2; // "end"
|
||||
}
|
||||
|
||||
message EventMessage {
|
||||
EventName event = 1;
|
||||
string message = 2;
|
||||
optional bytes data = 3;
|
||||
}
|
||||
message MultiMessages {
|
||||
repeated EventMessage messages = 1;
|
||||
}
|
||||
message OutputReport {
|
||||
string version = 1; // 版本号
|
||||
Css css = 2; // CSS相关信息,可以直接用
|
||||
string platform = 3; // 平台信息,rust 的构建平台
|
||||
|
||||
BundleMessage bundle_message = 24; // 构建消息
|
||||
repeated NameTable name_table = 25; // name 表信息
|
||||
repeated SubsetDetail subset_detail = 26; // 子集详情
|
||||
|
||||
message NameTable {
|
||||
string platform = 1; // 平台
|
||||
string language = 2; // 语言
|
||||
string name = 3; // 名称
|
||||
string value = 4; // 值
|
||||
}
|
||||
|
||||
message SubsetDetail {
|
||||
uint32 id = 1; // ID
|
||||
string hash = 2; // 哈希值
|
||||
string file_name = 6; // 文件名称
|
||||
uint32 bytes = 3; // 字节数
|
||||
repeated uint32 chars = 4; // 字符数组
|
||||
uint32 duration = 5; // 构建时间
|
||||
}
|
||||
|
||||
message BundleMessage {
|
||||
uint32 origin_size = 1; // 原始大小
|
||||
uint32 bundled_size = 2; // 产物大小
|
||||
uint32 origin_bytes = 3; // 原始字节数
|
||||
uint32 bundled_bytes = 4; // 产物字节数
|
||||
}
|
||||
|
||||
message Css {
|
||||
string family = 1; // 字体家族
|
||||
string style = 2; // 样式
|
||||
string weight = 3; // 字重
|
||||
string display = 4; // 显示方式
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
@@ -126,6 +126,5 @@
|
||||
<a class="wi-error__back" href="javascript:history.back()">返回上页</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>(function(){var lang=navigator.language||'';var locale=lang.startsWith('zh-TW')||lang.startsWith('zh-HK')?'zh_TW':lang.startsWith('zh')?'zh_CN':'en';var i18n={zh_CN:{title:'页面走丢了',desc:'你寻找的页面似乎不在这个小岛上',home:'回到首页',back:'返回上页',pageTitle:'页面走丢了'},zh_TW:{title:'頁面走丟了',desc:'你尋找的頁面似乎不在這個小島上',home:'回到首頁',back:'返回上頁',pageTitle:'頁面走丟了'},en:{title:'Page Not Found',desc:'The page you are looking for seems to have wandered off this island',home:'Back to Home',back:'Go Back',pageTitle:'Page Not Found'}};var t=i18n[locale];var el=document.querySelector('.wi-error__title');if(el)el.textContent=t.title;var desc=document.querySelector('.wi-error__desc');if(desc)desc.textContent=t.desc;var home=document.querySelector('.wi-error__home');if(home)home.textContent=t.home;var back=document.querySelector('.wi-error__back');if(back)back.textContent=t.back;document.title=t.pageTitle+' - WarmIsland';})();</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
@@ -126,6 +126,5 @@
|
||||
<a class="wi-error__back" href="javascript:history.back()">返回上页</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>(function(){var lang=navigator.language||'';var locale=lang.startsWith('zh-TW')||lang.startsWith('zh-HK')?'zh_TW':lang.startsWith('zh')?'zh_CN':'en';var i18n={zh_CN:{title:'服务器开小差了',desc:'小岛遇到了一些问题,稍后再来看看吧',home:'回到首页',back:'返回上页',pageTitle:'服务器开小差了'},zh_TW:{title:'伺服器開小差了',desc:'小島遇到了一些問題,稍後再來看看吧',home:'回到首頁',back:'返回上頁',pageTitle:'伺服器開小差了'},en:{title:'Server Error',desc:'The island encountered some issues, please try again later',home:'Back to Home',back:'Go Back',pageTitle:'Server Error'}};var t=i18n[locale];var el=document.querySelector('.wi-error__title');if(el)el.textContent=t.title;var desc=document.querySelector('.wi-error__desc');if(desc)desc.textContent=t.desc;var home=document.querySelector('.wi-error__home');if(home)home.textContent=t.home;var back=document.querySelector('.wi-error__back');if(back)back.textContent=t.back;document.title=t.pageTitle+' - WarmIsland';})();</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
<ul class="wi-post-feed" role="list">
|
||||
<li th:each="post : ${posts.items}" class="wi-post-feed__item">
|
||||
<a class="wi-post-feed__link" th:href="@{${post.status.permalink}}">
|
||||
<div class="wi-post-feed__image-wrap" th:unless="${#strings.isEmpty(post.spec.cover)}">
|
||||
<img
|
||||
class="wi-post-feed__image"
|
||||
th:src="${post.spec.cover}"
|
||||
th:srcset="|${thumbnail.gen(post.spec.cover, 's')} 400w,
|
||||
${thumbnail.gen(post.spec.cover, 'm')} 800w,
|
||||
${thumbnail.gen(post.spec.cover, 'l')} 1200w|"
|
||||
sizes="(max-width: 768px) 100vw, 400px"
|
||||
/>
|
||||
</div>
|
||||
<div class="wi-post-feed__body">
|
||||
<p class="wi-post-feed__date" th:text="${#dates.format(post.spec.publishTime, 'yyyy-MM-dd')}"></p>
|
||||
<h2 class="wi-post-feed__title" th:text="${post.spec.title}"></h2>
|
||||
<p class="wi-post-feed__excerpt" th:text="${post.status.excerpt}"></p>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -0,0 +1,172 @@
|
||||
/**
|
||||
* 打包主题安装包:dist/warm-island-<version>.zip
|
||||
*
|
||||
* 安装包结构与 Halo 主题目录一致(根目录直接放 theme.yaml / settings.yaml /
|
||||
* templates),与历史版本安装包保持相同布局,可直接上传安装。
|
||||
*
|
||||
* 仅依赖 Node 内置模块,无需额外依赖。
|
||||
*/
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import zlib from "node:zlib";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
||||
|
||||
/** 读取 theme.yaml 中的版本号(避免手抄版本号不一致) */
|
||||
function readThemeVersion() {
|
||||
const yaml = fs.readFileSync(path.join(root, "theme.yaml"), "utf8");
|
||||
const match = yaml.match(/^\s*version:\s*["']?([^"'\n]+)["']?\s*$/m);
|
||||
if (!match) {
|
||||
throw new Error("theme.yaml 中未找到 version 字段");
|
||||
}
|
||||
return match[1].trim();
|
||||
}
|
||||
|
||||
/* ---------------- CRC32 ---------------- */
|
||||
const CRC_TABLE = (() => {
|
||||
const table = new Int32Array(256);
|
||||
for (let i = 0; i < 256; i++) {
|
||||
let c = i;
|
||||
for (let k = 0; k < 8; k++) {
|
||||
c = c & 1 ? 0xedb88320 ^ (c >>> 1) : c >>> 1;
|
||||
}
|
||||
table[i] = c;
|
||||
}
|
||||
return table;
|
||||
})();
|
||||
|
||||
function crc32(buf) {
|
||||
let c = 0xffffffff;
|
||||
for (let i = 0; i < buf.length; i++) {
|
||||
c = CRC_TABLE[(c ^ buf[i]) & 0xff] ^ (c >>> 8);
|
||||
}
|
||||
return (c ^ 0xffffffff) >>> 0;
|
||||
}
|
||||
|
||||
/* ---------------- ZIP 写入 ---------------- */
|
||||
function dosDateTime(date = new Date()) {
|
||||
const time =
|
||||
((date.getHours() & 0x1f) << 11) |
|
||||
((date.getMinutes() & 0x3f) << 5) |
|
||||
((date.getSeconds() / 2) & 0x1f);
|
||||
const day =
|
||||
(((date.getFullYear() - 1980) & 0x7f) << 9) |
|
||||
(((date.getMonth() + 1) & 0xf) << 5) |
|
||||
(date.getDate() & 0x1f);
|
||||
return { time, day };
|
||||
}
|
||||
|
||||
function buildZip(entries, outFile) {
|
||||
const chunks = [];
|
||||
const central = [];
|
||||
let offset = 0;
|
||||
|
||||
for (const entry of entries) {
|
||||
const nameBuf = Buffer.from(entry.name, "utf8");
|
||||
const raw = entry.data;
|
||||
const crc = crc32(raw);
|
||||
const compressed = zlib.deflateRawSync(raw, { level: 9 });
|
||||
const useDeflate = compressed.length < raw.length;
|
||||
const body = useDeflate ? compressed : raw;
|
||||
const method = useDeflate ? 8 : 0;
|
||||
const { time, day } = dosDateTime(entry.date);
|
||||
|
||||
const local = Buffer.alloc(30);
|
||||
local.writeUInt32LE(0x04034b50, 0);
|
||||
local.writeUInt16LE(20, 4); // version needed
|
||||
local.writeUInt16LE(0x0800, 6); // UTF-8 名称
|
||||
local.writeUInt16LE(method, 8);
|
||||
local.writeUInt16LE(time, 10);
|
||||
local.writeUInt16LE(day, 12);
|
||||
local.writeUInt32LE(crc, 14);
|
||||
local.writeUInt32LE(body.length, 18);
|
||||
local.writeUInt32LE(raw.length, 22);
|
||||
local.writeUInt16LE(nameBuf.length, 26);
|
||||
local.writeUInt16LE(0, 28);
|
||||
|
||||
chunks.push(local, nameBuf, body);
|
||||
|
||||
const cd = Buffer.alloc(46);
|
||||
cd.writeUInt32LE(0x02014b50, 0);
|
||||
cd.writeUInt16LE(20, 4); // version made by
|
||||
cd.writeUInt16LE(20, 6); // version needed
|
||||
cd.writeUInt16LE(0x0800, 8);
|
||||
cd.writeUInt16LE(method, 10);
|
||||
cd.writeUInt16LE(time, 12);
|
||||
cd.writeUInt16LE(day, 14);
|
||||
cd.writeUInt32LE(crc, 16);
|
||||
cd.writeUInt32LE(body.length, 20);
|
||||
cd.writeUInt32LE(raw.length, 24);
|
||||
cd.writeUInt16LE(nameBuf.length, 28);
|
||||
cd.writeUInt16LE(0, 30); // extra
|
||||
cd.writeUInt16LE(0, 32); // comment
|
||||
cd.writeUInt16LE(0, 34); // disk start
|
||||
cd.writeUInt16LE(0, 36); // internal attrs
|
||||
cd.writeUInt32LE(0, 38); // external attrs
|
||||
cd.writeUInt32LE(offset, 42);
|
||||
central.push(Buffer.concat([cd, nameBuf]));
|
||||
|
||||
offset += local.length + nameBuf.length + body.length;
|
||||
}
|
||||
|
||||
const centralBuf = Buffer.concat(central);
|
||||
const eocd = Buffer.alloc(22);
|
||||
eocd.writeUInt32LE(0x06054b50, 0);
|
||||
eocd.writeUInt16LE(0, 4);
|
||||
eocd.writeUInt16LE(0, 6);
|
||||
eocd.writeUInt16LE(entries.length, 8);
|
||||
eocd.writeUInt16LE(entries.length, 10);
|
||||
eocd.writeUInt32LE(centralBuf.length, 12);
|
||||
eocd.writeUInt32LE(offset, 16);
|
||||
eocd.writeUInt16LE(0, 20);
|
||||
|
||||
fs.mkdirSync(path.dirname(outFile), { recursive: true });
|
||||
fs.writeFileSync(outFile, Buffer.concat([...chunks, centralBuf, eocd]));
|
||||
}
|
||||
|
||||
/* ---------------- 收集文件 ---------------- */
|
||||
const INCLUDE_ROOT = [
|
||||
"theme.yaml",
|
||||
"settings.yaml",
|
||||
"LICENSE",
|
||||
"README.md",
|
||||
"pnpm-lock.yaml",
|
||||
"pnpm-workspace.yaml",
|
||||
];
|
||||
const INCLUDE_DIRS = ["templates"];
|
||||
const EXCLUDE_DIRS = new Set([".git", "node_modules", "src", "dist", "compat", ".astro"]);
|
||||
|
||||
const entries = [];
|
||||
|
||||
for (const name of INCLUDE_ROOT) {
|
||||
const full = path.join(root, name);
|
||||
if (fs.existsSync(full)) {
|
||||
entries.push({ name, data: fs.readFileSync(full), date: fs.statSync(full).mtime });
|
||||
}
|
||||
}
|
||||
|
||||
function walk(dir, prefix) {
|
||||
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
||||
const abs = path.join(dir, entry.name);
|
||||
const rel = prefix ? `${prefix}/${entry.name}` : entry.name;
|
||||
if (entry.isDirectory()) {
|
||||
if (EXCLUDE_DIRS.has(entry.name)) continue;
|
||||
walk(abs, rel);
|
||||
} else {
|
||||
entries.push({ name: rel, data: fs.readFileSync(abs), date: fs.statSync(abs).mtime });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (const dir of INCLUDE_DIRS) {
|
||||
const full = path.join(root, dir);
|
||||
if (fs.existsSync(full)) walk(full, dir);
|
||||
}
|
||||
|
||||
const version = readThemeVersion();
|
||||
const outFile = path.join(root, "dist", `warm-island-${version}.zip`);
|
||||
buildZip(entries, outFile);
|
||||
|
||||
const sizeMB = (fs.statSync(outFile).size / 1024 / 1024).toFixed(2);
|
||||
console.log(`[package] dist/warm-island-${version}.zip(${entries.length} 个文件,${sizeMB}MB)`);
|
||||
@@ -0,0 +1,80 @@
|
||||
/**
|
||||
* 构建后置处理:
|
||||
* 1. 复制 logo.png 到 assets(保留历史行为)
|
||||
* 2. 合并 compat/assets 下的历史版本静态资源,避免站点/代理缓存中的旧 HTML
|
||||
* 仍然引用上一版本的哈希文件名时出现 500(FileNotFoundException)
|
||||
* 3. 校验所有 templates/*.html 引用的静态资源真实存在,缺失即构建失败
|
||||
*/
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
||||
const assetsDir = path.join(root, "templates", "assets");
|
||||
const compatDir = path.join(root, "compat", "assets");
|
||||
const templatesDir = path.join(root, "templates");
|
||||
|
||||
fs.mkdirSync(assetsDir, { recursive: true });
|
||||
|
||||
// 1. logo
|
||||
const logoSrc = path.join(templatesDir, "logo.png");
|
||||
if (fs.existsSync(logoSrc)) {
|
||||
fs.copyFileSync(logoSrc, path.join(assetsDir, "logo.png"));
|
||||
}
|
||||
|
||||
// 2. 历史资源合并(已存在的同名文件以当前构建为准,不覆盖)
|
||||
if (fs.existsSync(compatDir)) {
|
||||
let copied = 0;
|
||||
let skipped = 0;
|
||||
for (const entry of fs.readdirSync(compatDir, { withFileTypes: true })) {
|
||||
if (!entry.isFile()) continue;
|
||||
const src = path.join(compatDir, entry.name);
|
||||
const dst = path.join(assetsDir, entry.name);
|
||||
if (fs.existsSync(dst)) {
|
||||
skipped++;
|
||||
continue;
|
||||
}
|
||||
fs.copyFileSync(src, dst);
|
||||
copied++;
|
||||
}
|
||||
console.log(`[compat] 历史静态资源:复制 ${copied} 个,当前构建已覆盖 ${skipped} 个`);
|
||||
}
|
||||
|
||||
// 3. 资源引用校验
|
||||
const missing = [];
|
||||
const checked = new Set();
|
||||
/** 主题静态资源前缀,必须与 astro.config.mjs 的 base 保持一致 */
|
||||
const prefixes = ["/themes/warm-island/assets/"];
|
||||
|
||||
/** Thymeleaf 的 @{...} 链接表达式同样需要校验 */
|
||||
const REFERENCE_RE =
|
||||
/(?:href|src)=["']([^"']*?\/(?:themes\/[^/]+)\/assets\/[^"']+?)["']/g;
|
||||
|
||||
for (const file of fs.readdirSync(templatesDir)) {
|
||||
if (!file.endsWith(".html")) continue;
|
||||
const html = fs.readFileSync(path.join(templatesDir, file), "utf8");
|
||||
REFERENCE_RE.lastIndex = 0;
|
||||
let match;
|
||||
while ((match = REFERENCE_RE.exec(html)) !== null) {
|
||||
let ref = match[1];
|
||||
if (ref.includes("@{")) continue; // 由 Halo 运行时解析,跳过
|
||||
for (const prefix of prefixes) {
|
||||
if (!ref.startsWith(prefix)) continue;
|
||||
const rel = ref.slice(prefix.length).split("#")[0].split("?")[0];
|
||||
const key = `${file}:${rel}`;
|
||||
if (checked.has(key)) continue;
|
||||
checked.add(key);
|
||||
if (!fs.existsSync(path.join(assetsDir, rel))) {
|
||||
missing.push(`${file} -> ${ref}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (missing.length > 0) {
|
||||
console.error(`[verify] 发现 ${missing.length} 处静态资源缺失:`);
|
||||
for (const item of missing) console.error(` - ${item}`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.log(`[verify] 静态资源引用校验通过(${checked.size} 条引用)`);
|
||||
@@ -0,0 +1,154 @@
|
||||
/**
|
||||
* 点击特效脚本冒烟测试(Node 内置模块,无第三方依赖)。
|
||||
*
|
||||
* 直接从构建产物 templates/index.html 中取出特效脚本,放进桩 DOM 里执行,
|
||||
* 校验:启用/禁用判定、拖尾与点击分支、节点生成与定位。
|
||||
*
|
||||
* 这类 bug 的共同点是"不报错但没效果",靠读代码很难发现,所以固化成测试。
|
||||
* 用法:npm run build && npm run smoke
|
||||
*/
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import vm from "node:vm";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
||||
const template = path.join(root, "templates", "index.html");
|
||||
|
||||
if (!fs.existsSync(template)) {
|
||||
console.error("[smoke] 未找到 templates/index.html,请先执行 npm run build");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const html = fs.readFileSync(template, "utf8");
|
||||
const anchor = html.indexOf('id="wi-click-effect"');
|
||||
if (anchor === -1) {
|
||||
console.error("[smoke] 模板中未找到 #wi-click-effect 节点");
|
||||
process.exit(1);
|
||||
}
|
||||
const scriptOpen = html.indexOf("<script", anchor);
|
||||
const scriptStart = html.indexOf(">", scriptOpen) + 1;
|
||||
const scriptEnd = html.indexOf("</script>", scriptStart);
|
||||
const code = html.slice(scriptStart, scriptEnd);
|
||||
|
||||
const failures = [];
|
||||
|
||||
function makeEl(tag) {
|
||||
return {
|
||||
tagName: tag,
|
||||
className: "",
|
||||
innerHTML: "",
|
||||
textContent: "",
|
||||
children: [],
|
||||
parentNode: null,
|
||||
style: {},
|
||||
_attrs: {},
|
||||
get offsetWidth() {
|
||||
return 1;
|
||||
},
|
||||
getAttribute(name) {
|
||||
return Object.prototype.hasOwnProperty.call(this._attrs, name) ? this._attrs[name] : null;
|
||||
},
|
||||
appendChild(child) {
|
||||
if (child.parentNode) return child;
|
||||
child.parentNode = this;
|
||||
this.children.push(child);
|
||||
return child;
|
||||
},
|
||||
removeChild(child) {
|
||||
const i = this.children.indexOf(child);
|
||||
if (i >= 0) {
|
||||
this.children.splice(i, 1);
|
||||
child.parentNode = null;
|
||||
}
|
||||
return child;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
function run(attrs, expectEnabled, label) {
|
||||
const cfg = makeEl("div");
|
||||
Object.assign(cfg._attrs, attrs);
|
||||
const body = makeEl("body");
|
||||
const listeners = {};
|
||||
const sandbox = {
|
||||
document: {
|
||||
getElementById: (id) => (id === "wi-click-effect" ? cfg : null),
|
||||
createElement: makeEl,
|
||||
body,
|
||||
addEventListener(type, fn) {
|
||||
(listeners[type] = listeners[type] || []).push(fn);
|
||||
},
|
||||
},
|
||||
window: {},
|
||||
requestAnimationFrame: (fn) => fn(),
|
||||
setTimeout: () => 0,
|
||||
};
|
||||
vm.createContext(sandbox);
|
||||
vm.runInContext(code, sandbox);
|
||||
|
||||
const hasListener = Object.keys(listeners).length > 0;
|
||||
if (hasListener !== expectEnabled) {
|
||||
failures.push(`${label}:期望 ${expectEnabled ? "注册监听" : "不注册监听"},实际相反`);
|
||||
return;
|
||||
}
|
||||
if (!expectEnabled) {
|
||||
console.log(` ✔ ${label} -> 已跳过`);
|
||||
return;
|
||||
}
|
||||
|
||||
const layer = body.children.find((c) => c.className === "wi-click-fx-layer");
|
||||
if (!layer) {
|
||||
failures.push(`${label}:未创建 .wi-click-fx-layer`);
|
||||
return;
|
||||
}
|
||||
if (layer.children.length !== 0) {
|
||||
failures.push(`${label}:初始化时特效层不应有子节点`);
|
||||
return;
|
||||
}
|
||||
|
||||
const type = attrs["data-effect"] || "(缺失,走兜底 values)";
|
||||
if (listeners.click) {
|
||||
listeners.click[0]({ clientX: 120, clientY: 240 });
|
||||
} else if (listeners.mousemove) {
|
||||
listeners.mousemove[0]({ clientX: 120, clientY: 240 });
|
||||
} else {
|
||||
failures.push(`${label}:未注册 click 或 mousemove 监听`);
|
||||
return;
|
||||
}
|
||||
|
||||
const spawned = layer.children;
|
||||
if (spawned.length === 0) {
|
||||
failures.push(`${label}:effect=${type} 触发后未生成任何特效节点`);
|
||||
return;
|
||||
}
|
||||
const first = spawned[0];
|
||||
if (!String(first.className).startsWith("wi-click-fx ")) {
|
||||
failures.push(`${label}:特效节点缺少 wi-click-fx 基类(${first.className})`);
|
||||
}
|
||||
if (first.style.left !== "120px" || first.style.top !== "240px") {
|
||||
failures.push(`${label}:定位不正确(${first.style.left}, ${first.style.top})`);
|
||||
}
|
||||
console.log(` ✔ ${label} effect=${type} -> ${spawned.length} 个节点,className=${first.className}`);
|
||||
}
|
||||
|
||||
console.log("禁用场景:");
|
||||
run({ "data-enabled": "false", "data-effect": "values" }, false, "显式关闭");
|
||||
run({ "data-effect": "values" }, false, "配置缺失");
|
||||
run({ "data-enabled": "true", "data-effect": "off" }, false, "类型选了「关闭」");
|
||||
|
||||
console.log("点击场景:");
|
||||
for (const effect of ["values", "hearts", "fireworks", "ripples", "particles", "stars"]) {
|
||||
run({ "data-enabled": "true", "data-effect": effect }, true, effect);
|
||||
}
|
||||
console.log("兜底与拖尾:");
|
||||
run({ "data-enabled": "true" }, true, "type 缺省");
|
||||
run({ "data-enabled": "true", "data-effect": "star-trail" }, true, "star-trail");
|
||||
run({ "data-enabled": "true", "data-effect": "particle-trail" }, true, "particle-trail");
|
||||
|
||||
if (failures.length > 0) {
|
||||
console.error("\n[smoke] 失败:");
|
||||
for (const f of failures) console.error(" - " + f);
|
||||
process.exit(1);
|
||||
}
|
||||
console.log("\n[smoke] 点击特效全部通过");
|
||||
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* 把当前构建产出的哈希静态资源快照进 compat/assets。
|
||||
*
|
||||
* 为什么要这么做:
|
||||
* Astro 给 CSS/JS 加内容哈希,主题升级后旧文件会被删除。若站点缓存或反向代理
|
||||
* (Halo 页面缓存 / Nginx / CDN)里还留着上一版本的 HTML,它仍然会请求旧哈希
|
||||
* 文件,Halo 找不到就直接抛 FileNotFoundException 返回 500,表现为"整站没样式"。
|
||||
* 把每个版本的哈希文件都留一份,旧 HTML 就永远不会请求失败。
|
||||
*
|
||||
* 用法:npm run build && npm run snapshot(随后把 compat/assets 的新增文件提交进仓库)
|
||||
*/
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
||||
const assetsDir = path.join(root, "templates", "assets");
|
||||
const compatDir = path.join(root, "compat", "assets");
|
||||
|
||||
if (!fs.existsSync(assetsDir)) {
|
||||
console.error("[snapshot] 未找到 templates/assets,请先执行 npm run build");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
fs.mkdirSync(compatDir, { recursive: true });
|
||||
|
||||
/** 名称固定、体积大的资源不需要进兼容层 */
|
||||
const SKIP_EXACT = new Set(["logo.png"]);
|
||||
const SKIP_DIRS = new Set(["fonts"]);
|
||||
|
||||
let added = 0;
|
||||
let updated = 0;
|
||||
let unchanged = 0;
|
||||
|
||||
for (const entry of fs.readdirSync(assetsDir, { withFileTypes: true })) {
|
||||
if (entry.isDirectory()) {
|
||||
if (SKIP_DIRS.has(entry.name)) continue;
|
||||
// 哈希资源都在根目录,子目录(如 fonts)不参与快照
|
||||
continue;
|
||||
}
|
||||
if (SKIP_EXACT.has(entry.name)) continue;
|
||||
|
||||
const src = path.join(assetsDir, entry.name);
|
||||
const dst = path.join(compatDir, entry.name);
|
||||
const stat = fs.statSync(src);
|
||||
if (!fs.existsSync(dst)) {
|
||||
fs.copyFileSync(src, dst);
|
||||
added++;
|
||||
} else {
|
||||
const dstBuf = fs.readFileSync(dst);
|
||||
const srcBuf = fs.readFileSync(src);
|
||||
if (dstBuf.length !== stat.size || !dstBuf.equals(srcBuf)) {
|
||||
fs.copyFileSync(src, dst);
|
||||
updated++;
|
||||
} else {
|
||||
unchanged++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
console.log(
|
||||
`[snapshot] 新增 ${added} / 更新 ${updated} / 无变化 ${unchanged} 个历史资源(compat/assets)`
|
||||
);
|
||||
+359
-15
@@ -28,20 +28,63 @@ spec:
|
||||
- $formkit: text
|
||||
name: label_archives_title
|
||||
label: 归档页标题
|
||||
- group: welcome_popup
|
||||
label: 欢迎弹窗
|
||||
formSchema:
|
||||
- $formkit: switch
|
||||
name: welcome_popup_enabled
|
||||
id: welcome_popup_enabled
|
||||
label: 启用欢迎弹窗
|
||||
value: false
|
||||
help: 首页显示"欢迎来自 XX·XX·XX 的朋友"的浮动提示弹窗,基于访客 IP 地理定位
|
||||
- $formkit: select
|
||||
name: language
|
||||
label: 语言
|
||||
name: welcome_popup_position
|
||||
id: welcome_popup_position
|
||||
label: 弹窗位置
|
||||
options:
|
||||
- label: 跟随浏览器
|
||||
value: auto
|
||||
- label: 简体中文
|
||||
value: zh_CN
|
||||
- label: 繁體中文
|
||||
value: zh_TW
|
||||
- label: English
|
||||
value: en
|
||||
value: auto
|
||||
help: 设置主题界面语言,选择"跟随浏览器"将根据浏览器语言自动匹配
|
||||
- label: 顶端漂窗(顶部居中)
|
||||
value: top-center
|
||||
- label: 右上
|
||||
value: top-right
|
||||
- label: 左上
|
||||
value: top-left
|
||||
- label: 右下
|
||||
value: bottom-right
|
||||
- label: 左下
|
||||
value: bottom-left
|
||||
value: top-center
|
||||
if: "$get(welcome_popup_enabled).value === true"
|
||||
- $formkit: number
|
||||
name: welcome_popup_duration
|
||||
id: welcome_popup_duration
|
||||
label: 自动消失时间(秒)
|
||||
value: 5
|
||||
min: 3
|
||||
max: 60
|
||||
step: 1
|
||||
help: 弹窗自动消失的秒数,范围 3-60
|
||||
if: "$get(welcome_popup_enabled).value === true"
|
||||
- $formkit: url
|
||||
name: welcome_popup_api
|
||||
id: welcome_popup_api
|
||||
label: IP 定位主 API
|
||||
value: "https://myip.ipip.net/json"
|
||||
help: 返回 JSON 的 IP 定位主接口,默认 IPIP;留空使用默认值。支持 IPIP/腾讯/ipapi.co 等常见格式
|
||||
if: "$get(welcome_popup_enabled).value === true"
|
||||
- $formkit: url
|
||||
name: welcome_popup_fallback_api
|
||||
id: welcome_popup_fallback_api
|
||||
label: IP 定位备选 API
|
||||
value: "https://r.inews.qq.com/api/ip2city?otype=json"
|
||||
help: 主接口失败时尝试的备选接口,默认腾讯 ip2city;留空则不使用备选
|
||||
if: "$get(welcome_popup_enabled).value === true"
|
||||
- $formkit: switch
|
||||
name: welcome_popup_show_once
|
||||
id: welcome_popup_show_once
|
||||
label: 同会话仅显示一次
|
||||
value: true
|
||||
help: 开启后同一浏览器会话内不再重复弹出;关闭则每次访问首页都显示
|
||||
if: "$get(welcome_popup_enabled).value === true"
|
||||
- group: style
|
||||
label: 总体样式
|
||||
formSchema:
|
||||
@@ -56,10 +99,38 @@ spec:
|
||||
- label: 深色
|
||||
value: dark
|
||||
value: system
|
||||
- $formkit: select
|
||||
name: color_palette
|
||||
label: 主题配色
|
||||
options:
|
||||
- label: 暖屿 · 赤陶(默认)
|
||||
value: warm-island
|
||||
- label: 抹茶
|
||||
value: matcha
|
||||
- label: 黛蓝
|
||||
value: indigo
|
||||
- label: 樱粉
|
||||
value: sakura
|
||||
- label: 暮紫
|
||||
value: violet
|
||||
- label: 海盐
|
||||
value: sea
|
||||
- label: 琥珀
|
||||
value: amber
|
||||
- label: 梅酒
|
||||
value: plum
|
||||
- label: 石墨
|
||||
value: graphite
|
||||
- label: 可拿铁
|
||||
value: cocoa
|
||||
- label: 天青
|
||||
value: azure
|
||||
value: warm-island
|
||||
help: 整套官方预调配色(含深浅两套色板);下方的强调色留空时跟随所选配色,填写后将覆盖配色中的强调色
|
||||
- $formkit: color
|
||||
name: accent_color
|
||||
label: 强调色
|
||||
value: "#d4764e"
|
||||
help: 自定义强调色;留空使用「主题配色」自带的强调色
|
||||
- $formkit: select
|
||||
name: border_radius
|
||||
label: 圆角风格
|
||||
@@ -99,9 +170,36 @@ spec:
|
||||
label: 滚动渐入
|
||||
value: true
|
||||
- $formkit: switch
|
||||
name: animation_cursor_glow
|
||||
label: 光感跟随
|
||||
name: click_effect_enabled
|
||||
id: click_effect_enabled
|
||||
label: 鼠标点击效果
|
||||
value: false
|
||||
help: 在页面上点击鼠标时触发的视觉特效
|
||||
- $formkit: select
|
||||
name: click_effect_type
|
||||
id: click_effect_type
|
||||
label: 点击效果类型
|
||||
value: values
|
||||
if: "$get(click_effect_enabled).value === true"
|
||||
options:
|
||||
- label: 关闭
|
||||
value: off
|
||||
- label: 社会主义核心价值观
|
||||
value: values
|
||||
- label: 随机彩色爱心
|
||||
value: hearts
|
||||
- label: 烟花
|
||||
value: fireworks
|
||||
- label: 烟花波纹
|
||||
value: ripples
|
||||
- label: 粒子
|
||||
value: particles
|
||||
- label: 星星
|
||||
value: stars
|
||||
- label: 星星拖尾
|
||||
value: star-trail
|
||||
- label: 粒子拖尾
|
||||
value: particle-trail
|
||||
- group: navbar
|
||||
label: 导航栏
|
||||
formSchema:
|
||||
@@ -116,6 +214,35 @@ spec:
|
||||
- label: Float
|
||||
value: float
|
||||
value: glass
|
||||
- $formkit: select
|
||||
name: navbar_brand_type
|
||||
id: navbar_brand_type
|
||||
label: 左侧显示
|
||||
options:
|
||||
- label: 站点名称
|
||||
value: title
|
||||
- label: Logo
|
||||
value: logo
|
||||
value: title
|
||||
- $formkit: attachment
|
||||
name: navbar_logo
|
||||
id: navbar_logo
|
||||
label: 导航栏 Logo
|
||||
help: 选择"Logo"模式后在此上传图片;留空则使用基础设置中的自定义 Logo
|
||||
if: "$get(navbar_brand_type).value === 'logo'"
|
||||
- $formkit: select
|
||||
name: navbar_logo_radius
|
||||
id: navbar_logo_radius
|
||||
label: Logo 圆角
|
||||
options:
|
||||
- label: 直角
|
||||
value: square
|
||||
- label: 圆角
|
||||
value: rounded
|
||||
- label: 圆形
|
||||
value: circle
|
||||
value: rounded
|
||||
if: "$get(navbar_brand_type).value === 'logo'"
|
||||
- $formkit: switch
|
||||
name: navbar_show_search
|
||||
label: 显示搜索按钮
|
||||
@@ -188,9 +315,79 @@ spec:
|
||||
label: 自定义描述文案
|
||||
key: hero_custom_description
|
||||
if: "$get(hero_description_mode).value === 'custom'"
|
||||
- $formkit: switch
|
||||
name: hero_hitokoto_auto_refresh
|
||||
id: hero_hitokoto_auto_refresh
|
||||
label: 一言自动刷新
|
||||
value: false
|
||||
help: 开启后按设定间隔自动刷新一言内容
|
||||
- $formkit: select
|
||||
name: hero_hitokoto_refresh_interval
|
||||
label: 一言刷新间隔
|
||||
if: "$get(hero_hitokoto_auto_refresh).value === true"
|
||||
options:
|
||||
- label: 5 秒
|
||||
value: 5000
|
||||
- label: 10 秒
|
||||
value: 10000
|
||||
- label: 15 秒
|
||||
value: 15000
|
||||
- label: 20 秒
|
||||
value: 20000
|
||||
- label: 25 秒
|
||||
value: 25000
|
||||
- label: 30 秒
|
||||
value: 30000
|
||||
value: 10000
|
||||
- $formkit: attachment
|
||||
name: hero_background_image
|
||||
label: 背景图片
|
||||
- $formkit: attachment
|
||||
name: hero_background_image_dark
|
||||
label: 深色模式背景图片
|
||||
help: 深色模式下显示的背景图;留空则深色模式也使用上方背景图
|
||||
- $formkit: color
|
||||
name: hero_title_color_light
|
||||
label: 浅色模式大标题颜色
|
||||
help: Hero 大标题文字颜色(浅色模式);留空使用主题默认
|
||||
- $formkit: color
|
||||
name: hero_title_color_dark
|
||||
label: 深色模式大标题颜色
|
||||
help: Hero 大标题文字颜色(深色模式);留空使用主题默认
|
||||
- $formkit: color
|
||||
name: hero_subtitle_color_light
|
||||
label: 浅色模式副标题颜色
|
||||
help: Hero 副标题文字颜色(浅色模式);留空使用主题默认
|
||||
- $formkit: color
|
||||
name: hero_subtitle_color_dark
|
||||
label: 深色模式副标题颜色
|
||||
help: Hero 副标题文字颜色(深色模式);留空使用主题默认
|
||||
- $formkit: color
|
||||
name: hero_quote_color_light
|
||||
label: 浅色模式一言颜色
|
||||
help: 一言(描述文案来源为"一言"时)的文字颜色(浅色模式);留空使用主题默认
|
||||
- $formkit: color
|
||||
name: hero_quote_color_dark
|
||||
label: 深色模式一言颜色
|
||||
help: 一言的文字颜色(深色模式);留空使用主题默认
|
||||
- $formkit: select
|
||||
name: hero_text_effect
|
||||
label: 文字显示效果
|
||||
options:
|
||||
- label: 无效果(默认)
|
||||
value: none
|
||||
- label: 阴影
|
||||
value: shadow
|
||||
- label: 光晕
|
||||
value: glow
|
||||
- label: 半透明遮罩层
|
||||
value: scrim
|
||||
- label: 渐变遮罩
|
||||
value: gradient
|
||||
- label: 容器(半透明边框圆角矩形)
|
||||
value: frame
|
||||
value: none
|
||||
help: 为 Hero 文字(标题/副标题/一言)叠加的辅助可读效果;默认无效果。遮罩类与容器类会在文字背后垫一层衬底并增加留白
|
||||
- group: home
|
||||
label: 首页
|
||||
formSchema:
|
||||
@@ -304,6 +501,16 @@ spec:
|
||||
- label: Cold
|
||||
value: cold
|
||||
value: warm
|
||||
- $formkit: switch
|
||||
name: article_extra_spacing
|
||||
label: 中英文混排自动加空格
|
||||
value: true
|
||||
help: 依赖「API 扩展包」插件,在服务端为正文自动添加中英文间距;插件未安装时自动跳过
|
||||
- $formkit: switch
|
||||
name: article_extra_highlight
|
||||
label: 使用服务端代码高亮
|
||||
value: false
|
||||
help: 依赖「API 扩展包」全量版(含 JS 运行时),启用后由服务端渲染代码高亮并替代主题自带样式;如环境不支持请勿开启
|
||||
- $formkit: select
|
||||
name: article_toc_expand
|
||||
label: 目录展开模式
|
||||
@@ -371,6 +578,10 @@ spec:
|
||||
- label: Masonry
|
||||
value: masonry
|
||||
value: cards
|
||||
- $formkit: attachment
|
||||
name: moments_cover
|
||||
label: 顶部封面图
|
||||
help: 朋友圈样式顶部的封面图片,建议尺寸 1500×500
|
||||
- $formkit: select
|
||||
name: moments_loading_mode
|
||||
label: 加载方式
|
||||
@@ -418,6 +629,11 @@ spec:
|
||||
- group: links
|
||||
label: 友情链接
|
||||
formSchema:
|
||||
- $formkit: switch
|
||||
name: links_apply_form_enabled
|
||||
label: 显示友链申请表单
|
||||
value: true
|
||||
help: 在友链页底部展示访客申请表单;需链接管理插件开启「友链申请」功能,未开启时表单自动隐藏
|
||||
- $formkit: text
|
||||
name: links_page_title
|
||||
label: 页面标题
|
||||
@@ -432,12 +648,88 @@ spec:
|
||||
- label: Cards
|
||||
value: cards
|
||||
value: cards
|
||||
- $formkit: switch
|
||||
name: links_show_comment
|
||||
label: 显示评论
|
||||
value: false
|
||||
help: 默认关闭评论功能,开启后在友情链接页面底部显示评论区
|
||||
- $formkit: switch
|
||||
name: links_random_order
|
||||
label: 随机排列
|
||||
value: false
|
||||
help: 开启后友情链接卡片随机排列顺序
|
||||
- $formkit: switch
|
||||
name: links_random_portal
|
||||
label: 随机传送门按钮
|
||||
value: true
|
||||
help: 开启后页面右上角显示"随机传送"按钮,点击随机访问一位博友
|
||||
- group: subscriptions
|
||||
label: 订阅
|
||||
formSchema:
|
||||
- $formkit: text
|
||||
name: subscriptions_page_title
|
||||
label: 页面标题
|
||||
placeholder: "订阅"
|
||||
- $formkit: text
|
||||
name: subscriptions_subtitle
|
||||
label: 页面副标题
|
||||
placeholder: "博友们的最新文章"
|
||||
- $formkit: number
|
||||
name: subscriptions_page_size
|
||||
label: 每页显示数量
|
||||
value: 20
|
||||
min: 1
|
||||
max: 100
|
||||
help: 单页展示的订阅动态条数,范围 1-100
|
||||
- $formkit: select
|
||||
name: subscriptions_loading_mode
|
||||
label: 加载方式
|
||||
options:
|
||||
- label: 分页
|
||||
value: pagination
|
||||
- label: 下滑加载
|
||||
value: infinite_scroll
|
||||
value: pagination
|
||||
- $formkit: select
|
||||
name: subscriptions_layout
|
||||
label: 布局样式
|
||||
options:
|
||||
- label: 列表卡片
|
||||
value: list
|
||||
- label: 网格卡片
|
||||
value: grid
|
||||
value: list
|
||||
help: 网格卡片布局一行显示3个,内容区域更宽
|
||||
- group: friends
|
||||
label: 朋友圈
|
||||
formSchema:
|
||||
- $formkit: text
|
||||
name: friends_page_title
|
||||
label: 页面标题
|
||||
- group: weread
|
||||
label: 微信读书
|
||||
formSchema:
|
||||
- $formkit: text
|
||||
name: weread_page_title
|
||||
label: 页面标题
|
||||
placeholder: "书架"
|
||||
help: 页面顶部标题与浏览器标签页标题;插件自带的标题区会自动隐藏以避免重复
|
||||
- $formkit: text
|
||||
name: weread_page_subtitle
|
||||
label: 页面副标题
|
||||
placeholder: "来自微信读书的同步藏书"
|
||||
- group: important_dates
|
||||
label: 记得
|
||||
formSchema:
|
||||
- $formkit: text
|
||||
name: idates_page_title
|
||||
label: 页面标题
|
||||
placeholder: "记得"
|
||||
help: 对应「记得」插件的前台页面 /important-dates;留空时使用插件自带的标题
|
||||
- $formkit: text
|
||||
name: idates_page_subtitle
|
||||
label: 页面副标题
|
||||
placeholder: "记着重要的日子、惦记的人,还有陪你跑的爱车"
|
||||
- group: messageboard
|
||||
label: 留言板
|
||||
formSchema:
|
||||
@@ -469,9 +761,61 @@ spec:
|
||||
- $formkit: text
|
||||
name: footer_copyright
|
||||
label: 版权信息(留空则使用默认格式 © 年份 站点标题)
|
||||
- $formkit: switch
|
||||
name: footer_show_stats
|
||||
id: footer_show_stats
|
||||
label: 显示全站统计
|
||||
value: true
|
||||
help: 在页脚展示文章数、分类数、评论数、访问量等站点统计数据
|
||||
- $formkit: checkbox
|
||||
name: footer_stats_items
|
||||
id: footer_stats_items
|
||||
label: 统计项
|
||||
if: "$get(footer_show_stats).value !== false"
|
||||
options:
|
||||
- label: 文章数
|
||||
value: post
|
||||
- label: 分类数
|
||||
value: category
|
||||
- label: 评论数
|
||||
value: comment
|
||||
- label: 访问量
|
||||
value: visit
|
||||
- label: 点赞数
|
||||
value: upvote
|
||||
- label: 总字数
|
||||
value: word
|
||||
value:
|
||||
- post
|
||||
- category
|
||||
- comment
|
||||
- visit
|
||||
help: 总字数依赖「API 扩展包」插件,未安装时自动隐藏该项
|
||||
- $formkit: switch
|
||||
name: footer_show_icp
|
||||
label: 显示 ICP 备案号
|
||||
value: false
|
||||
help: 开启后页脚显示 ICP 备案链接
|
||||
- $formkit: text
|
||||
name: footer_icp
|
||||
label: ICP 备案号
|
||||
help: 工信部ICP备案号,填写后页脚显示备案链接(指向 beian.miit.gov.cn)
|
||||
if: "$get(footer_show_icp).value === true"
|
||||
- $formkit: switch
|
||||
name: footer_show_mps
|
||||
label: 显示公网安备号
|
||||
value: false
|
||||
help: 开启后页脚显示公网安备图标和链接
|
||||
- $formkit: text
|
||||
name: footer_mps
|
||||
label: 公网安备号
|
||||
help: 公安部联网备案号,填写后页脚显示备案图标和链接(指向 beian.mps.gov.cn)
|
||||
if: "$get(footer_show_mps).value === true"
|
||||
- $formkit: text
|
||||
name: footer_mps_url
|
||||
label: 公网安备跳转链接
|
||||
help: 留空时默认指向 https://beian.mps.gov.cn/ ,可填写其他备案查询链接
|
||||
if: "$get(footer_show_mps).value === true"
|
||||
- $formkit: repeater
|
||||
name: footer_socials
|
||||
label: 社交链接
|
||||
|
||||
@@ -0,0 +1,329 @@
|
||||
---
|
||||
/*
|
||||
* 点击特效组件。
|
||||
*
|
||||
* 设计要点:容器节点始终输出,由脚本读取 data-enabled / data-effect 决定行为。
|
||||
* 旧写法用 th:if 依赖配置值严格等于布尔 true,一旦配置未落库、值不是布尔,
|
||||
* 或 Thymeleaf 求值把属性移除,节点就不会渲染 —— 特效静默失效且无任何报错。
|
||||
*
|
||||
* 特效元素统一挂到 body 下的 .wi-click-fx-layer:
|
||||
* .wi-main 是独立的层叠上下文(z-index:1),留在里面会被导航栏/页脚遮住。
|
||||
*
|
||||
* spawn() 里必须强制回流,否则新节点的初态与终态在同一帧被合并,
|
||||
* transition 不会触发,表现同样是"点了没反应"。
|
||||
*/
|
||||
---
|
||||
|
||||
<div
|
||||
id="wi-click-effect"
|
||||
hidden
|
||||
th:attr="data-effect=${theme.config?.style?.click_effect_type ?: 'values'},data-enabled=${theme.config?.style?.click_effect_enabled}"
|
||||
></div>
|
||||
|
||||
<script is:inline th:inline="none">
|
||||
(function () {
|
||||
var cfg = document.getElementById("wi-click-effect");
|
||||
if (!cfg) return;
|
||||
|
||||
if ((cfg.getAttribute("data-enabled") || "").trim() !== "true") return;
|
||||
|
||||
var effect = (cfg.getAttribute("data-effect") || "").trim();
|
||||
if (!effect) effect = "values";
|
||||
if (effect === "off") return;
|
||||
|
||||
/* 社会主义核心价值观 */
|
||||
var CORE_VALUES = [
|
||||
"富强", "民主", "文明", "和谐",
|
||||
"自由", "平等", "公正", "法治",
|
||||
"爱国", "敬业", "诚信", "友善"
|
||||
];
|
||||
|
||||
var RANDOM_COLORS = [
|
||||
"#ff6b6b", "#f06595", "#cc5de8", "#845ef7",
|
||||
"#5c7cfa", "#339af0", "#22b8cf", "#20c997",
|
||||
"#51cf66", "#94d82d", "#fcc419", "#ff922b"
|
||||
];
|
||||
|
||||
function pick(list) {
|
||||
return list[Math.floor(Math.random() * list.length)];
|
||||
}
|
||||
|
||||
/*
|
||||
* 特效层统一挂在 body 下:
|
||||
* .wi-main 自身是层叠上下文(z-index:1),留在里面会被导航栏/页脚遮住;
|
||||
* 同时该层 position:fixed 且铺满视口,内部 fixed 子元素的
|
||||
* left/top 仍等价于 clientX/clientY。
|
||||
*/
|
||||
var layer = document.createElement("div");
|
||||
layer.className = "wi-click-fx-layer";
|
||||
document.body.appendChild(layer);
|
||||
|
||||
/* 创建单个 DOM 元素并加入特效层,返回后即可设置终态样式 */
|
||||
function spawn(el, x, y) {
|
||||
el.style.left = x + "px";
|
||||
el.style.top = y + "px";
|
||||
layer.appendChild(el);
|
||||
/*
|
||||
* 强制回流:新插入的元素若在同一帧内被改写 transform/opacity,
|
||||
* 浏览器会把初态与终态合并,transition 不会触发 —— 表现为"没有任何效果"。
|
||||
*/
|
||||
void el.offsetWidth;
|
||||
return el;
|
||||
}
|
||||
|
||||
function removeLater(el, delay) {
|
||||
setTimeout(function () {
|
||||
if (el.parentNode) el.parentNode.removeChild(el);
|
||||
}, delay);
|
||||
}
|
||||
|
||||
/* ========== 1. 社会主义核心价值观 ========== */
|
||||
function spawnValueText(x, y) {
|
||||
var el = document.createElement("span");
|
||||
el.className = "wi-click-fx wi-click-fx--text";
|
||||
el.textContent = pick(CORE_VALUES);
|
||||
el.style.color = pick(RANDOM_COLORS);
|
||||
spawn(el, x, y);
|
||||
removeLater(el, 1300);
|
||||
}
|
||||
|
||||
/* ========== 2. 随机彩色爱心 ========== */
|
||||
function spawnHeart(x, y) {
|
||||
var el = document.createElement("span");
|
||||
el.className = "wi-click-fx wi-click-fx--heart";
|
||||
el.innerHTML = "❤";
|
||||
el.style.color = pick(RANDOM_COLORS);
|
||||
spawn(el, x, y);
|
||||
el.style.transform = "translate(calc(-50% + " + ((Math.random() - 0.5) * 80).toFixed(1) + "px), -90px) scale(0.3)";
|
||||
el.style.opacity = "0";
|
||||
removeLater(el, 1100);
|
||||
}
|
||||
|
||||
/* ========== 3. 烟花 ========== */
|
||||
function spawnFirework(x, y) {
|
||||
var count = 18;
|
||||
var color = pick(RANDOM_COLORS);
|
||||
for (var i = 0; i < count; i++) {
|
||||
var el = document.createElement("span");
|
||||
el.className = "wi-click-fx wi-click-fx--spark";
|
||||
el.style.background = color;
|
||||
el.style.boxShadow = "0 0 6px " + color;
|
||||
var angle = (Math.PI * 2 * i) / count;
|
||||
var dist = 40 + Math.random() * 34;
|
||||
spawn(el, x, y);
|
||||
el.style.transform = "translate(calc(-50% + " + (Math.cos(angle) * dist).toFixed(1) + "px), calc(-50% + " + (Math.sin(angle) * dist).toFixed(1) + "px)) scale(0)";
|
||||
el.style.opacity = "0";
|
||||
removeLater(el, 900);
|
||||
}
|
||||
}
|
||||
|
||||
/* ========== 4. 烟花波纹 ========== */
|
||||
function spawnRipple(x, y) {
|
||||
var color = pick(RANDOM_COLORS);
|
||||
for (var r = 0; r < 2; r++) {
|
||||
var el = document.createElement("span");
|
||||
el.className = "wi-click-fx wi-click-fx--ripple";
|
||||
el.style.borderColor = color;
|
||||
spawn(el, x, y);
|
||||
(function (el, delay) {
|
||||
setTimeout(function () {
|
||||
el.style.transform = "translate(-50%, -50%) scale(4)";
|
||||
el.style.opacity = "0";
|
||||
removeLater(el, 700);
|
||||
}, delay);
|
||||
})(el, r * 160);
|
||||
removeLater(el, 160 + 900);
|
||||
}
|
||||
}
|
||||
|
||||
/* ========== 5. 粒子 ========== */
|
||||
function spawnParticles(x, y, n) {
|
||||
n = n || 10;
|
||||
for (var i = 0; i < n; i++) {
|
||||
var el = document.createElement("span");
|
||||
el.className = "wi-click-fx wi-click-fx--particle";
|
||||
el.style.background = pick(RANDOM_COLORS);
|
||||
spawn(el, x, y);
|
||||
el.style.transform = "translate(calc(-50% + " + ((Math.random() - 0.5) * 60).toFixed(1) + "px), calc(-50% + " + ((Math.random() - 0.5) * 60 - 20).toFixed(1) + "px)) scale(0)";
|
||||
el.style.opacity = "0";
|
||||
removeLater(el, 800);
|
||||
}
|
||||
}
|
||||
|
||||
/* ========== 6. 星星 ========== */
|
||||
function spawnStar(x, y) {
|
||||
var el = document.createElement("span");
|
||||
el.className = "wi-click-fx wi-click-fx--star";
|
||||
el.innerHTML = "★";
|
||||
el.style.color = pick(RANDOM_COLORS);
|
||||
spawn(el, x, y);
|
||||
el.style.transform = "translate(calc(-50% + " + ((Math.random() - 0.5) * 50).toFixed(1) + "px), calc(-50% + " + ((Math.random() - 0.5) * 50 - 30).toFixed(1) + "px)) scale(1.6)";
|
||||
el.style.opacity = "0";
|
||||
removeLater(el, 900);
|
||||
}
|
||||
|
||||
/* 点击分发 */
|
||||
var clickHandlers = {
|
||||
"values": spawnValueText,
|
||||
"hearts": spawnHeart,
|
||||
"fireworks": spawnFirework,
|
||||
"ripples": spawnRipple,
|
||||
"particles": function (x, y) { spawnParticles(x, y, 10); },
|
||||
"stars": spawnStar
|
||||
};
|
||||
|
||||
/* 拖尾效果 */
|
||||
function spawnTrailStar(x, y) {
|
||||
var el = document.createElement("span");
|
||||
el.className = "wi-click-fx wi-click-fx--trail-star";
|
||||
el.innerHTML = "★";
|
||||
el.style.color = pick(RANDOM_COLORS);
|
||||
spawn(el, x, y);
|
||||
el.style.opacity = "0";
|
||||
removeLater(el, 700);
|
||||
}
|
||||
|
||||
function spawnTrailParticle(x, y) {
|
||||
var el = document.createElement("span");
|
||||
el.className = "wi-click-fx wi-click-fx--trail-particle";
|
||||
el.style.background = pick(RANDOM_COLORS);
|
||||
spawn(el, x, y);
|
||||
el.style.opacity = "0";
|
||||
removeLater(el, 600);
|
||||
}
|
||||
|
||||
var trailHandlers = {
|
||||
"star-trail": spawnTrailStar,
|
||||
"particle-trail": spawnTrailParticle
|
||||
};
|
||||
|
||||
var isTrail = effect.indexOf("trail") !== -1;
|
||||
|
||||
if (isTrail) {
|
||||
var handler = trailHandlers[effect];
|
||||
if (!handler) return;
|
||||
var lastX = 0;
|
||||
var lastY = 0;
|
||||
var throttling = false;
|
||||
document.addEventListener(
|
||||
"mousemove",
|
||||
function (e) {
|
||||
lastX = e.clientX;
|
||||
lastY = e.clientY;
|
||||
if (throttling) return;
|
||||
throttling = true;
|
||||
requestAnimationFrame(function () {
|
||||
throttling = false;
|
||||
handler(lastX, lastY);
|
||||
});
|
||||
},
|
||||
{ passive: true }
|
||||
);
|
||||
} else {
|
||||
var handler = clickHandlers[effect];
|
||||
if (!handler) return;
|
||||
document.addEventListener(
|
||||
"click",
|
||||
function (e) {
|
||||
handler(e.clientX, e.clientY);
|
||||
},
|
||||
{ passive: true }
|
||||
);
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
<style is:global>
|
||||
/* 特效层:铺满视口的固定层,统一承载所有点击/拖尾元素 */
|
||||
.wi-click-fx-layer {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 12050;
|
||||
pointer-events: none;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.wi-click-fx {
|
||||
position: fixed;
|
||||
pointer-events: none;
|
||||
will-change: transform, opacity;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.wi-click-fx--text {
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
transform: translate(-50%, -50%);
|
||||
animation: wi-fx-text 1.2s ease-out forwards;
|
||||
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
|
||||
}
|
||||
|
||||
.wi-click-fx--heart {
|
||||
font-size: 20px;
|
||||
opacity: 1;
|
||||
transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 1s ease-out;
|
||||
}
|
||||
|
||||
.wi-click-fx--spark {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
opacity: 1;
|
||||
transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease-out;
|
||||
}
|
||||
|
||||
.wi-click-fx--ripple {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border: 2px solid;
|
||||
border-radius: 50%;
|
||||
transform: translate(-50%, -50%) scale(0.5);
|
||||
opacity: 0.9;
|
||||
transition: transform 0.7s ease-out, opacity 0.7s ease-out;
|
||||
}
|
||||
|
||||
.wi-click-fx--particle {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
opacity: 1;
|
||||
transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.7s ease-out;
|
||||
}
|
||||
|
||||
.wi-click-fx--star {
|
||||
font-size: 16px;
|
||||
opacity: 1;
|
||||
transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease-out;
|
||||
}
|
||||
|
||||
.wi-click-fx--trail-star {
|
||||
font-size: 12px;
|
||||
transform: translate(-50%, -50%);
|
||||
opacity: 0.9;
|
||||
transition: opacity 0.6s ease-out, transform 0.6s ease-out;
|
||||
}
|
||||
|
||||
.wi-click-fx--trail-particle {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
opacity: 0.9;
|
||||
transition: opacity 0.5s ease-out, transform 0.5s ease-out;
|
||||
}
|
||||
|
||||
@keyframes wi-fx-text {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translate(-50%, -50%) scale(0.5);
|
||||
}
|
||||
20% {
|
||||
opacity: 1;
|
||||
transform: translate(-50%, -80%) scale(1.1);
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
transform: translate(-50%, -120%) scale(0.9);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,56 +0,0 @@
|
||||
---
|
||||
---
|
||||
|
||||
<div class="wi-cursor-glow" id="wi-cursor-glow"></div>
|
||||
|
||||
<script is:inline>
|
||||
(function(){
|
||||
var glowEl = document.getElementById("wi-cursor-glow");
|
||||
if (!glowEl) return;
|
||||
var rafId = 0;
|
||||
document.addEventListener("mousemove", function(e) {
|
||||
if (rafId) return;
|
||||
rafId = requestAnimationFrame(function() {
|
||||
glowEl.style.transform = "translate(calc(" + e.clientX + "px - 50%), calc(" + e.clientY + "px - 50%))";
|
||||
glowEl.classList.add("wi-cursor-glow--visible");
|
||||
rafId = 0;
|
||||
});
|
||||
}, { passive: true });
|
||||
document.addEventListener("mouseleave", function() {
|
||||
glowEl.classList.remove("wi-cursor-glow--visible");
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.wi-cursor-glow {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 400px;
|
||||
height: 400px;
|
||||
border-radius: 50%;
|
||||
background: radial-gradient(
|
||||
circle,
|
||||
rgba(212, 118, 78, 0.06) 0%,
|
||||
transparent 70%
|
||||
);
|
||||
pointer-events: none;
|
||||
z-index: 9999;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.wi-cursor-glow--visible {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
html.dark .wi-cursor-glow {
|
||||
background: radial-gradient(
|
||||
circle,
|
||||
rgba(232, 149, 95, 0.04) 0%,
|
||||
transparent 70%
|
||||
);
|
||||
}
|
||||
</style>
|
||||
@@ -8,7 +8,7 @@
|
||||
>
|
||||
<div class="wi-container">
|
||||
<div class="wi-section__header">
|
||||
<h2 class="wi-section__title" th:text="${theme.config?.home?.home_featured_title ?: #messages.msg('common.featured')}">精选</h2>
|
||||
<h2 class="wi-section__title" th:text="${theme.config?.home?.home_featured_title ?: '精选'}">精选</h2>
|
||||
</div>
|
||||
<div class="wi-featured">
|
||||
<a
|
||||
@@ -32,7 +32,7 @@
|
||||
<span
|
||||
class="wi-featured__pinned"
|
||||
th:if="${post.spec.pinned}"
|
||||
th:text="#{hero.pinned}">Pinned</span>
|
||||
th:text="'置顶'">置顶</span>
|
||||
</div>
|
||||
<h3
|
||||
class="wi-featured__title"
|
||||
|
||||
+107
-6
@@ -1,19 +1,42 @@
|
||||
---
|
||||
const THEME_VERSION = "1.0.0";
|
||||
const today = new Date();
|
||||
import { readFileSync } from "node:fs";
|
||||
import { resolve } from "node:path";
|
||||
|
||||
// 版本号直接读取 theme.yaml,避免与包版本不同步
|
||||
function readThemeVersion() {
|
||||
try {
|
||||
const yaml = readFileSync(resolve(process.cwd(), "theme.yaml"), "utf-8");
|
||||
return yaml.match(/^\s*version:\s*"?([^"\s]+)"?/m)?.[1] ?? "";
|
||||
} catch {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
const THEME_VERSION = readThemeVersion();
|
||||
---
|
||||
|
||||
<footer th:with="showPowered=${theme.config?.footer?.footer_show_powered != false}, showTheme=${theme.config?.footer?.footer_show_theme != false}, hideRight=${showPowered == false and showTheme == false}">
|
||||
<footer
|
||||
th:with="showPowered=${theme.config?.footer?.footer_show_powered != false}, showTheme=${theme.config?.footer?.footer_show_theme != false}, hideRight=${showPowered == false and showTheme == false}, icpText=${theme.config?.footer?.footer_icp}, mpsText=${theme.config?.footer?.footer_mps}, showIcp=${theme.config?.footer?.footer_show_icp == true and not #strings.isEmpty(#strings.trim(icpText ?: ''))}, showMps=${theme.config?.footer?.footer_show_mps == true and not #strings.isEmpty(#strings.trim(mpsText ?: ''))}"
|
||||
>
|
||||
<div class="footer-inner">
|
||||
<div class="footer-bottom" th:classappend="${hideRight} ? 'footer-bottom--center' : ''">
|
||||
<div class="footer-bottom__left">
|
||||
<span class="footer-copyright" th:if="${theme.config?.footer?.footer_copyright}" th:text="${theme.config?.footer?.footer_copyright}"></span>
|
||||
<span class="footer-copyright" th:unless="${theme.config?.footer?.footer_copyright}">
|
||||
© {today.getFullYear()}
|
||||
© <th:block th:text="${#dates.format(#dates.createNow(), 'yyyy')}">2026</th:block>
|
||||
<th:block th:text="${theme.config?.basic?.owner_name ?: site.title}"></th:block>
|
||||
</span>
|
||||
<span class="footer-icp" th:if="${theme.config?.footer?.footer_icp}">
|
||||
<a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener noreferrer" th:text="${theme.config?.footer?.footer_icp}"></a>
|
||||
<span class="footer-icp" th:if="${showIcp}">
|
||||
<a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener noreferrer" th:text="${#strings.trim(icpText)}"></a>
|
||||
</span>
|
||||
<span class="footer-mps" th:if="${showMps}" th:with="mpsUrl=${theme.config?.footer?.footer_mps_url ?: 'https://beian.mps.gov.cn/'}">
|
||||
<a th:href="${mpsUrl}" target="_blank" rel="noopener noreferrer">
|
||||
<svg class="footer-mps__icon" xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
|
||||
<path d="M12 2L2 7v6c0 5.5 3.8 10.7 10 12 6.2-1.3 10-6.5 10-12V7l-10-5z"></path>
|
||||
<path d="M9.5 12.5l2 2 3.5-4" stroke="#fff" stroke-width="1.8" fill="none" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
<span th:text="${#strings.trim(mpsText)}"></span>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="footer-socials" th:if="${theme.config?.footer?.footer_socials}">
|
||||
@@ -34,6 +57,39 @@ const today = new Date();
|
||||
<span th:if="${showTheme}">WarmIsland v{THEME_VERSION}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="footer-stats"
|
||||
th:if="${theme.config?.footer?.footer_show_stats != false}"
|
||||
th:with="stats=${siteStatsFinder.getStats()}, items=${theme.config?.footer?.footer_stats_items ?: {'post','category','comment','visit'}}"
|
||||
>
|
||||
<span class="footer-stat" th:if="${#lists.contains(items, 'post')}">
|
||||
<span class="footer-stat__value" th:text="${stats.post ?: 0}">0</span>
|
||||
<span class="footer-stat__label">文章</span>
|
||||
</span>
|
||||
<span class="footer-stat" th:if="${#lists.contains(items, 'category')}">
|
||||
<span class="footer-stat__value" th:text="${stats.category ?: 0}">0</span>
|
||||
<span class="footer-stat__label">分类</span>
|
||||
</span>
|
||||
<span class="footer-stat" th:if="${#lists.contains(items, 'comment')}">
|
||||
<span class="footer-stat__value" th:text="${stats.comment ?: 0}">0</span>
|
||||
<span class="footer-stat__label">评论</span>
|
||||
</span>
|
||||
<span class="footer-stat" th:if="${#lists.contains(items, 'visit')}">
|
||||
<span class="footer-stat__value" th:text="${stats.visit ?: 0}">0</span>
|
||||
<span class="footer-stat__label">访问</span>
|
||||
</span>
|
||||
<span class="footer-stat" th:if="${#lists.contains(items, 'upvote')}">
|
||||
<span class="footer-stat__value" th:text="${stats.upvote ?: 0}">0</span>
|
||||
<span class="footer-stat__label">点赞</span>
|
||||
</span>
|
||||
<span
|
||||
class="footer-stat"
|
||||
th:if="${#lists.contains(items, 'word') and pluginFinder.available('extra-api')}"
|
||||
>
|
||||
<span class="footer-stat__value" th:text="${extraApiStatsFinder.getPostWordCount()}">0</span>
|
||||
<span class="footer-stat__label">字数</span>
|
||||
</span>
|
||||
</div>
|
||||
<div th:if="${theme.config?.footer?.footer_custom_html}" th:utext="${theme.config?.footer?.footer_custom_html}" class="footer-custom"></div>
|
||||
<div class="footer-injected">
|
||||
<halo:footer />
|
||||
@@ -104,6 +160,51 @@ const today = new Date();
|
||||
color: var(--ink-2);
|
||||
}
|
||||
|
||||
.footer-mps a {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.3rem;
|
||||
color: var(--ink-3);
|
||||
text-decoration: none;
|
||||
transition: color 0.15s ease;
|
||||
}
|
||||
|
||||
.footer-mps a:hover {
|
||||
color: var(--ink-2);
|
||||
}
|
||||
|
||||
.footer-mps__icon {
|
||||
flex: none;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.footer-stats {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem 1.25rem;
|
||||
width: 100%;
|
||||
font-size: 0.8rem;
|
||||
color: var(--ink-3);
|
||||
}
|
||||
|
||||
.footer-stat {
|
||||
display: inline-flex;
|
||||
align-items: baseline;
|
||||
gap: 0.3rem;
|
||||
}
|
||||
|
||||
.footer-stat__value {
|
||||
font-weight: 600;
|
||||
color: var(--ink-2);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.footer-stat__label {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.footer-socials {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
---
|
||||
---
|
||||
|
||||
<style is:inline th:if="${theme.config?.hero?.hero_title_color_light != null and theme.config?.hero?.hero_title_color_light != ''}" th:utext="${' :root { --hero-title-text: ' + theme.config?.hero?.hero_title_color_light + '; } '}">/*hero-title-light*/</style>
|
||||
<style is:inline th:if="${theme.config?.hero?.hero_title_color_dark != null and theme.config?.hero?.hero_title_color_dark != ''}" th:utext="${' html.dark { --hero-title-text: ' + theme.config?.hero?.hero_title_color_dark + '; } '}">/*hero-title-dark*/</style>
|
||||
<style is:inline th:if="${theme.config?.hero?.hero_subtitle_color_light != null and theme.config?.hero?.hero_subtitle_color_light != ''}" th:utext="${' :root { --hero-subtitle-text: ' + theme.config?.hero?.hero_subtitle_color_light + '; } '}">/*hero-subtitle-light*/</style>
|
||||
<style is:inline th:if="${theme.config?.hero?.hero_subtitle_color_dark != null and theme.config?.hero?.hero_subtitle_color_dark != ''}" th:utext="${' html.dark { --hero-subtitle-text: ' + theme.config?.hero?.hero_subtitle_color_dark + '; } '}">/*hero-subtitle-dark*/</style>
|
||||
<style is:inline th:if="${theme.config?.hero?.hero_quote_color_light != null and theme.config?.hero?.hero_quote_color_light != ''}" th:utext="${' :root { --hero-quote-text: ' + theme.config?.hero?.hero_quote_color_light + '; } '}">/*hero-quote-light*/</style>
|
||||
<style is:inline th:if="${theme.config?.hero?.hero_quote_color_dark != null and theme.config?.hero?.hero_quote_color_dark != ''}" th:utext="${' html.dark { --hero-quote-text: ' + theme.config?.hero?.hero_quote_color_dark + '; } '}">/*hero-quote-dark*/</style>
|
||||
|
||||
<section
|
||||
class="hero"
|
||||
id="wi-hero"
|
||||
th:if="${theme.config?.hero?.hero_enabled != false}"
|
||||
th:classappend="${theme.config?.animation?.animation_breath == false} ? 'hero--no-breath'"
|
||||
th:classappend="${(theme.config?.animation?.animation_breath == false ? 'hero--no-breath ' : '') + 'hero--fx-' + (theme.config?.hero?.hero_text_effect ?: 'none')}"
|
||||
>
|
||||
<div class="hero__bg">
|
||||
<div class="hero__orb hero__orb--1"></div>
|
||||
@@ -13,9 +20,24 @@
|
||||
<div class="hero__orb hero__orb--3"></div>
|
||||
<div
|
||||
class="hero__bg-image"
|
||||
th:if="${theme.config?.hero?.hero_background_image}"
|
||||
th:if="${!#strings.isEmpty(theme.config?.hero?.hero_background_image) and #strings.isEmpty(theme.config?.hero?.hero_background_image_dark)}"
|
||||
th:style="'background-image: url(' + ${theme.config?.hero?.hero_background_image} + ')'"
|
||||
></div>
|
||||
<div
|
||||
class="hero__bg-image"
|
||||
th:if="${#strings.isEmpty(theme.config?.hero?.hero_background_image) and !#strings.isEmpty(theme.config?.hero?.hero_background_image_dark)}"
|
||||
th:style="'background-image: url(' + ${theme.config?.hero?.hero_background_image_dark} + ')'"
|
||||
></div>
|
||||
<div
|
||||
class="hero__bg-image hero__bg-image--light"
|
||||
th:if="${!#strings.isEmpty(theme.config?.hero?.hero_background_image) and !#strings.isEmpty(theme.config?.hero?.hero_background_image_dark)}"
|
||||
th:style="'background-image: url(' + ${theme.config?.hero?.hero_background_image} + ')'"
|
||||
></div>
|
||||
<div
|
||||
class="hero__bg-image hero__bg-image--dark"
|
||||
th:if="${!#strings.isEmpty(theme.config?.hero?.hero_background_image) and !#strings.isEmpty(theme.config?.hero?.hero_background_image_dark)}"
|
||||
th:style="'background-image: url(' + ${theme.config?.hero?.hero_background_image_dark} + ')'"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<div class="hero__blur-overlay" id="wi-hero-blur-overlay"></div>
|
||||
@@ -37,7 +59,7 @@
|
||||
class="hero__description"
|
||||
th:if="${theme.config?.hero?.hero_description_mode == 'hitokoto'}"
|
||||
id="wi-hitokoto"
|
||||
th:attr="data-api=${theme.config?.hero?.hero_hitokoto_api ?: 'https://v1.hitokoto.cn/'},data-categories=${theme.config?.hero?.hero_hitokoto_categories}"
|
||||
th:attr="data-api=${theme.config?.hero?.hero_hitokoto_api ?: 'https://v1.hitokoto.cn/'},data-categories=${theme.config?.hero?.hero_hitokoto_categories},data-auto-refresh=${theme.config?.hero?.hero_hitokoto_auto_refresh == true ? 'true' : 'false'},data-refresh-interval=${theme.config?.hero?.hero_hitokoto_refresh_interval ?: 10000}"
|
||||
></p>
|
||||
<p
|
||||
class="hero__description"
|
||||
@@ -46,7 +68,12 @@
|
||||
></p>
|
||||
</div>
|
||||
|
||||
<div class="hero__scroll-indicator" id="wi-hero-scroll-indicator" aria-hidden="true">
|
||||
<button
|
||||
class="hero__scroll-indicator"
|
||||
id="wi-hero-scroll-indicator"
|
||||
type="button"
|
||||
aria-label="向下浏览"
|
||||
>
|
||||
<svg
|
||||
width="24"
|
||||
height="24"
|
||||
@@ -56,53 +83,113 @@
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<polyline points="6 9 12 15 18 9"></polyline>
|
||||
</svg>
|
||||
</div>
|
||||
</button>
|
||||
</section>
|
||||
|
||||
<script is:inline>
|
||||
<script is:inline th:inline="none">
|
||||
/* Hero 下滑箭头:平滑滚动到首屏内容区 */
|
||||
(function () {
|
||||
var indicator = document.getElementById("wi-hero-scroll-indicator");
|
||||
if (!indicator) return;
|
||||
|
||||
indicator.addEventListener("click", function () {
|
||||
var content = document.querySelector(".wi-home-content");
|
||||
var hero = document.getElementById("wi-hero");
|
||||
var top;
|
||||
|
||||
if (content) {
|
||||
/* 与首页滚动吸附逻辑保持一致:内容区顶部对齐视口顶部,完全盖住固定背景的 Hero */
|
||||
top = content.getBoundingClientRect().top + window.pageYOffset;
|
||||
} else if (hero) {
|
||||
top = hero.offsetTop + hero.offsetHeight;
|
||||
} else {
|
||||
top = window.innerHeight;
|
||||
}
|
||||
|
||||
var reduce =
|
||||
window.matchMedia &&
|
||||
window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
||||
|
||||
window.scrollTo({
|
||||
top: Math.max(0, top),
|
||||
behavior: reduce ? "auto" : "smooth",
|
||||
});
|
||||
});
|
||||
})();
|
||||
|
||||
(function () {
|
||||
var el = document.getElementById("wi-hitokoto");
|
||||
if (!el) return;
|
||||
|
||||
var api = el.getAttribute("data-api") || "https://v1.hitokoto.cn/";
|
||||
var categories = el.getAttribute("data-categories");
|
||||
var url = api + "?encode=json";
|
||||
var autoRefresh = el.getAttribute("data-auto-refresh") === "true";
|
||||
var refreshInterval = parseInt(el.getAttribute("data-refresh-interval"), 10) || 10000;
|
||||
|
||||
if (categories) {
|
||||
try {
|
||||
var cats = JSON.parse(categories);
|
||||
if (Array.isArray(cats)) {
|
||||
cats.forEach(function (c) {
|
||||
url += "&c=" + encodeURIComponent(c);
|
||||
});
|
||||
}
|
||||
} catch (e) {}
|
||||
function buildUrl() {
|
||||
var url = api + "?encode=json";
|
||||
if (categories) {
|
||||
try {
|
||||
var cats = JSON.parse(categories);
|
||||
if (Array.isArray(cats)) {
|
||||
cats.forEach(function (c) {
|
||||
url += "&c=" + encodeURIComponent(c);
|
||||
});
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
el.style.opacity = "0.5";
|
||||
el.textContent = "\u2026";
|
||||
function load(initial) {
|
||||
if (initial) {
|
||||
el.style.opacity = "0.5";
|
||||
el.textContent = "\u2026";
|
||||
}
|
||||
|
||||
fetch(url)
|
||||
.then(function (res) {
|
||||
if (!res.ok) throw new Error("HTTP " + res.status);
|
||||
return res.json();
|
||||
})
|
||||
.then(function (data) {
|
||||
el.style.opacity = "1";
|
||||
var text = data.hitokoto || "";
|
||||
var from = data.from || data.from_who || "";
|
||||
if (from) {
|
||||
text += " \u2014\u2014 " + from;
|
||||
}
|
||||
el.textContent = text;
|
||||
})
|
||||
.catch(function () {
|
||||
el.style.opacity = "1";
|
||||
el.textContent = "";
|
||||
});
|
||||
return fetch(buildUrl())
|
||||
.then(function (res) {
|
||||
if (!res.ok) throw new Error("HTTP " + res.status);
|
||||
return res.json();
|
||||
})
|
||||
.then(function (data) {
|
||||
var text = data.hitokoto || "";
|
||||
var from = data.from || data.from_who || "";
|
||||
if (from) {
|
||||
text += " \u2014\u2014 " + from;
|
||||
}
|
||||
|
||||
if (initial) {
|
||||
el.style.opacity = "1";
|
||||
el.textContent = text;
|
||||
} else {
|
||||
/* 自动刷新:淡出 → 换文案 → 淡入,避免生硬跳变 */
|
||||
el.style.opacity = "0";
|
||||
setTimeout(function () {
|
||||
el.textContent = text;
|
||||
el.style.opacity = "1";
|
||||
}, 280);
|
||||
}
|
||||
})
|
||||
.catch(function () {
|
||||
// 失败时恢复可见:首次为空,刷新时保留原文案
|
||||
el.style.opacity = "1";
|
||||
if (initial) el.textContent = "";
|
||||
});
|
||||
}
|
||||
|
||||
load(true);
|
||||
|
||||
// 自动刷新:仅在开启且间隔不小于 3 秒时启用,避免请求过于频繁
|
||||
if (autoRefresh && refreshInterval >= 3000) {
|
||||
setInterval(function () {
|
||||
load(false);
|
||||
}, refreshInterval);
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
@@ -196,7 +283,17 @@
|
||||
inset: 0;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
opacity: 0.15;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* 深色模式背景图切换:未配置双图时不生效,保持单一背景图 */
|
||||
.hero__bg-image--dark,
|
||||
html.dark .hero__bg-image--light {
|
||||
display: none;
|
||||
}
|
||||
|
||||
html.dark .hero__bg-image--dark {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.hero__content {
|
||||
@@ -216,36 +313,134 @@
|
||||
font-size: clamp(3rem, 8vw, 6rem);
|
||||
font-weight: 700;
|
||||
letter-spacing: -0.03em;
|
||||
color: var(--ink);
|
||||
color: var(--hero-title-text, var(--ink));
|
||||
line-height: var(--leading-tight);
|
||||
}
|
||||
|
||||
.hero__subtitle {
|
||||
font-family: var(--font-body);
|
||||
font-size: var(--text-xl);
|
||||
color: var(--ink-2);
|
||||
color: var(--hero-subtitle-text, var(--ink-2));
|
||||
letter-spacing: 0.05em;
|
||||
line-height: var(--leading-normal);
|
||||
}
|
||||
|
||||
.hero__description {
|
||||
font-size: var(--text-lg);
|
||||
color: var(--ink-2);
|
||||
color: var(--hero-quote-text, var(--ink-2));
|
||||
line-height: var(--leading-relaxed);
|
||||
max-width: 560px;
|
||||
text-align: center;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
/* ===== 文字显示效果(后台「Hero 首屏 → 文字显示效果」,默认 none 无任何附加效果) ===== */
|
||||
.hero--fx-shadow .hero__title,
|
||||
.hero--fx-shadow .hero__subtitle,
|
||||
.hero--fx-shadow .hero__description {
|
||||
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22), 0 2px 10px rgba(0, 0, 0, 0.16);
|
||||
}
|
||||
|
||||
html.dark .hero--fx-shadow .hero__title,
|
||||
html.dark .hero--fx-shadow .hero__subtitle,
|
||||
html.dark .hero--fx-shadow .hero__description {
|
||||
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6), 0 2px 12px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.hero--fx-glow .hero__title,
|
||||
.hero--fx-glow .hero__subtitle,
|
||||
.hero--fx-glow .hero__description {
|
||||
text-shadow: 0 0 10px rgba(255, 255, 255, 0.85), 0 0 26px rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
html.dark .hero--fx-glow .hero__title,
|
||||
html.dark .hero--fx-glow .hero__subtitle,
|
||||
html.dark .hero--fx-glow .hero__description {
|
||||
text-shadow: 0 0 8px rgba(255, 255, 255, 0.45), 0 0 24px rgba(255, 255, 255, 0.22);
|
||||
}
|
||||
|
||||
/* 半透明遮罩层:文字背后垫一块毛玻璃衬底 */
|
||||
.hero--fx-scrim .hero__content {
|
||||
background: rgba(255, 255, 255, 0.45);
|
||||
backdrop-filter: blur(10px);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
border-radius: 24px;
|
||||
padding: var(--space-2xl);
|
||||
}
|
||||
|
||||
html.dark .hero--fx-scrim .hero__content {
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
/* 渐变遮罩:斜向渐变衬底 */
|
||||
.hero--fx-gradient .hero__content {
|
||||
background: linear-gradient(
|
||||
135deg,
|
||||
rgba(255, 255, 255, 0.55) 0%,
|
||||
rgba(255, 255, 255, 0.18) 100%
|
||||
);
|
||||
border-radius: 24px;
|
||||
padding: var(--space-2xl);
|
||||
}
|
||||
|
||||
html.dark .hero--fx-gradient .hero__content {
|
||||
background: linear-gradient(
|
||||
135deg,
|
||||
rgba(0, 0, 0, 0.5) 0%,
|
||||
rgba(0, 0, 0, 0.16) 100%
|
||||
);
|
||||
}
|
||||
|
||||
/* 容器:半透明边框圆角矩形 + 更大留白,把文字"装"进设计好的容器里 */
|
||||
.hero--fx-frame .hero__content {
|
||||
border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
|
||||
background: color-mix(in srgb, var(--bg) 30%, transparent);
|
||||
border-radius: 24px;
|
||||
padding: var(--space-2xl) var(--space-3xl);
|
||||
gap: var(--space-xl);
|
||||
}
|
||||
|
||||
html.dark .hero--fx-frame .hero__content {
|
||||
border-color: color-mix(in srgb, #ffffff 32%, transparent);
|
||||
}
|
||||
|
||||
.hero--fx-frame .hero__title {
|
||||
letter-spacing: 0.08em;
|
||||
}
|
||||
|
||||
.hero--fx-frame .hero__subtitle {
|
||||
letter-spacing: 0.22em;
|
||||
}
|
||||
|
||||
.hero__scroll-indicator {
|
||||
position: absolute;
|
||||
bottom: 2rem;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
z-index: 2;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
padding: 0;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
background: transparent;
|
||||
color: var(--ink-3);
|
||||
cursor: pointer;
|
||||
animation: scrollHint 2s ease-in-out infinite;
|
||||
transition: opacity 0.4s ease;
|
||||
transition: opacity 0.4s ease, color 0.2s ease, background 0.2s ease;
|
||||
}
|
||||
|
||||
.hero__scroll-indicator:hover {
|
||||
color: var(--accent);
|
||||
background: color-mix(in srgb, var(--accent) 10%, transparent);
|
||||
}
|
||||
|
||||
.hero__scroll-indicator:focus-visible {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.hero--no-breath .hero__orb {
|
||||
@@ -310,6 +505,16 @@
|
||||
gap: var(--space-md);
|
||||
}
|
||||
|
||||
.hero--fx-scrim .hero__content,
|
||||
.hero--fx-gradient .hero__content {
|
||||
padding: var(--space-xl) var(--space-lg);
|
||||
}
|
||||
|
||||
.hero--fx-frame .hero__content {
|
||||
padding: var(--space-xl) var(--space-lg);
|
||||
gap: var(--space-lg);
|
||||
}
|
||||
|
||||
.hero__description {
|
||||
max-width: 90vw;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
>
|
||||
<div class="wi-container">
|
||||
<div class="wi-section__header">
|
||||
<h2 class="wi-section__title" th:text="${theme.config?.home?.home_latest_title ?: #messages.msg('common.latestPosts')}">Latest Posts</h2>
|
||||
<h2 class="wi-section__title" th:text="${theme.config?.home?.home_latest_title ?: '最新文章'}">最新文章</h2>
|
||||
</div>
|
||||
<div
|
||||
class="wi-latest"
|
||||
@@ -58,7 +58,7 @@
|
||||
th:if="${posts.hasPrevious()}"
|
||||
th:href="@{${posts.prevUrl}}"
|
||||
class="wi-pagination__prev"
|
||||
th:text="${theme.config?.home?.home_label_newer ?: #messages.msg('common.newer')}"
|
||||
th:text="${theme.config?.home?.home_label_newer ?: '较新'}"
|
||||
>← Newer</a>
|
||||
<span
|
||||
class="wi-pagination__info"
|
||||
@@ -68,7 +68,7 @@
|
||||
th:if="${posts.hasNext()}"
|
||||
th:href="@{${posts.nextUrl}}"
|
||||
class="wi-pagination__next"
|
||||
th:text="${theme.config?.home?.home_label_older ?: #messages.msg('common.older')}"
|
||||
th:text="${theme.config?.home?.home_label_older ?: '较旧'}"
|
||||
>Older →</a>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@@ -236,24 +236,17 @@
|
||||
}
|
||||
|
||||
function processMomentsMedia(container) {
|
||||
// 注意:不要用 <a> 包裹瞬间图片。九宫格布局依赖
|
||||
// .wi-moments-page__card-media 的直接子元素数量(:has/:nth-child/:only-child),
|
||||
// 每张图各自包一层 <a> 后,img 永远是「唯一子元素」,全部图片都会退化成单列大图。
|
||||
// 直接把 img 本身作为 lightgallery 项即可(data-src 提供原图)。
|
||||
var images = container.querySelectorAll('img');
|
||||
images.forEach(function(img) {
|
||||
var src = img.getAttribute('src');
|
||||
if (!src) return;
|
||||
|
||||
var parentA = img.closest('a');
|
||||
if (parentA) {
|
||||
parentA.classList.add('wi-lightgallery-item');
|
||||
if (!parentA.getAttribute('data-src')) {
|
||||
parentA.setAttribute('data-src', src);
|
||||
}
|
||||
} else {
|
||||
var a = document.createElement('a');
|
||||
a.setAttribute('href', src);
|
||||
a.setAttribute('data-src', src);
|
||||
a.classList.add('wi-lightgallery-item');
|
||||
img.parentNode.insertBefore(a, img);
|
||||
a.appendChild(img);
|
||||
img.classList.add('wi-lightgallery-item');
|
||||
if (!img.getAttribute('data-src')) {
|
||||
img.setAttribute('data-src', src);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
>
|
||||
<div class="wi-container">
|
||||
<div class="wi-section__header">
|
||||
<h2 class="wi-section__title" th:text="${theme.config?.home?.home_message_wall_title ?: #messages.msg('messageboard.title')}">留言墙</h2>
|
||||
<h2 class="wi-section__title" th:text="${theme.config?.home?.home_message_wall_title ?: '留言板'}">留言墙</h2>
|
||||
<span class="wi-section__accent"></span>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -21,6 +21,16 @@
|
||||
class="wi-mobile-menu__link"
|
||||
th:data-href="${menuItem.status.href}"
|
||||
></a>
|
||||
<th:block th:if="${not #lists.isEmpty(menuItem.children)}">
|
||||
<a
|
||||
th:each="child : ${menuItem.children}"
|
||||
th:href="@{${child.status.href}}"
|
||||
th:target="${child.spec?.target?.value == '_blank'} ? '_blank' : '_self'"
|
||||
th:text="${'| ' + child.status.displayName}"
|
||||
class="wi-mobile-menu__link wi-mobile-menu__link--sub"
|
||||
th:data-href="${child.status.href}"
|
||||
></a>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</th:block>
|
||||
@@ -35,19 +45,19 @@
|
||||
onclick="SearchWidget.open()"
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>
|
||||
<span th:text="${theme.config?.basic?.label_search ?: #messages.msg('common.search')}">Search</span>
|
||||
<span th:text="${theme.config?.basic?.label_search ?: '搜索'}">搜索</span>
|
||||
</button>
|
||||
|
||||
<button class="wi-mobile-menu__action-btn wi-mobile-menu__theme-btn" type="button" aria-label="Toggle theme">
|
||||
<svg class="wi-mobile-menu__icon-moon" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"/></svg>
|
||||
<svg class="wi-mobile-menu__icon-sun" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="m4.93 4.93 1.41 1.41"/><path d="m17.66 17.66 1.41 1.41"/><path d="M2 12h2"/><path d="M20 12h2"/><path d="m6.34 17.66-1.41 1.41"/><path d="m19.07 4.93-1.41 1.41"/></svg>
|
||||
<span class="wi-mobile-menu__theme-label" th:text="${theme.config?.basic?.label_theme_switch ?: #messages.msg('common.themeSwitch')}">Switch Theme</span>
|
||||
<span class="wi-mobile-menu__theme-label" th:text="${theme.config?.basic?.label_theme_switch ?: '切换主题'}">切换主题</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script is:inline>
|
||||
<script is:inline th:inline="none">
|
||||
const menu = document.getElementById("wi-mobile-menu");
|
||||
const backdrop = menu?.querySelector(".wi-mobile-menu__backdrop");
|
||||
const closeBtn = menu?.querySelector(".wi-mobile-menu__close");
|
||||
@@ -213,6 +223,14 @@
|
||||
background var(--duration-fast) var(--ease-out-quart);
|
||||
}
|
||||
|
||||
/* 二级菜单项:缩进 + 弱化,与一级项区分 */
|
||||
.wi-mobile-menu__link--sub {
|
||||
padding-left: 2rem;
|
||||
font-size: var(--text-base);
|
||||
font-weight: 400;
|
||||
color: var(--ink-3);
|
||||
}
|
||||
|
||||
.wi-mobile-menu__link:hover {
|
||||
color: var(--accent);
|
||||
background: var(--bg-raised);
|
||||
|
||||
@@ -9,7 +9,7 @@ const pageConfig = findPageBySlug("moments");
|
||||
<th:block th:if="${pluginFinder.available('PluginMoments')}">
|
||||
<section class="wi-moments-section">
|
||||
<div class="wi-container">
|
||||
<h2 class="wi-moments-section__title" th:text="${pageConfig?.title ?: theme.config?.moments?.moments_title ?: #messages.msg('moments.title')}">瞬间</h2>
|
||||
<h2 class="wi-moments-section__title" th:text="${pageConfig?.title ?: theme.config?.moments?.moments_title ?: '动态'}">瞬间</h2>
|
||||
<div
|
||||
class="wi-moments-section__list"
|
||||
th:attr="data-style=${theme.config?.moments?.moments_style ?: 'timeline'}"
|
||||
@@ -29,7 +29,7 @@ const pageConfig = findPageBySlug("moments");
|
||||
</th:block>
|
||||
</div>
|
||||
<a th:href="@{'/moments'}" class="wi-moments-section__more">
|
||||
<span th:text="${theme.config?.home?.home_label_view_all ?: #messages.msg('common.viewAll')}">查看全部</span>
|
||||
<span th:text="${theme.config?.home?.home_label_view_all ?: '查看全部'}">查看全部</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M5 12h14M12 5l7 7-7 7"/>
|
||||
</svg>
|
||||
|
||||
+133
-16
@@ -4,18 +4,22 @@ import ThemeSwitcher from "./ThemeSwitcher.astro";
|
||||
|
||||
<header class="wi-navbar-wrapper" id="wi-navbar" th:classappend="${theme.config?.navbar?.navbar_style == 'minimal'} ? 'wi-navbar--minimal' : (${theme.config?.navbar?.navbar_style == 'float'} ? 'wi-navbar--float' : 'wi-navbar--glass')">
|
||||
<div class="wi-navbar__capsule">
|
||||
<a class="wi-navbar__brand" th:href="@{/}">
|
||||
<a
|
||||
class="wi-navbar__brand"
|
||||
th:href="@{/}"
|
||||
th:with="brandType=${theme.config?.navbar?.navbar_brand_type}, logoUrl=${!#strings.isEmpty(theme.config?.navbar?.navbar_logo) ? theme.config?.navbar?.navbar_logo : theme.config?.basic?.logo}, logoRadius=${theme.config?.navbar?.navbar_logo_radius}"
|
||||
>
|
||||
<img
|
||||
th:if="${theme.config?.basic?.logo}"
|
||||
th:src="${theme.config?.basic?.logo}"
|
||||
th:if="${brandType == 'logo' and !#strings.isEmpty(logoUrl)}"
|
||||
th:src="${logoUrl}"
|
||||
alt=""
|
||||
class="wi-navbar__logo"
|
||||
th:class="${'wi-navbar__logo wi-navbar__logo--' + (logoRadius != null ? logoRadius : 'rounded')}"
|
||||
loading="eager"
|
||||
decoding="async"
|
||||
onerror="this.style.display='none';this.nextElementSibling&&this.nextElementSibling.classList.add('wi-navbar__title')"
|
||||
onerror="this.style.display='none'"
|
||||
/>
|
||||
<span
|
||||
th:if="${#strings.isEmpty(theme.config?.basic?.logo)}"
|
||||
th:if="${brandType != 'logo' or #strings.isEmpty(logoUrl)}"
|
||||
class="wi-navbar__title"
|
||||
th:text="${site.title}"
|
||||
></span>
|
||||
@@ -28,15 +32,34 @@ import ThemeSwitcher from "./ThemeSwitcher.astro";
|
||||
<th:block th:if="${menuFinder != null}">
|
||||
<th:block th:with="menu = ${menuFinder.getPrimary()}">
|
||||
<th:block th:if="${menu != null and menu.menuItems != null and not #lists.isEmpty(menu.menuItems)}">
|
||||
<a
|
||||
<div
|
||||
th:each="menuItem : ${menu.menuItems}"
|
||||
th:href="@{${menuItem.status.href}}"
|
||||
th:target="${menuItem.spec?.target?.value == '_blank'} ? '_blank' : '_self'"
|
||||
th:text="${menuItem.status.displayName}"
|
||||
class="wi-navbar__link"
|
||||
th:data-href="${menuItem.status.href}"
|
||||
class="wi-navbar__item"
|
||||
th:classappend="${not #lists.isEmpty(menuItem.children)} ? 'wi-navbar__item--has-children'"
|
||||
>
|
||||
</a>
|
||||
<a
|
||||
th:href="@{${menuItem.status.href}}"
|
||||
th:target="${menuItem.spec?.target?.value == '_blank'} ? '_blank' : '_self'"
|
||||
th:text="${menuItem.status.displayName}"
|
||||
class="wi-navbar__link"
|
||||
th:data-href="${menuItem.status.href}"
|
||||
th:aria-haspopup="${not #lists.isEmpty(menuItem.children)} ? 'true' : null"
|
||||
>
|
||||
</a>
|
||||
<div
|
||||
class="wi-navbar__submenu"
|
||||
th:if="${not #lists.isEmpty(menuItem.children)}"
|
||||
>
|
||||
<a
|
||||
th:each="child : ${menuItem.children}"
|
||||
th:href="@{${child.status.href}}"
|
||||
th:target="${child.spec?.target?.value == '_blank'} ? '_blank' : '_self'"
|
||||
th:text="${child.status.displayName}"
|
||||
class="wi-navbar__submenu-link"
|
||||
>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</th:block>
|
||||
@@ -47,14 +70,14 @@ import ThemeSwitcher from "./ThemeSwitcher.astro";
|
||||
th:if="${pluginFinder.available('PluginSearchWidget') and theme.config?.navbar?.navbar_show_search != false}"
|
||||
class="wi-navbar__action-btn wi-navbar__search-btn"
|
||||
type="button"
|
||||
th:aria-label="${theme.config?.basic?.label_search ?: #messages.msg('common.search')}"
|
||||
th:aria-label="${theme.config?.basic?.label_search ?: '搜索'}"
|
||||
onclick="SearchWidget.open()"
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>
|
||||
</button>
|
||||
|
||||
<th:block th:if="${theme.config?.navbar?.navbar_show_theme_switch != false}">
|
||||
<span th:attr="data-label=${theme.config?.basic?.label_theme_switch ?: #messages.msg('common.themeSwitch')}" style="display:inline-flex">
|
||||
<span th:attr="data-label=${theme.config?.basic?.label_theme_switch ?: '切换主题'}" style="display:inline-flex">
|
||||
<ThemeSwitcher />
|
||||
</span>
|
||||
</th:block>
|
||||
@@ -70,7 +93,7 @@ import ThemeSwitcher from "./ThemeSwitcher.astro";
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<script is:inline>
|
||||
<script is:inline th:inline="none">
|
||||
const navbar = document.getElementById("wi-navbar");
|
||||
let lastScrollY = window.scrollY;
|
||||
let ticking = false;
|
||||
@@ -218,6 +241,18 @@ import ThemeSwitcher from "./ThemeSwitcher.astro";
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.wi-navbar__logo--square {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.wi-navbar__logo--rounded {
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.wi-navbar__logo--circle {
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.wi-navbar__title {
|
||||
font-family: var(--font-sans);
|
||||
font-weight: 700;
|
||||
@@ -241,6 +276,88 @@ import ThemeSwitcher from "./ThemeSwitcher.astro";
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
/* 一级菜单项容器(含子菜单时作为下拉的定位锚点) */
|
||||
.wi-navbar__item {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
/* 二级下拉:纯 CSS 悬停/聚焦展开,无 JS 开销 */
|
||||
.wi-navbar__submenu {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%) translateY(6px);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 168px;
|
||||
padding: 6px;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
border-radius: var(--radius-md, 12px);
|
||||
background: var(--bg-raised);
|
||||
border: 1px solid var(--rule);
|
||||
box-shadow: var(--shadow-lg);
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: opacity 0.18s ease, transform 0.18s var(--ease-out-quart),
|
||||
visibility 0.18s;
|
||||
z-index: 101;
|
||||
}
|
||||
|
||||
/* 悬停桥:避免鼠标从一级移到二级途中经过空隙导致菜单关闭 */
|
||||
.wi-navbar__item--has-children::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 100%;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.wi-navbar__item--has-children:hover .wi-navbar__submenu,
|
||||
.wi-navbar__item--has-children:focus-within .wi-navbar__submenu {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
transform: translateX(-50%) translateY(0);
|
||||
}
|
||||
|
||||
.wi-navbar__submenu-link {
|
||||
display: block;
|
||||
padding: 0.5rem 0.75rem;
|
||||
border-radius: 8px;
|
||||
font-size: var(--text-sm);
|
||||
color: var(--ink-2);
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
transition: color 0.15s ease, background 0.15s ease;
|
||||
}
|
||||
|
||||
.wi-navbar__submenu-link:hover {
|
||||
color: var(--accent);
|
||||
background: color-mix(in srgb, var(--accent) 8%, transparent);
|
||||
}
|
||||
|
||||
/* 有子菜单的一级项带下拉小箭头 */
|
||||
.wi-navbar__item--has-children > .wi-navbar__link::after {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
margin-left: 0.3rem;
|
||||
margin-top: -2px;
|
||||
border-right: 1.5px solid currentColor;
|
||||
border-bottom: 1.5px solid currentColor;
|
||||
transform: rotate(45deg);
|
||||
opacity: 0.6;
|
||||
transition: transform 0.18s var(--ease-out-quart);
|
||||
}
|
||||
|
||||
.wi-navbar__item--has-children:hover > .wi-navbar__link::after {
|
||||
transform: rotate(225deg);
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.wi-navbar__link {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -9,7 +9,7 @@ const pageConfig = findPageBySlug("photos");
|
||||
<th:block th:if="${pluginFinder.available('PluginPhotos')}">
|
||||
<section class="wi-photos-section">
|
||||
<div class="wi-container">
|
||||
<h2 class="wi-photos-section__title" th:text="${pageConfig?.title ?: theme.config?.photos?.photos_title ?: #messages.msg('photos.title')}">图库</h2>
|
||||
<h2 class="wi-photos-section__title" th:text="${pageConfig?.title ?: theme.config?.photos?.photos_title ?: '相册'}">图库</h2>
|
||||
<div
|
||||
class="wi-photos-section__grid"
|
||||
th:attr="data-style=${theme.config?.photos?.photos_style ?: 'masonry'}, data-columns=${theme.config?.photos?.photos_columns ?: 3}"
|
||||
@@ -37,7 +37,7 @@ const pageConfig = findPageBySlug("photos");
|
||||
</th:block>
|
||||
</div>
|
||||
<a th:href="@{'/photos'}" class="wi-photos-section__more">
|
||||
<span th:text="${theme.config?.home?.home_label_view_all ?: #messages.msg('common.viewAll')}">查看全部</span>
|
||||
<span th:text="${theme.config?.home?.home_label_view_all ?: '查看全部'}">查看全部</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M5 12h14M12 5l7 7-7 7"/>
|
||||
</svg>
|
||||
|
||||
@@ -28,10 +28,18 @@ const { variant = "default" } = Astro.props;
|
||||
</div>
|
||||
|
||||
<div class="post-card__content">
|
||||
<time
|
||||
class="post-card__date"
|
||||
th:text="${#dates.format(post.spec.publishTime, 'yyyy-MM-dd')}"
|
||||
></time>
|
||||
<div class="post-card__meta">
|
||||
<time
|
||||
class="post-card__date"
|
||||
th:text="${#dates.format(post.spec.publishTime, 'yyyy-MM-dd')}"
|
||||
></time>
|
||||
<span
|
||||
class="post-card__words"
|
||||
th:if="${theme.config?.home?.home_card_show_wordcount == true and pluginFinder.available('extra-api')}"
|
||||
th:with="words=${extraApiStatsFinder.getPostWordCount({name: post.metadata.name})}"
|
||||
th:text="${words > 0 ? words + ' 字' : ''}"
|
||||
></span>
|
||||
</div>
|
||||
<h3 class="post-card__title" th:text="${post.spec.title}"></h3>
|
||||
<p
|
||||
th:if="${variant != 'compact'}"
|
||||
@@ -110,6 +118,20 @@ const { variant = "default" } = Astro.props;
|
||||
line-height: var(--leading-none);
|
||||
}
|
||||
|
||||
.post-card__meta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
}
|
||||
|
||||
.post-card__words {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--ink-3);
|
||||
line-height: var(--leading-none);
|
||||
padding-left: 0.6rem;
|
||||
border-left: 1px solid var(--rule);
|
||||
}
|
||||
|
||||
.post-card__title {
|
||||
font-family: var(--font-sans);
|
||||
font-weight: 700;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
---
|
||||
|
||||
<script is:inline>
|
||||
<script is:inline th:inline="none">
|
||||
(function(){
|
||||
var enabled = !document.documentElement.classList.contains("wi-no-animations");
|
||||
if (!enabled) {
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, onUnmounted } from "vue";
|
||||
|
||||
function handleKeydown(e: KeyboardEvent) {
|
||||
if ((e.metaKey || e.ctrlKey) && e.key === "k") {
|
||||
e.preventDefault();
|
||||
const searchWidget = (window as any).SearchWidget;
|
||||
if (searchWidget && typeof searchWidget.open === "function") {
|
||||
searchWidget.open();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
document.addEventListener("keydown", handleKeydown);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
document.removeEventListener("keydown", handleKeydown);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span class="wi-search-hint" aria-hidden="true">
|
||||
<kbd class="wi-search-hint__key">⌘</kbd>
|
||||
<kbd class="wi-search-hint__key">K</kbd>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.wi-search-hint {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
pointer-events: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.wi-search-hint__key {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 22px;
|
||||
height: 22px;
|
||||
padding: 0 5px;
|
||||
font-family: var(--font-body);
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
color: var(--ink-3);
|
||||
background: var(--bg-raised);
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 1px 0 var(--rule);
|
||||
}
|
||||
</style>
|
||||
@@ -24,7 +24,7 @@
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<script is:inline>
|
||||
<script is:inline th:inline="none">
|
||||
(function(){
|
||||
var btn = document.getElementById("wi-theme-toggle");
|
||||
if (!btn) return;
|
||||
@@ -57,8 +57,9 @@
|
||||
document.documentElement.classList.toggle("dark", isDark);
|
||||
document.documentElement.setAttribute("data-color-scheme", isDark ? "dark" : "light");
|
||||
localStorage.setItem("wi-theme", isDark ? "dark" : "light");
|
||||
var bgPair = window.WI_PALETTE_BG || { light: "#faf7f2", dark: "#1e1c1a" };
|
||||
var tc = document.querySelector('meta[name="theme-color"]');
|
||||
if (tc) tc.setAttribute("content", isDark ? "#1a1614" : "#faf7f2");
|
||||
if (tc) tc.setAttribute("content", isDark ? bgPair.dark : bgPair.light);
|
||||
updateIcons();
|
||||
setTimeout(function() {
|
||||
document.documentElement.classList.remove("wi-theme-transition");
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
>
|
||||
<div class="wi-container">
|
||||
<div class="wi-section__header">
|
||||
<h2 class="wi-section__title" th:text="${theme.config?.home?.home_timeline_title ?: #messages.msg('common.timeline')}">时间线</h2>
|
||||
<h2 class="wi-section__title" th:text="${theme.config?.home?.home_timeline_title ?: '时间线'}">时间线</h2>
|
||||
<span class="wi-section__accent"></span>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -0,0 +1,443 @@
|
||||
---
|
||||
---
|
||||
|
||||
<section
|
||||
class="wi-welcome-popup"
|
||||
id="wi-welcome-popup"
|
||||
th:if="${theme.config?.welcome_popup?.welcome_popup_enabled == true}"
|
||||
th:attr="data-position=${theme.config?.welcome_popup?.welcome_popup_position ?: 'top-center'},data-duration=${theme.config?.welcome_popup?.welcome_popup_duration ?: 5},data-api=${theme.config?.welcome_popup?.welcome_popup_api},data-fallback-api=${theme.config?.welcome_popup?.welcome_popup_fallback_api},data-show-once=${theme.config?.welcome_popup?.welcome_popup_show_once != false ? 'true' : 'false'}"
|
||||
aria-live="polite"
|
||||
aria-atomic="true"
|
||||
>
|
||||
<div class="wi-welcome-popup__inner">
|
||||
<div class="wi-welcome-popup__icon" aria-hidden="true">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z"></path>
|
||||
<circle cx="12" cy="10" r="3"></circle>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="wi-welcome-popup__content" id="wi-welcome-popup-text">加载中…</div>
|
||||
<button class="wi-welcome-popup__close" type="button" aria-label="关闭">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M18 6 6 18"></path>
|
||||
<path d="m6 6 12 12"></path>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="wi-welcome-popup__progress" id="wi-welcome-popup-progress" aria-hidden="true"></div>
|
||||
</section>
|
||||
|
||||
<script is:inline th:inline="none">
|
||||
(function () {
|
||||
var popup = document.getElementById("wi-welcome-popup");
|
||||
if (!popup) return;
|
||||
|
||||
/* 同会话已显示过则不再弹出(可通过"同会话仅显示一次"开关关闭) */
|
||||
var sessionKey = "wi-welcome-shown";
|
||||
var showOnce = popup.getAttribute("data-show-once") !== "false";
|
||||
try {
|
||||
if (showOnce && sessionStorage.getItem(sessionKey)) {
|
||||
popup.style.display = "none";
|
||||
return;
|
||||
}
|
||||
} catch (e) {}
|
||||
|
||||
var textEl = document.getElementById("wi-welcome-popup-text");
|
||||
var closeBtn = popup.querySelector(".wi-welcome-popup__close");
|
||||
var progress = document.getElementById("wi-welcome-popup-progress");
|
||||
var duration = parseInt(popup.getAttribute("data-duration"), 10) || 5;
|
||||
var api = popup.getAttribute("data-api") || "https://myip.ipip.net/json";
|
||||
var fallbackApi = popup.getAttribute("data-fallback-api") || "https://r.inews.qq.com/api/ip2city?otype=json";
|
||||
|
||||
var hideTimer = null;
|
||||
var progressRaf = null;
|
||||
var progressStart = 0;
|
||||
var isHidden = false;
|
||||
|
||||
function hidePopup() {
|
||||
if (isHidden) return;
|
||||
isHidden = true;
|
||||
popup.classList.remove("wi-welcome-popup--visible");
|
||||
popup.classList.add("wi-welcome-popup--leaving");
|
||||
if (hideTimer) {
|
||||
clearTimeout(hideTimer);
|
||||
hideTimer = null;
|
||||
}
|
||||
if (progressRaf) {
|
||||
cancelAnimationFrame(progressRaf);
|
||||
progressRaf = null;
|
||||
}
|
||||
try {
|
||||
if (showOnce) sessionStorage.setItem(sessionKey, "1");
|
||||
} catch (e) {}
|
||||
setTimeout(function () {
|
||||
popup.style.display = "none";
|
||||
}, 400);
|
||||
}
|
||||
|
||||
function startAutoHide() {
|
||||
progressStart = performance.now();
|
||||
var step = function (now) {
|
||||
var elapsed = (now - progressStart) / 1000;
|
||||
var ratio = Math.min(elapsed / duration, 1);
|
||||
if (progress) {
|
||||
progress.style.transform = "scaleX(" + (1 - ratio) + ")";
|
||||
}
|
||||
if (ratio < 1 && !isHidden) {
|
||||
progressRaf = requestAnimationFrame(step);
|
||||
}
|
||||
};
|
||||
progressRaf = requestAnimationFrame(step);
|
||||
hideTimer = setTimeout(hidePopup, duration * 1000);
|
||||
}
|
||||
|
||||
function renderMessage(location) {
|
||||
var loc = (location || "").trim();
|
||||
if (!loc) loc = "未知星球";
|
||||
if (textEl) {
|
||||
textEl.textContent = "欢迎来自 " + loc + " 的朋友";
|
||||
}
|
||||
popup.classList.add("wi-welcome-popup--visible");
|
||||
startAutoHide();
|
||||
}
|
||||
|
||||
function fetchLocation() {
|
||||
if (textEl) {
|
||||
textEl.textContent = "加载中…";
|
||||
}
|
||||
popup.classList.add("wi-welcome-popup--visible");
|
||||
|
||||
/* 按顺序尝试主 API -> 备选 API */
|
||||
var endpoints = [];
|
||||
if (api) endpoints.push(api);
|
||||
if (fallbackApi && fallbackApi !== api) endpoints.push(fallbackApi);
|
||||
|
||||
if (endpoints.length === 0) {
|
||||
renderMessage("");
|
||||
return;
|
||||
}
|
||||
|
||||
var idx = 0;
|
||||
|
||||
function tryNext() {
|
||||
if (idx >= endpoints.length) {
|
||||
renderMessage("");
|
||||
return;
|
||||
}
|
||||
var url = endpoints[idx++];
|
||||
fetchSingle(url, 6000)
|
||||
.then(function (location) {
|
||||
if (location) {
|
||||
renderMessage(location);
|
||||
} else {
|
||||
tryNext();
|
||||
}
|
||||
})
|
||||
.catch(function () {
|
||||
tryNext();
|
||||
});
|
||||
}
|
||||
|
||||
tryNext();
|
||||
}
|
||||
|
||||
function fetchSingle(url, timeoutMs) {
|
||||
var controller = null;
|
||||
var timeoutId = null;
|
||||
|
||||
if (window.AbortController) {
|
||||
controller = new AbortController();
|
||||
timeoutId = setTimeout(function () {
|
||||
controller.abort();
|
||||
}, timeoutMs);
|
||||
}
|
||||
|
||||
return fetch(url, controller ? { signal: controller.signal } : {})
|
||||
.then(function (res) {
|
||||
if (!res.ok) throw new Error("HTTP " + res.status);
|
||||
return res.json();
|
||||
})
|
||||
.then(function (data) {
|
||||
if (timeoutId) clearTimeout(timeoutId);
|
||||
return parseLocation(data);
|
||||
})
|
||||
.catch(function (err) {
|
||||
if (timeoutId) clearTimeout(timeoutId);
|
||||
throw err;
|
||||
});
|
||||
}
|
||||
|
||||
/* 解析多种 IP API 的返回格式:
|
||||
- IPIP: {"ret":"ok","data":{"location":["中国","河北","张家口","","联通"]}}
|
||||
- 腾讯 ip2city: {"ret":0,"province":"河北","city":"张家口",...}
|
||||
- ipapi.co / ip-api.com: {"country":"China","regionName":"Hebei","city":"Zhangjiakou"}
|
||||
- 太平洋: {"pro":"广东省","city":"广州市",...} */
|
||||
function parseLocation(data) {
|
||||
if (!data) return "";
|
||||
|
||||
/* IPIP: data.data.location 数组 */
|
||||
if (data.data && Array.isArray(data.data.location)) {
|
||||
var loc = data.data.location
|
||||
.filter(function (s) {
|
||||
return s && String(s).trim();
|
||||
})
|
||||
.map(function (s) {
|
||||
return String(s).trim();
|
||||
});
|
||||
/* 去掉末尾的运营商字段(如"联通""电信""移动") */
|
||||
var ispKeywords = ["联通", "电信", "移动", "铁通", "广电", "教育网", "长城"];
|
||||
while (loc.length > 1 && ispKeywords.indexOf(loc[loc.length - 1]) !== -1) {
|
||||
loc.pop();
|
||||
}
|
||||
return loc.length ? loc.join("·") : "";
|
||||
}
|
||||
|
||||
var country = data.country || data.country_name || data.nation || "";
|
||||
var region = data.regionName || data.region || data.province || data.pro || "";
|
||||
var city = data.city || data.cityName || "";
|
||||
var district = data.district || data.area || data.info3 || "";
|
||||
|
||||
/* 短英文国家代码(如 CN)舍弃,避免显示无意义的两字母 */
|
||||
if (country && country.length <= 3 && !/[一-龥]/.test(country)) {
|
||||
country = "";
|
||||
}
|
||||
|
||||
var parts = [];
|
||||
if (country) parts.push(country);
|
||||
if (region && region !== country) parts.push(region);
|
||||
if (city && city !== region) parts.push(city);
|
||||
if (district && district !== city) parts.push(district);
|
||||
|
||||
return parts.length ? parts.join("·") : "";
|
||||
}
|
||||
|
||||
/* 交互:悬停/触摸暂停倒计时,离开恢复 */
|
||||
function pauseTimer() {
|
||||
if (hideTimer) {
|
||||
clearTimeout(hideTimer);
|
||||
hideTimer = null;
|
||||
}
|
||||
if (progressRaf) {
|
||||
cancelAnimationFrame(progressRaf);
|
||||
progressRaf = null;
|
||||
}
|
||||
}
|
||||
|
||||
function resumeTimer() {
|
||||
var remaining = duration;
|
||||
if (progress) {
|
||||
var matrix = progress.style.transform;
|
||||
var match = matrix && matrix.match(/scaleX\(([\d.]+)\)/);
|
||||
if (match) {
|
||||
var ratio = parseFloat(match[1]);
|
||||
remaining = duration * ratio;
|
||||
}
|
||||
}
|
||||
progressStart = performance.now() - (duration - remaining) * 1000;
|
||||
var step = function (now) {
|
||||
var elapsed = (now - progressStart) / 1000;
|
||||
var ratio = Math.min(elapsed / duration, 1);
|
||||
if (progress) {
|
||||
progress.style.transform = "scaleX(" + (1 - ratio) + ")";
|
||||
}
|
||||
if (ratio < 1 && !isHidden) {
|
||||
progressRaf = requestAnimationFrame(step);
|
||||
}
|
||||
};
|
||||
progressRaf = requestAnimationFrame(step);
|
||||
hideTimer = setTimeout(hidePopup, remaining * 1000);
|
||||
}
|
||||
|
||||
popup.addEventListener("mouseenter", pauseTimer);
|
||||
popup.addEventListener("mouseleave", resumeTimer);
|
||||
popup.addEventListener("touchstart", pauseTimer, { passive: true });
|
||||
popup.addEventListener("touchend", resumeTimer, { passive: true });
|
||||
|
||||
if (closeBtn) closeBtn.addEventListener("click", hidePopup);
|
||||
|
||||
/* 延迟 800ms 显示,避免与首屏渲染争抢资源 */
|
||||
setTimeout(fetchLocation, 800);
|
||||
})();
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.wi-welcome-popup {
|
||||
position: fixed;
|
||||
z-index: 9999;
|
||||
max-width: min(380px, calc(100vw - 32px));
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
transform: translateY(-12px);
|
||||
transition: opacity 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo);
|
||||
will-change: opacity, transform;
|
||||
}
|
||||
|
||||
.wi-welcome-popup[data-position="top-left"] {
|
||||
top: 88px;
|
||||
left: 24px;
|
||||
}
|
||||
|
||||
.wi-welcome-popup[data-position="top-right"] {
|
||||
top: 88px;
|
||||
right: 24px;
|
||||
}
|
||||
|
||||
.wi-welcome-popup[data-position="bottom-left"] {
|
||||
bottom: 24px;
|
||||
left: 24px;
|
||||
transform: translateY(12px);
|
||||
}
|
||||
|
||||
.wi-welcome-popup[data-position="bottom-right"] {
|
||||
bottom: 24px;
|
||||
right: 24px;
|
||||
transform: translateY(12px);
|
||||
}
|
||||
|
||||
.wi-welcome-popup[data-position="top-center"] {
|
||||
top: 88px;
|
||||
left: 50%;
|
||||
transform: translate(-50%) translateY(-12px);
|
||||
}
|
||||
|
||||
.wi-welcome-popup--visible {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.wi-welcome-popup--visible[data-position="top-left"],
|
||||
.wi-welcome-popup--visible[data-position="top-right"],
|
||||
.wi-welcome-popup--visible[data-position="bottom-left"],
|
||||
.wi-welcome-popup--visible[data-position="bottom-right"] {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.wi-welcome-popup--visible[data-position="top-center"] {
|
||||
transform: translate(-50%) translateY(0);
|
||||
}
|
||||
|
||||
.wi-welcome-popup--leaving {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.wi-welcome-popup--leaving[data-position^="top"] {
|
||||
transform: translateY(-12px);
|
||||
}
|
||||
|
||||
.wi-welcome-popup--leaving[data-position="bottom-left"],
|
||||
.wi-welcome-popup--leaving[data-position="bottom-right"] {
|
||||
transform: translateY(12px);
|
||||
}
|
||||
|
||||
.wi-welcome-popup--leaving[data-position="top-center"] {
|
||||
transform: translate(-50%) translateY(-12px);
|
||||
}
|
||||
|
||||
.wi-welcome-popup__inner {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 10px 14px;
|
||||
border-radius: 9999px;
|
||||
background: color-mix(in srgb, var(--bg-raised) 92%, transparent);
|
||||
backdrop-filter: blur(20px) saturate(180%);
|
||||
-webkit-backdrop-filter: blur(20px) saturate(180%);
|
||||
border: 1px solid var(--rule);
|
||||
box-shadow: 0 8px 24px -8px #0000001f, 0 2px 8px -2px #0000000f;
|
||||
color: var(--ink);
|
||||
font-size: var(--text-sm);
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.wi-welcome-popup__icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
flex-shrink: 0;
|
||||
border-radius: 50%;
|
||||
background: color-mix(in srgb, var(--accent) 12%, transparent);
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.wi-welcome-popup__icon svg {
|
||||
animation: wi-welcome-popup-pulse 2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.wi-welcome-popup__content {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.wi-welcome-popup__close {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
flex-shrink: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
background: transparent;
|
||||
color: var(--ink-3);
|
||||
cursor: pointer;
|
||||
opacity: 0.6;
|
||||
transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
|
||||
}
|
||||
|
||||
.wi-welcome-popup__close:hover {
|
||||
opacity: 1;
|
||||
background: color-mix(in srgb, var(--ink-3) 12%, transparent);
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.wi-welcome-popup__progress {
|
||||
position: absolute;
|
||||
left: 14px;
|
||||
right: 14px;
|
||||
bottom: 4px;
|
||||
height: 2px;
|
||||
border-radius: 1px;
|
||||
background: color-mix(in srgb, var(--accent) 30%, transparent);
|
||||
transform-origin: left center;
|
||||
transform: scaleX(1);
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.wi-welcome-popup--visible .wi-welcome-popup__progress {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@keyframes wi-welcome-popup-pulse {
|
||||
0%,
|
||||
to {
|
||||
transform: scale(1);
|
||||
}
|
||||
50% {
|
||||
transform: scale(1.12);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.wi-welcome-popup[data-position] {
|
||||
max-width: calc(100vw - 24px);
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.wi-welcome-popup,
|
||||
.wi-welcome-popup--visible,
|
||||
.wi-welcome-popup--leaving,
|
||||
.wi-welcome-popup__icon svg {
|
||||
transition: opacity 0.2s ease !important;
|
||||
transform: none !important;
|
||||
animation: none !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
+50
-46
@@ -3,27 +3,37 @@ import "../styles/main.scss";
|
||||
import Navbar from "../components/Navbar.astro";
|
||||
import Footer from "../components/Footer.astro";
|
||||
import ScrollReveal from "../components/ScrollReveal.astro";
|
||||
import CursorGlow from "../components/CursorGlow.astro";
|
||||
import MobileMenu from "../components/MobileMenu.astro";
|
||||
|
||||
import ClickEffect from "../components/ClickEffect.astro";
|
||||
interface Props {
|
||||
pageTitle?: string;
|
||||
contentClass?: string;
|
||||
wide?: boolean;
|
||||
home?: boolean;
|
||||
/** 渲染为 Halo 页面布局契约(templates/layout.html 的 html(head, content) 片段) */
|
||||
layoutFragment?: boolean;
|
||||
}
|
||||
|
||||
const { pageTitle, contentClass, wide, home } = Astro.props;
|
||||
const { pageTitle, contentClass, wide, home, layoutFragment = false } = Astro.props;
|
||||
const fragmentAttr = layoutFragment ? "html (head, content)" : undefined;
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
<html class={home ? 'wi-home-snap' : ''} style="overflow-x:hidden" th:lang="${#locale.toLanguageTag()}" th:classappend="${theme.config?.animation?.animation_enabled == false} ? 'wi-no-animations'" th:attr="data-lang=${theme.config?.basic?.language}">
|
||||
<html
|
||||
lang="zh-CN"
|
||||
class={home ? 'wi-home-snap' : ''}
|
||||
style="overflow-x:hidden"
|
||||
th:classappend="${theme.config?.animation?.animation_enabled == false} ? 'wi-no-animations'"
|
||||
th:attr="data-palette=${theme.config?.style?.color_palette ?: 'warm-island'}"
|
||||
xmlns:th={layoutFragment ? "https://www.thymeleaf.org" : undefined}
|
||||
th:fragment={fragmentAttr}
|
||||
>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="theme-color" content="#faf7f2" />
|
||||
<meta th:if="${theme.config?.basic?.site_description}" name="description" th:content="${theme.config?.basic?.site_description}" />
|
||||
<script is:inline th:attr="data-scheme=${theme.config?.style?.color_scheme}">
|
||||
<script is:inline th:inline="none" th:attr="data-scheme=${theme.config?.style?.color_scheme}">
|
||||
(function () {
|
||||
var stored = localStorage.getItem("wi-theme");
|
||||
var prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
||||
@@ -46,14 +56,30 @@ const { pageTitle, contentClass, wide, home } = Astro.props;
|
||||
if (isDark) {
|
||||
document.documentElement.classList.add("dark");
|
||||
document.documentElement.setAttribute("data-color-scheme", "dark");
|
||||
var tc = document.querySelector('meta[name="theme-color"]');
|
||||
if (tc) tc.setAttribute("content", "#1a1614");
|
||||
} else {
|
||||
document.documentElement.classList.remove("dark");
|
||||
document.documentElement.setAttribute("data-color-scheme", "light");
|
||||
var tc = document.querySelector('meta[name="theme-color"]');
|
||||
if (tc) tc.setAttribute("content", "#faf7f2");
|
||||
}
|
||||
/* 浏览器地址栏颜色跟随当前配色(含主题配色系统) */
|
||||
var paletteBg = {
|
||||
"warm-island": ["#faf7f2", "#1e1c1a"],
|
||||
"matcha": ["#f6f8f1", "#1b1f1a"],
|
||||
"indigo": ["#f5f7fa", "#191d23"],
|
||||
"sakura": ["#faf5f6", "#201b1c"],
|
||||
"violet": ["#f7f5fa", "#1c1a21"],
|
||||
"sea": ["#f3f8f7", "#181f1e"],
|
||||
"amber": ["#faf7ef", "#201d16"],
|
||||
"plum": ["#f9f4f5", "#1f1a1b"],
|
||||
"graphite": ["#f7f7f6", "#1b1b1a"],
|
||||
"cocoa": ["#f8f4f0", "#1e1a17"],
|
||||
"azure": ["#f4f8fb", "#172026"]
|
||||
};
|
||||
var pal = document.documentElement.getAttribute("data-palette");
|
||||
var pair = (pal && paletteBg[pal]) || paletteBg["warm-island"];
|
||||
var tc = document.querySelector('meta[name="theme-color"]');
|
||||
if (tc) tc.setAttribute("content", isDark ? pair[1] : pair[0]);
|
||||
/* 供 ThemeSwitcher 切换深浅色时取当前配色的背景色 */
|
||||
window.WI_PALETTE_BG = { light: pair[0], dark: pair[1] };
|
||||
})();
|
||||
</script>
|
||||
<link
|
||||
@@ -73,47 +99,31 @@ const { pageTitle, contentClass, wide, home } = Astro.props;
|
||||
<style is:inline th:if="${theme.config?.style?.layout_container_width == 'medium' or theme.config?.style?.layout_container_width == null}" th:utext="${'.wi-content-wrap { max-width: 800px; } .wi-content-wrap--wide { max-width: 1200px; } .wi-main--wide { max-width: 1400px; }'}">/*width*/</style>
|
||||
<style is:inline th:if="${theme.config?.style?.layout_container_width == 'wide'}" th:utext="${'.wi-content-wrap { max-width: 900px; } .wi-content-wrap--wide { max-width: 1400px; } .wi-main--wide { max-width: 1600px; }'}">/*width*/</style>
|
||||
<style is:inline th:if="${theme.config?.style?.custom_css}" th:utext="${theme.config?.style?.custom_css}">/*custom*/</style>
|
||||
{
|
||||
layoutFragment && (
|
||||
<title th:if="${head == null}" th:text="${site.title}"></title>
|
||||
<th:block th:if="${head != null}">
|
||||
<th:block th:replace="${head}" />
|
||||
</th:block>
|
||||
)
|
||||
}
|
||||
<slot name="head" />
|
||||
</head>
|
||||
<body class="wi-body">
|
||||
<script is:inline>
|
||||
<script is:inline th:inline="none">
|
||||
window.addEventListener("unhandledrejection", function (e) {
|
||||
if (e.reason && e.reason.message && e.reason.message.indexOf("Could not establish connection") !== -1) {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script is:inline>
|
||||
(function(){
|
||||
try{
|
||||
var lang=document.documentElement.getAttribute("data-lang");
|
||||
if(!lang||lang==="auto"||lang==="null"||lang===""){
|
||||
var cookies=document.cookie.split(";");
|
||||
for(var i=0;i<cookies.length;i++){
|
||||
var c=cookies[i].trim();
|
||||
if(c.indexOf("language=")===0){
|
||||
document.cookie="language=;path=/;max-age=0;SameSite=Lax";
|
||||
break;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
var tag=lang.replace(/_/g,"-");
|
||||
var cookies=document.cookie.split(";");
|
||||
var current="";
|
||||
for(var i=0;i<cookies.length;i++){
|
||||
var c=cookies[i].trim();
|
||||
if(c.indexOf("language=")===0){current=c.substring(9);break;}
|
||||
}
|
||||
if(current!==tag){
|
||||
document.cookie="language="+tag+";path=/;max-age=31536000;SameSite=Lax";
|
||||
}
|
||||
}catch(e){}
|
||||
})();
|
||||
</script>
|
||||
<Navbar />
|
||||
<main class:list={["wi-main", { "wi-main--wide": wide || home, "wi-main--home": home }]}>
|
||||
{home ? (
|
||||
{layoutFragment ? (
|
||||
<div class:list={["wi-content-wrap", { "wi-content-wrap--wide": wide }]}>
|
||||
<th:block th:replace="${content}" />
|
||||
</div>
|
||||
) : home ? (
|
||||
<slot />
|
||||
) : (
|
||||
<div class:list={["wi-content-wrap", { "wi-content-wrap--wide": wide }]}>
|
||||
@@ -124,7 +134,7 @@ const { pageTitle, contentClass, wide, home } = Astro.props;
|
||||
<Footer />
|
||||
<MobileMenu />
|
||||
<ScrollReveal th:if="${theme.config?.animation?.animation_enabled != false and theme.config?.animation?.animation_scroll_reveal != false}" />
|
||||
<CursorGlow th:if="${theme.config?.animation?.animation_enabled != false and theme.config?.animation?.animation_cursor_glow == true}" />
|
||||
<ClickEffect />
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -169,10 +179,4 @@ html.wi-no-animations .wi-reveal {
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.wi-post__content img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
@@ -4,14 +4,14 @@ import Layout from "../layouts/Layout.astro";
|
||||
|
||||
<Layout>
|
||||
<Fragment slot="head">
|
||||
<title th:text="|${theme.config?.basic?.label_archives_title ?: #messages.msg('archives.title')} - ${site.title}|"></title>
|
||||
<title th:text="|${theme.config?.basic?.label_archives_title ?: '归档'} - ${site.title}|"></title>
|
||||
</Fragment>
|
||||
|
||||
<div class="wi-archives">
|
||||
<header class="wi-archives__header">
|
||||
<h1 class="wi-archives__title" th:text="${theme.config?.basic?.label_archives_title ?: #messages.msg('archives.title')}">归档</h1>
|
||||
<h1 class="wi-archives__title" th:text="${theme.config?.basic?.label_archives_title ?: '归档'}">归档</h1>
|
||||
<span class="wi-page-accent"></span>
|
||||
<p class="wi-archives__subtitle" th:text="${#strings.replace(#messages.msg('common.postCount'), '{0}', #strings.toString(archives.total))}"></p>
|
||||
<p class="wi-archives__subtitle" th:text="|共 ${archives.total} 篇文章|">共 0 篇文章</p>
|
||||
</header>
|
||||
|
||||
<section class="wi-archives__timeline" aria-label="Archive timeline">
|
||||
@@ -57,7 +57,7 @@ import Layout from "../layouts/Layout.astro";
|
||||
<div
|
||||
th:if="${archives.total == 0}"
|
||||
class="wi-archives__empty"
|
||||
th:text="${theme.config?.home?.home_label_no_posts ?: #messages.msg('common.noPosts')}"
|
||||
th:text="${theme.config?.home?.home_label_no_posts ?: '暂无文章'}"
|
||||
>No posts yet.</div>
|
||||
</section>
|
||||
|
||||
@@ -70,7 +70,7 @@ import Layout from "../layouts/Layout.astro";
|
||||
th:if="${archives.hasPrevious()}"
|
||||
th:href="@{${archives.prevUrl}}"
|
||||
class="wi-archives__page-link wi-archives__page-link--prev"
|
||||
th:text="${theme.config?.home?.home_label_newer ?: #messages.msg('common.newer')}"
|
||||
th:text="${theme.config?.home?.home_label_newer ?: '较新'}"
|
||||
>← Newer</a>
|
||||
<span
|
||||
class="wi-archives__page-info"
|
||||
@@ -80,7 +80,7 @@ import Layout from "../layouts/Layout.astro";
|
||||
th:if="${archives.hasNext()}"
|
||||
th:href="@{${archives.nextUrl}}"
|
||||
class="wi-archives__page-link wi-archives__page-link--next"
|
||||
th:text="${theme.config?.home?.home_label_older ?: #messages.msg('common.older')}"
|
||||
th:text="${theme.config?.home?.home_label_older ?: '较旧'}"
|
||||
>Older →</a>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user