refactor(website): 邀请/注册页语言跟随站点路由(六语变体),移除卡内 zh/EN 切换
ci-pangolin / Redline Scan — 脱敏 (UI 文案) (pull_request) Successful in 22s
ci-pangolin / Codegen Drift — token 生成物未漂移 (pull_request) Successful in 8s
ci-pangolin / Cleartext Scan — Android 禁明文 (pull_request) Successful in 22s
ci-pangolin / DS-flow — 原型/跨端同源/代码色单源闸 (pull_request) Successful in 9s
ci-pangolin / Portable SQL — 可移植性 (mysql/sqlite) (pull_request) Successful in 22s
ci-pangolin / Go — build + test (pull_request) Failing after 17s
ci-pangolin / E2E Smoke — L4 进程级端到端 (pull_request) Failing after 9s
ci-pangolin / Go — integration (mysql/redis testcontainers) (pull_request) Failing after 4m30s
ci-pangolin / Golden — 视觉回归 (全量:components/auth/desktop/tablet) (pull_request) Failing after 20s
ci-pangolin / Flutter — analyze + test (pull_request) Failing after 12m46s
ci-pangolin / OpenAPI Sync Check (pull_request) Failing after 12m57s
ci-pangolin / Lint — shellcheck (pull_request) Failing after 13m6s
ci-pangolin / Redline Scan — 脱敏 (UI 文案) (pull_request) Successful in 22s
ci-pangolin / Codegen Drift — token 生成物未漂移 (pull_request) Successful in 8s
ci-pangolin / Cleartext Scan — Android 禁明文 (pull_request) Successful in 22s
ci-pangolin / DS-flow — 原型/跨端同源/代码色单源闸 (pull_request) Successful in 9s
ci-pangolin / Portable SQL — 可移植性 (mysql/sqlite) (pull_request) Successful in 22s
ci-pangolin / Go — build + test (pull_request) Failing after 17s
ci-pangolin / E2E Smoke — L4 进程级端到端 (pull_request) Failing after 9s
ci-pangolin / Go — integration (mysql/redis testcontainers) (pull_request) Failing after 4m30s
ci-pangolin / Golden — 视觉回归 (全量:components/auth/desktop/tablet) (pull_request) Failing after 20s
ci-pangolin / Flutter — analyze + test (pull_request) Failing after 12m46s
ci-pangolin / OpenAPI Sync Check (pull_request) Failing after 12m57s
ci-pangolin / Lint — shellcheck (pull_request) Failing after 13m6s
This commit is contained in:
@@ -1,71 +1,5 @@
|
||||
---
|
||||
/**
|
||||
* i.astro — 邀请落地页 `/i/`(产出 dist/i/index.html)。
|
||||
*
|
||||
* App 内分享的邀请链接固定形如 `https://pangolin.yanmeiai.com/i/<8位邀请码>`,
|
||||
* CF Pages 用 public/_redirects 的 `/i/* /i/ 200` 把任意邀请码路径都重写到这一份
|
||||
* 静态产物;邀请码本身在浏览器端由 InviteCard.jsx 从 location.pathname 解析(构建期
|
||||
* 不知道、也不可能为每个码单独出页)。
|
||||
*
|
||||
* 页面骨架复用全站 Header/Footer + tokens/website/site-extra 样式(与 layouts/Doc.astro
|
||||
* 同一路数);Header/Footer 走全站 i18n 惯例整页单显中文(面向主力市场)。正文卡片
|
||||
* (InviteCard.jsx)另有独立的 zh/en 运行时切换,理由见该组件顶部注释。
|
||||
*/
|
||||
import '@fontsource/sora/500.css';
|
||||
import '@fontsource/sora/600.css';
|
||||
import '@fontsource/sora/700.css';
|
||||
import '@fontsource/manrope/400.css';
|
||||
import '@fontsource/manrope/500.css';
|
||||
import '@fontsource/manrope/600.css';
|
||||
import '@fontsource/manrope/700.css';
|
||||
import '@fontsource/noto-sans-sc/400.css';
|
||||
import '@fontsource/noto-sans-sc/500.css';
|
||||
import '@fontsource/noto-sans-sc/700.css';
|
||||
import '@fontsource/jetbrains-mono/400.css';
|
||||
import '@fontsource/jetbrains-mono/500.css';
|
||||
|
||||
import '../styles/tokens.gen.css';
|
||||
import '../styles/website.css';
|
||||
import '../styles/site-extra.css';
|
||||
|
||||
import { createT } from '../i18n/strings';
|
||||
import Header from '../components/Header.jsx';
|
||||
import Footer from '../components/Footer.astro';
|
||||
import InviteCard from '../components/InviteCard.jsx';
|
||||
|
||||
const t = createT('zh');
|
||||
|
||||
const headerT = {
|
||||
product: t('nav.product'),
|
||||
pricing: t('nav.pricing'),
|
||||
download: t('nav.download'),
|
||||
docs: t('nav.docs'),
|
||||
blog: t('nav.blog'),
|
||||
login: t('nav.login'),
|
||||
center: t('nav.center'),
|
||||
brand: t('nav.brand'),
|
||||
mcenter: t('menu.center'),
|
||||
mswitch: t('menu.switch'),
|
||||
mlogout: t('menu.logout'),
|
||||
get: t('nav.get'),
|
||||
suBtn: t('su.btn'),
|
||||
};
|
||||
// 英文根路由(/i/)。App 分享的邀请链接默认语言中立地落在这里。
|
||||
import InvitePage from '../layouts/InvitePage.astro';
|
||||
---
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>邀请你使用穿山甲 · {t('nav.brand')}</title>
|
||||
<meta name="description" content="好友邀请你加入穿山甲:注册双方各得 3 天,好友首次购买双方再得 7 天。" />
|
||||
<meta name="robots" content="noindex,follow" />
|
||||
<meta name="theme-color" content="#B96A3D" />
|
||||
</head>
|
||||
<body>
|
||||
<Header client:load lang="zh" t={headerT} />
|
||||
<main>
|
||||
<InviteCard client:load />
|
||||
</main>
|
||||
<Footer t={t} />
|
||||
</body>
|
||||
</html>
|
||||
<InvitePage lang="en" />
|
||||
|
||||
Reference in New Issue
Block a user