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:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
// es 路由(/es/i/)。
|
||||
import InvitePage from '../../layouts/InvitePage.astro';
|
||||
---
|
||||
<InvitePage lang="es" />
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
// es 路由(/es/register/)。
|
||||
import RegisterPage from '../../layouts/RegisterPage.astro';
|
||||
---
|
||||
<RegisterPage lang="es" />
|
||||
@@ -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" />
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
// ja 路由(/ja/i/)。
|
||||
import InvitePage from '../../layouts/InvitePage.astro';
|
||||
---
|
||||
<InvitePage lang="ja" />
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
// ja 路由(/ja/register/)。
|
||||
import RegisterPage from '../../layouts/RegisterPage.astro';
|
||||
---
|
||||
<RegisterPage lang="ja" />
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
// ko 路由(/ko/i/)。
|
||||
import InvitePage from '../../layouts/InvitePage.astro';
|
||||
---
|
||||
<InvitePage lang="ko" />
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
// ko 路由(/ko/register/)。
|
||||
import RegisterPage from '../../layouts/RegisterPage.astro';
|
||||
---
|
||||
<RegisterPage lang="ko" />
|
||||
@@ -1,70 +1,5 @@
|
||||
---
|
||||
/**
|
||||
* register.astro — 独立注册页 `/register`(产出 dist/register/index.html)。
|
||||
*
|
||||
* 两处入口跳转到这里:① 首页 hero 免费注册表单(?email= 预填,见 SignupForm.jsx);
|
||||
* ② 邀请落地页 /i/<code> 的「注册领取 3 天」CTA(?invite= 预填,见 InviteCard.jsx)。
|
||||
* 二者共用同一套「验证码 + 设密码」注册流程(RegisterCard.jsx)。
|
||||
*
|
||||
* 页面骨架复用全站 Header/Footer + tokens/website/site-extra 样式,与 i.astro 同一路数;
|
||||
* Header/Footer 走全站 i18n 惯例整页单显中文,正文卡片(RegisterCard.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 RegisterCard from '../components/RegisterCard.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'),
|
||||
};
|
||||
// 英文根路由(/register/)。
|
||||
import RegisterPage from '../layouts/RegisterPage.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="创建你的穿山甲账户:一个邮箱即可开始,免费注册,无需任何付款信息。" />
|
||||
<meta name="robots" content="noindex,follow" />
|
||||
<meta name="theme-color" content="#B96A3D" />
|
||||
</head>
|
||||
<body>
|
||||
<Header client:load lang="zh" t={headerT} />
|
||||
<main>
|
||||
<RegisterCard client:load />
|
||||
</main>
|
||||
<Footer t={t} />
|
||||
</body>
|
||||
</html>
|
||||
<RegisterPage lang="en" />
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
// ru 路由(/ru/i/)。
|
||||
import InvitePage from '../../layouts/InvitePage.astro';
|
||||
---
|
||||
<InvitePage lang="ru" />
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
// ru 路由(/ru/register/)。
|
||||
import RegisterPage from '../../layouts/RegisterPage.astro';
|
||||
---
|
||||
<RegisterPage lang="ru" />
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
// zh 路由(/zh/i/)。
|
||||
import InvitePage from '../../layouts/InvitePage.astro';
|
||||
---
|
||||
<InvitePage lang="zh" />
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
// zh 路由(/zh/register/)。
|
||||
import RegisterPage from '../../layouts/RegisterPage.astro';
|
||||
---
|
||||
<RegisterPage lang="zh" />
|
||||
Reference in New Issue
Block a user