提交记录修改www/README.md+1 −1看文件
修改www/scripts/check-site.mjs+1 −1看文件
修改www/src/styles/cage.css+2 −3看文件
| @@ -19,7 +19,7 @@ npm run build # dist/ | ||
| 19 | 19 | |
| 20 | 20 | GitHub Actions 在网站文件或 README 的普通推送与 PR 中检查和构建;公开 Release 发布或维护者手动运行时部署 GitHub Pages。Release 事件会先下载实际 macOS 安装包与对应 Mihomo 源码,验证摘要、Developer ID 签名、Apple 公证和 Gatekeeper,失败时不会部署这一轮网站。Windows、Linux 的发行验收由对应平台流程负责。发布操作见[公开发行与主页部署](../docs/public-releases.md)。 |
| 21 | 21 | |
| 22 | 删除:根目录 README 是维护者确认产品措辞的来源。README 修改触发主页重新构建;发布工作流只刷新下载版本并读取现有译文,不自动生成翻译。中文主页为 `/`,其他语言使用 `/<语言代码>/`,语言范围与根目录 README 导航一致,不提供英语。语言选择器在页面内展开链接列表,占据布局空间并顺移下方内容。支持键盘展开、链接导航与 Esc 收起,禁用 JavaScript 时仍可展开和跳转。各语言使用独立 URL;阿拉伯语、波斯语、普什图语、达里语使用从右向左布局。网页正文直接复用对应 README 译文,结构调整时构建会提示维护者同步映射。 | |
| 22 | 新增:根目录 README 是维护者确认产品措辞的来源。README 修改触发主页重新构建;发布工作流只刷新下载版本并读取现有译文,不自动生成翻译。中文主页为 `/`,其他语言使用 `/<语言代码>/`,语言范围与根目录 README 导航一致,不提供英语。语言选择器在控件下方悬浮展开链接列表,不改变正文位置。支持键盘展开、链接导航与 Esc 收起,禁用 JavaScript 时仍可展开和跳转。各语言使用独立 URL;阿拉伯语、波斯语、普什图语、达里语使用从右向左布局。网页正文直接复用对应 README 译文,结构调整时构建会提示维护者同步映射。 | |
| 23 | 23 | |
| 24 | 24 | GitHub Pages 是当前主页的发布目标,部署配置由仓库工作流维护。 |
| 25 | 25 | |
| @@ -17,7 +17,7 @@ const published = JSON.parse(fs.readFileSync(path.join(root, 'www/src/data/relea | ||
| 17 | 17 | for (const code of codes) { |
| 18 | 18 | const html = fs.readFileSync(path.join(dist,code === 'zh' ? '' : code,'index.html'),'utf8'); |
| 19 | 19 | const picker = html.match(/<details\b[^>]*id="site-language"[^>]*>([\s\S]*?)<\/details>/)?.[1]; |
| 20 | 删除: assert.ok(picker, `${code}: missing inline language picker`); | |
| 20 | 新增: assert.ok(picker, `${code}: missing language picker`); | |
| 21 | 21 | const options = [...picker.matchAll(/<a\b[^>]*href="([^"]+)"/g)].map(m=>m[1]); |
| 22 | 22 | assert.equal(options.length,codes.length, `${code}: language dropdown missing options`); |
| 23 | 23 | assert.deepEqual(options, codes.map(locale => `/Claude-Cage/${locale === 'zh' ? '' : locale + '/'}`), `${code}: incorrect language destinations`); |
| @@ -841,13 +841,12 @@ figure { margin: 0; } | ||
| 841 | 841 | } |
| 842 | 842 | .language-switch { align-items: flex-start; } |
| 843 | 843 | .language-switch > span { padding-block: 10px; } |
| 844 | 删除:.language-picker { width: 190px; max-width: 100%; min-width: 0; } | |
| 844 | 新增:.language-picker { position: relative; width: 190px; max-width: 100%; min-width: 0; } | |
| 845 | 845 | .language-picker summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; color: inherit; border: 1px solid var(--line); border-radius: 6px; padding: 9px 12px; list-style: none; } |
| 846 | 846 | .language-picker summary::-webkit-details-marker { display: none; } |
| 847 | 删除:.language-picker[open] summary { margin-bottom: 4px; } | |
| 848 | 847 | .language-chevron { flex: none; } |
| 849 | 848 | .language-picker[open] .language-chevron { transform: rotate(180deg); } |
| 850 | 删除:.language-options { display: grid; gap: 2px; max-height: 280px; overflow-y: auto; padding: 4px; border: 1px solid var(--line); border-radius: 6px; } | |
| 849 | 新增:.language-options { position: absolute; z-index: 10; inset-block-start: calc(100% + 4px); inset-inline: 0; display: grid; gap: 2px; max-height: 280px; overflow-y: auto; padding: 4px; border: 1px solid var(--line); border-radius: 6px; background: #faf8f4; box-shadow: 0 8px 20px #302c2920; } | |
| 851 | 850 | .language-options a { display: block; padding: 8px; border-radius: 3px; overflow-wrap: anywhere; } |
| 852 | 851 | .language-options a:hover, .language-options a[aria-current="page"] { background: #eee7dc; } |
| 853 | 852 | .language-picker summary:focus-visible, .language-options a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; } |

