95abb74db2
PRICES 原为中英共用一份人民币值 → 英文页显示 ¥ 不专业。改为 Record<Lang,...>: - zh: ¥0 / ¥25(年¥20) / ¥99(年¥79) - en: $0 / $3.99(年$3.19) / $13.99(年$11.19) 年付沿用 8 折 Pricing.astro 接收 lang 按语言取价;Site.astro 传入 lang。 构建产物核实:EN 页 0 处 ¥、ZH 页 0 处 $;红线扫描 0 命中。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
91 lines
3.3 KiB
Plaintext
91 lines
3.3 KiB
Plaintext
---
|
||
/**
|
||
* Site.astro — 官网整页布局(构建期单显一种语言)。
|
||
* 两条路由复用:/ → lang="zh",/en/ → lang="en"(铁律 6 单显不并排)。
|
||
*
|
||
* 样式来源顺序(全部自托管,无第三方 CDN):
|
||
* @fontsource/* → 自托管字体 @font-face(替代原型的 Google Fonts CDN)
|
||
* tokens.gen.css → 由 design/colors_and_type.css 生成(唯一令牌真相源)
|
||
* website.css → 逐字迁自 ui_kits/website
|
||
* site-extra.css → 仅承载「原型内联 style= → class」的等价工具类
|
||
*/
|
||
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, type Lang } from '../i18n/strings';
|
||
import Header from '../components/Header.jsx';
|
||
import AnnouncementBar from '../components/AnnouncementBar.jsx';
|
||
import Hero from '../components/Hero.astro';
|
||
import Features from '../components/Features.astro';
|
||
import WhySignup from '../components/WhySignup.astro';
|
||
import Pricing from '../components/Pricing.astro';
|
||
import Download from '../components/Download.astro';
|
||
import Docs from '../components/Docs.astro';
|
||
// Blog 区暂隐藏(占位内容未就绪);有真实文章后恢复 import + <Blog/> + 导航/页脚链接。
|
||
import CtaBand from '../components/CtaBand.astro';
|
||
import Footer from '../components/Footer.astro';
|
||
|
||
interface Props { lang: Lang }
|
||
const { lang } = Astro.props;
|
||
const t = createT(lang);
|
||
|
||
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'),
|
||
get: t('nav.get'),
|
||
suBtn: t('su.btn'),
|
||
};
|
||
---
|
||
<!doctype html>
|
||
<html lang={lang === 'zh' ? 'zh-CN' : 'en'}>
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
<title>{t('meta.title')}</title>
|
||
<meta name="description" content={t('meta.desc')} />
|
||
<meta name="robots" content="index,follow" />
|
||
<link rel="canonical" href={new URL(lang === 'zh' ? '/' : '/en/', Astro.site).href} />
|
||
<link rel="alternate" hreflang="zh-CN" href={new URL('/', Astro.site).href} />
|
||
<link rel="alternate" hreflang="en" href={new URL('/en/', Astro.site).href} />
|
||
<link rel="alternate" hreflang="x-default" href={new URL('/', Astro.site).href} />
|
||
<meta name="theme-color" content="#B96A3D" />
|
||
<meta property="og:type" content="website" />
|
||
<meta property="og:title" content={t('meta.title')} />
|
||
<meta property="og:description" content={t('meta.desc')} />
|
||
<meta property="og:locale" content={lang === 'zh' ? 'zh_CN' : 'en_US'} />
|
||
</head>
|
||
<body>
|
||
<AnnouncementBar client:idle text={t('ann.txt')} cta={t('ann.cta')} />
|
||
<Header client:load lang={lang} t={headerT} />
|
||
|
||
<a id="top"></a>
|
||
|
||
<Hero t={t} />
|
||
<Features t={t} />
|
||
<WhySignup t={t} />
|
||
<Pricing t={t} lang={lang} />
|
||
<Download t={t} />
|
||
<Docs t={t} />
|
||
<CtaBand t={t} />
|
||
<Footer t={t} />
|
||
</body>
|
||
</html>
|