Skip to content

产品介绍网站(GitHub Pages,中英双语、深浅色、响应式) - #16

Merged
tsix2019 merged 3 commits into
mainfrom
claude/product-intro-website-ca2e71
Oct 17, 2026
Merged

tsix2019 merged 3 commits into
mainfrom
claude/product-intro-website-ca2e71

Conversation

@tsix2019

Copy link
Copy Markdown
Owner

改动

  • 新增 website/:RouteLink 的单页产品网站,上线后地址是 https://tsix2019.github.io/RouteLink/。
    • 中英双语:根据浏览器语言自动选择,可以一键切换,也可以用 ?lang=en 指定。
    • 浅色 / 深色:默认跟随系统,切换时从按钮位置做圆形展开动画。
    • 响应式布局:分别检查过 1440、800、390 / 375 宽度。
    • 动画和交互:
      • Hero 双手机样机跟随鼠标做 3D 视差,旁边的实时流量曲线持续滚动;
      • 功能便当格里各有一个小演示:雷达扫描、90 秒回滚倒计时、SSH 打字、AI 对话、液态玻璃 Tab 栏等;
      • 滚动叙事区的吸顶手机随步骤切换截图;
      • iOS / Android 截图画廊可以拖动;
      • 功能清单分 Tab 展示;
      • 插件安装命令可以一键复制。
    • 页面支持 prefers-reduced-motion。
  • 纯静态 HTML/CSS/JS,网站本身没有 npm 依赖。website/build.py(Python + Pillow)负责:
    • 校验中英文案:键一致、不能为空;
    • 预渲染中文,没有 JS 时也能看到内容;
    • 把 docs/screenshots 转成 WebP。截图在仓库里只有原来那一份,网页上会自动按当前语言和深浅色取对应的图。
  • 运行时只请求 GitHub API 读最新版本号和 APK / IPA 直链,请求失败时按钮退回 Releases 页面。没有统计代码,也不加载外部字体。
  • 设计文档:docs/superpowers/specs/2026-10-17-routelink-website-design.md。

部署(请重点看)

GitHub Pages 现在已经在放插件软件源(/agent/),App 的 MANIFEST_URL 和用户路由器上的 opkg / apk 源都指向它。Actions 方式的 Pages 每次部署都会整站替换,所以:

  • 新增 .github/workflows/pages.yml,由它统一部署“网站 + 插件源”。
    • main 上网站或截图有改动时:先用 website/mirror_feed.py 把线上 /agent/ 原样镜像下来,每个文件都按 manifest.json 和 Packages 里的 sha256、大小校验。缺任何一个文件就让 workflow 失败,不会部署出“有网站、没插件源”的站点。
    • PR 上只构建,不部署。
  • openwrt-release.yml 不再自己部署 Pages:把新插件源作为 artifact agent-pages 交给 pages.yml 一起部署,这样发布插件也不会冲掉网站。
  • 我在本地对线上源跑过一遍镜像:27 个源、244 个文件全部校验通过;两次运行的结果逐字节一致。

验证

  • python website/build.py:通过;故意删掉一个文案键、清空一个值,构建会报错退出。
  • 浏览器(本地 http.server):中英文、浅色 / 深色、桌面和手机宽度都检查过;控制台无报错,没有坏图,手机宽度下没有横向溢出;Tab、画廊平台切换、安装命令切换都能用。
  • eslint.config.js 忽略了 website/**,它是浏览器脚本,不是 App 代码。没有跑 App 的 lint / tsc / jest:按要求没有安装 App 依赖,这次也没有改动 App 代码。

合并后

  • 合并到 main 会触发 pages.yml 首次部署网站。仓库的 Pages 已经设为 “GitHub Actions”,不需要改设置。
  • workflow 只能在 main 上真正运行(github-pages 环境的分支限制),所以部署本身合并后才能验证。部署完成后建议确认:
    • https://tsix2019.github.io/RouteLink/agent/manifest.json 仍然可以访问;
    • 网站首页正常打开。

🤖 Generated with Claude Code

tsix2019 and others added 3 commits October 17, 2026 15:03
A bilingual (zh / en), light and dark, responsive single page in website/:
static HTML, CSS and JS modules without npm dependencies. website/build.py
checks the i18n files, pre-renders the Chinese text and converts
docs/screenshots to WebP, so the screenshots stay in one place and follow the
page's language and theme.

Pages already serves the router plugin feed under /agent/, and every
deployment replaces the whole site. pages.yml now deploys both: a website
change mirrors the live feed (mirror_feed.py verifies every file against
manifest.json and the indexes and fails instead of shipping a partial feed),
and openwrt-release.yml hands its new feed to pages.yml instead of deploying
the feed alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The router plugin's LuCI pages have a new look and the screenshots in
docs/screenshots/luci are from the old one. The website now draws the page
itself (js/luci.js) with demo data: all seven tabs switch, the charts are
generated, the overview's WAN chart is live and the period buttons work. It
follows the page's language and light / dark theme and holds no real router
data. The LuCI screenshots are no longer converted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… old LuCI screenshot

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tsix2019
tsix2019 merged commit c7f2575 into main Oct 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant