Files
ClassHelper/website/404.html
T
LoveChengke ded10118f5 feat(website,docs,build): 首屏改成大标题 + 整行渐变填色,官网与文档站合并发布到 GitHub Pages
官网(`website/`)

- 首屏标题放大一档(`--fs-display` 上限 3.6rem → 4rem),第二行改成**整行渐变填色**,
  照 ClassIsland 官网那种「大标题 + 中间一段渐变 + 一行副标 + 一排徽章 + 两个按钮」的写法;
- 标题下补一排 mono 芯片(版本 / Windows / Linux·Docker / 触摸屏),主按钮换成
  「立即下载」+「GitHub 仓库」;
- 顶部导航与页脚补「文档站」入口;页脚原本指向 GitHub blob 的那三个链接改成指向文档站
  —— 那几个文件已经移到 `docs/management/` 下,原链接是 404。

> ⚠ 渐变那一行**不参与逐字揭示**:`main.js` 的 `setupHeadlineReveal` 会跳过 `.reveal-grad`。
> 拆成 per-char 的 `inline-block` 之后每个字各自建一层合成,祖先的 `background-clip: text`
> 就穿不过去,渐变会整行失效 —— 所以它按整行入场(透明度 + 轻微上浮)。

站点发布(`.github/workflows/pages.yml`,取代 `docs.yml`)

- **一个仓库在 GitHub Pages 上只有一个站点**,所以官网与文档站拼成一份产物:
  官网在根、文档站在 `/docs/` 下,组装逻辑在 `scripts/build-pages.mjs`;
- 站点根 404 由 `website/404.html` 提供(含 `{{BASE}}` 占位符,由脚本与 workflow 按仓库名注入);
- 官网目录里的 `serve.mjs` 与 `tools/` 是开发用的,不发布;
- `website/serve.mjs` 把 `../docs/_site` 挂在 `/docs/` 下,让本地预览与线上同形 ——
  否则页脚那几个「文档站」链接在本地全是 404;
- 文档站模板顶栏补一个「官网」入口(`{{_rel}}../`)。

版本迭代

- `scripts/version.mjs` 补上**官网上手写的三处版本号**(顶栏徽标 / 首屏芯片 / 页脚)。
  官网是纯静态站、没有构建步骤,没有哪段代码会去读 `package.json`,漏改的后果是
  首页一直挂着旧版本号 —— 而那是别人看到的第一眼。落点从 10 处变成 13 处,
  `AGENTS.md` §4.4 与 `docs/dev/release.md` 同步。
2026-10-06 16:44:23 +08:00

137 lines
3.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<!--
站点根 404 页(**不经过 docfx**,放在 website/ 下,由发布流程注入 {{BASE}})。
一个仓库在 GitHub Pages 上只有一个站点,官网在根、文档站在 /docs/ 下 —— 因此严格来说
整个站点只有这一份 404 生效:Pages 对任何未知路径都返回站点根的 404.html。
docs/404.html(docfx 那份)只在「文档站被单独托管」时才用得上,合并站点里它是备而不用的。
所以这一页要把两条路都给出来:回官网、去文档站。
-->
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<base href="{{BASE}}" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="robots" content="noindex" />
<title>页面不存在 | 班级小助手</title>
<style>
:root {
--board: #16231e;
--chalk: #eef3ef;
--chalk-2: #b9c7bf;
--chalk-3: #8a9a91;
--blue: #2f8fe6;
--line: rgba(238, 243, 239, 0.14);
}
* {
box-sizing: border-box;
}
html {
color-scheme: dark;
}
body {
margin: 0;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 32px;
background: var(--board);
color: var(--chalk);
font-family:
'Segoe UI Variable Text',
'Segoe UI',
'Microsoft YaHei UI',
'Microsoft YaHei',
-apple-system,
BlinkMacSystemFont,
'PingFang SC',
'Hiragino Sans GB',
sans-serif;
line-height: 1.75;
}
main {
max-width: 34em;
}
.code {
font-family: ui-monospace, Consolas, monospace;
font-size: 4rem;
font-weight: 600;
line-height: 1;
color: var(--blue);
}
h1 {
margin: 18px 0 10px;
font-size: 1.5rem;
font-weight: 600;
}
p {
margin: 0 0 26px;
color: var(--chalk-2);
}
.links {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
a {
display: inline-block;
padding: 11px 20px;
border: 1px solid var(--line);
border-radius: 4px;
color: var(--chalk);
text-decoration: none;
transition:
border-color 0.15s ease,
color 0.15s ease,
background-color 0.15s ease;
}
a:hover {
border-color: var(--chalk-3);
background: rgba(238, 243, 239, 0.06);
}
a.primary {
background: var(--blue);
border-color: var(--blue);
color: #fff;
}
a.primary:hover {
background: #1280dd;
border-color: #1280dd;
}
@media (prefers-reduced-motion: reduce) {
a {
transition: none;
}
}
</style>
</head>
<body>
<main>
<div class="code">404</div>
<h1>这里没有这一页</h1>
<p>链接可能过期了,或者这一页已经被重写进了别的章节。</p>
<div class="links">
<a class="primary" href="index.html">回到官网首页</a>
<a href="docs/index.html">文档站</a>
<a href="docs/get-started/index.html">快速上手</a>
<a href="docs/faq.html">常见问题</a>
<a href="https://github.com/LoveChengke/ClassHelper">GitHub 仓库</a>
</div>
</main>
</body>
</html>