feat: 北极新一中文个人站 — MiSans 分片字体 + 全站内容国内化
- 字体: cn-font-split 分片 MiSans(4字重×~88片, unicode-range 按需加载) 接入 --font-sans/--font-mono/--font-mono-2 栈尾; 修复 next/font 与 Tailwind @theme 变量重名导致的死规则(--font-geist-mono/--font-departure-mono) - 内容: 品牌名/首屏/关于/导航/页脚/滚动段/文章页 UI/解锁屏全部中文化; 元数据 title 北极新一©2026, lang=zh-CN; 日期中文格式 - 彩蛋: 品牌标签 TikTok→小红书(保留 char-code 混淆与口令机制), /2026 文案改为个人创作手记语境 - 页脚: 邮箱 + 抖音/微信/小红书; 有链接项点击新开主页, 全部支持悬停 二维码卡片(正方形白衬+object-contain 防变形); 无链接项(微信)点击弹 二维码浮层 - 移除原作者手写签名动画(AboutMedia) - 构建: cn-font-split devDependency + onlyBuiltDependencies 允许列表
This commit is contained in:
+6
-3
@@ -4,9 +4,12 @@
|
||||
tokens, and the .dark block (below) flips their values — the same
|
||||
light/dark token pairs the original stylesheet emits. */
|
||||
@theme {
|
||||
--font-sans: var(--font-tiktok), sans-serif;
|
||||
--font-mono: var(--font-mono), monospace;
|
||||
--font-mono-2: var(--font-mono-2), monospace;
|
||||
/* MiSans(中文,cn-font-split 分片 + unicode-range,经 <link> 引入)
|
||||
接在各栈尾:英文/数字由 TikTok Sans 与等宽字体先行命中,中文回落
|
||||
到 MiSans 分片。 */
|
||||
--font-sans: var(--font-tiktok), "MiSans", sans-serif;
|
||||
--font-mono: var(--font-geist-mono), "MiSans", monospace;
|
||||
--font-mono-2: var(--font-departure-mono), "MiSans", monospace;
|
||||
|
||||
--color-l1: var(--label-1);
|
||||
--color-l2: var(--label-2);
|
||||
|
||||
+44
-7
@@ -20,21 +20,24 @@ const tiktokSans = localFont({
|
||||
|
||||
const geistMono = localFont({
|
||||
src: "./fonts/GeistMono[wght].ttf",
|
||||
variable: "--font-mono",
|
||||
variable: "--font-geist-mono",
|
||||
display: "swap",
|
||||
});
|
||||
|
||||
const departureMono = localFont({
|
||||
src: "./fonts/DepartureMono-Regular.otf",
|
||||
variable: "--font-mono-2",
|
||||
variable: "--font-departure-mono",
|
||||
display: "swap",
|
||||
});
|
||||
|
||||
// MiSans 中文走 cn-font-split 的 unicode-range 分片(public/fonts/misans/),
|
||||
// 以 <link> 引入 —— 见下方 <head>;不进 next/font 管线(整包 5MB/字重)。
|
||||
|
||||
export const metadata: Metadata = {
|
||||
// Original home title (index.html): HAOQI©2026. Detail pages override via
|
||||
// generateMetadata in app/work/[slug]/layout.tsx (original: per-page title).
|
||||
title: "HAOQI©2026",
|
||||
description: "Digital Product Designer & Builder © 2026",
|
||||
// Detail pages override the title via generateMetadata in
|
||||
// app/work/[slug]/layout.tsx (original: per-page title).
|
||||
title: "北极新一©2026",
|
||||
description: "设计与工程 / 数字产品与 AI 应用 © 2026",
|
||||
};
|
||||
|
||||
export default async function RootLayout({
|
||||
@@ -45,9 +48,43 @@ export default async function RootLayout({
|
||||
const initialAccess = await getPasscodeAccessServer();
|
||||
return (
|
||||
<html
|
||||
lang="en"
|
||||
lang="zh-CN"
|
||||
className={`${tiktokSans.variable} ${geistMono.variable} ${departureMono.variable}`}
|
||||
>
|
||||
<head>
|
||||
{/* MiSans 分片 CSS:~88 片/字重 × 4 字重,浏览器只下载
|
||||
页面实际命中的 unicode-range 分片(首屏通常 <100KB)。
|
||||
有意走 public 静态资源 + <link>:350+ 分片若交给打包器
|
||||
处理会让构建显著变重(no-css-tags 警告在此预期内)。 */}
|
||||
{/* eslint-disable-next-line @next/next/no-css-tags */}
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="/fonts/misans/regular/result.css"
|
||||
precedence="default"
|
||||
suppressHydrationWarning
|
||||
/>
|
||||
{/* eslint-disable-next-line @next/next/no-css-tags */}
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="/fonts/misans/medium/result.css"
|
||||
precedence="default"
|
||||
suppressHydrationWarning
|
||||
/>
|
||||
{/* eslint-disable-next-line @next/next/no-css-tags */}
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="/fonts/misans/semibold/result.css"
|
||||
precedence="default"
|
||||
suppressHydrationWarning
|
||||
/>
|
||||
{/* eslint-disable-next-line @next/next/no-css-tags */}
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="/fonts/misans/bold/result.css"
|
||||
precedence="default"
|
||||
suppressHydrationWarning
|
||||
/>
|
||||
</head>
|
||||
<body className="min-h-screen relative">
|
||||
<PasscodeAccessProvider initialAccess={initialAccess}>
|
||||
<FullscreenTransitionProvider>
|
||||
|
||||
+20
-34
@@ -26,13 +26,13 @@ export default function Home() {
|
||||
>
|
||||
<div className="flex flex-col order-2 lg:order-1 lg:grid lg:grid-cols-12 col-span-12 font-mono text-base">
|
||||
<span className="hidden lg:block lg:col-span-3 xl:col-span-2 lg:col-start-1 xl:col-start-1 p-2 font-sans font-medium text-[4svw] sm:text-2xl lg:text-3xl leading-tight">
|
||||
<ScrambleReveal text="Design &" startDelayMs={300} letterDelayMs={10} />
|
||||
<ScrambleReveal text="设计与" startDelayMs={300} letterDelayMs={10} />
|
||||
<br />
|
||||
<ScrambleReveal text="Engineering" startDelayMs={300} letterDelayMs={10} />
|
||||
<ScrambleReveal text="工程" startDelayMs={300} letterDelayMs={10} />
|
||||
</span>
|
||||
<ScrambleReveal
|
||||
className="hidden lg:block lg:col-span-3 xl:col-span-2 lg:col-start-4 xl:col-start-5 p-2 text-balance"
|
||||
text="Thinking in systems. Designing with care."
|
||||
text="以系统思维思考,用心做出设计。"
|
||||
startDelayMs={300}
|
||||
letterDelayMs={10}
|
||||
/>
|
||||
@@ -42,9 +42,9 @@ export default function Home() {
|
||||
className="flex flex-col self-end order-1 lg:order-2 col-span-12 px-2 font-bold text-[7.2svw] lg:text-[6svw] 2xl:text-[5svw] xl:text-[5.6svw] uppercase leading-none"
|
||||
style={{ fontVariationSettings: '"wdth" 120' }}
|
||||
>
|
||||
<ScrambleReveal text="I bring" startDelayMs={300} />
|
||||
<ScrambleReveal text="craft & taste" startDelayMs={500} />
|
||||
<ScrambleReveal text="to digital work" startDelayMs={700} />
|
||||
<ScrambleReveal text="我把匠心" startDelayMs={300} />
|
||||
<ScrambleReveal text="与品味" startDelayMs={500} />
|
||||
<ScrambleReveal text="带进数字作品" startDelayMs={700} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -54,46 +54,32 @@ export default function Home() {
|
||||
<div className="flex flex-col justify-start items-start gap-6 col-span-12 sm:col-span-7 lg:col-span-8 sm:col-start-6 lg:col-start-5 text-base lg:text-xl leading-none">
|
||||
<p
|
||||
className="p-2 w-full text-l1 md:text-[4.2svw] text-xl leading-[1.3] md:leading-none select-text"
|
||||
style={{ fontFamily: "var(--font-tiktok), sans-serif" }}
|
||||
style={{
|
||||
fontFamily:
|
||||
'var(--font-tiktok), "MiSans", sans-serif',
|
||||
}}
|
||||
>
|
||||
<span>
|
||||
I explore how to shape AI-era workflows with craft and taste,
|
||||
building the next generation of digital products.
|
||||
全栈开发者,融合产品设计与工程能力,负责从产品构思、界面设计到前后端、跨端客户端的完整应用交付,现阶段深耕
|
||||
AI 应用开发。
|
||||
</span>
|
||||
</p>
|
||||
<p
|
||||
className="p-2 w-full text-l2 md:text-[4.2svw] text-xl leading-[1.3] md:leading-none select-text"
|
||||
style={{ fontFamily: "var(--font-tiktok), sans-serif" }}
|
||||
style={{
|
||||
fontFamily:
|
||||
'var(--font-tiktok), "MiSans", sans-serif',
|
||||
}}
|
||||
>
|
||||
<span>
|
||||
I’m building{" "}
|
||||
我相信工程塑造可靠的产品,设计赋予它们灵魂;
|
||||
<a
|
||||
href="https://reunimos.cc"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
href="#selected-work"
|
||||
className="inline text-l1 underline underline-offset-[0.08em] decoration-solid decoration-(--label-3) transition-[text-decoration-color] duration-150 ease-out lg:[@media(hover:hover)]:hover:decoration-(--label-1)"
|
||||
>
|
||||
reunimos™
|
||||
我的作品
|
||||
</a>
|
||||
, and previously worked on Alibaba{" "}
|
||||
<a
|
||||
href="https://www.alipan.com/"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="inline text-l1 underline underline-offset-[0.08em] decoration-solid decoration-(--label-3) transition-[text-decoration-color] duration-150 ease-out lg:[@media(hover:hover)]:hover:decoration-(--label-1)"
|
||||
>
|
||||
aDrive
|
||||
</a>
|
||||
,{" "}
|
||||
<a
|
||||
href="https://www.teambition.com/"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="inline text-l1 underline underline-offset-[0.08em] decoration-solid decoration-(--label-3) transition-[text-decoration-color] duration-150 ease-out lg:[@media(hover:hover)]:hover:decoration-(--label-1)"
|
||||
>
|
||||
Teambition
|
||||
</a>
|
||||
, and 100offer.
|
||||
里记录了这些探索的痕迹。
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -20,10 +20,10 @@ export async function generateMetadata({
|
||||
const path = `/${slug}`;
|
||||
if (isPasscodeProtectedPath(path)) {
|
||||
const access = await getPasscodeAccessServer();
|
||||
if (!access[path]) return { title: "Protected" };
|
||||
if (!access[path]) return { title: "受保护内容" };
|
||||
}
|
||||
const article = WORK_ARTICLES[path];
|
||||
return { title: article ? article.title : "HAOQI©2026" };
|
||||
return { title: article ? article.title : "北极新一©2026" };
|
||||
}
|
||||
|
||||
export default function WorkLayout({
|
||||
|
||||
+16
-16
@@ -119,7 +119,7 @@ function MdxHeading({
|
||||
<a
|
||||
href={`#${encodeURIComponent(anchorId)}`}
|
||||
onClick={onClick}
|
||||
aria-label={`Copy link to ${text}`}
|
||||
aria-label={`复制「${text}」的链接`}
|
||||
className="relative inline-block text-inherit no-underline"
|
||||
>
|
||||
<span
|
||||
@@ -215,10 +215,10 @@ function CodeBlock({
|
||||
<button
|
||||
type="button"
|
||||
onClick={onCopy}
|
||||
aria-label={copied ? "Copied code" : "Copy code"}
|
||||
className="block before:absolute relative before:inset-0 before:border-2 before:border-dotted before:border-transparent before:pointer-events-none before:transition-colors before:duration-200 lg:hover:before:border-l1 cursor-pointer px-1 py-0.5 font-mono text-xs uppercase tracking-wide text-(--label-2) transition-colors lg:hover:text-(--label-1) focus-visible:text-(--label-1) focus-visible:outline-none focus-visible:before:border-l1"
|
||||
aria-label={copied ? "已复制代码" : "复制代码"}
|
||||
className="block before:absolute relative before:inset-0 before:border-2 before:border-dotted before:border-transparent before:pointer-events-none before:transition-colors before:duration-200 lg:hover:before:border-l1 cursor-pointer px-1 py-0.5 font-mono text-xs tracking-wide text-(--label-2) transition-colors lg:hover:text-(--label-1) focus-visible:text-(--label-1) focus-visible:outline-none focus-visible:before:border-l1"
|
||||
>
|
||||
{copied ? "COPIED" : "COPY"}
|
||||
{copied ? "已复制" : "复制"}
|
||||
</button>
|
||||
</div>
|
||||
<pre className="overflow-x-auto px-4 py-2 font-mono text-xs leading-relaxed text-(--label-1) lg:px-5 lg:py-2.5 lg:text-sm">
|
||||
@@ -462,16 +462,16 @@ function ArticleFooter({ updated }: { updated: string }) {
|
||||
className="bg-[rgba(var(--label-d),0.03)] mt-16 p-4 lg:p-6 rounded-xl"
|
||||
>
|
||||
<div className="mb-5 font-sans font-semibold text-l1 text-base">
|
||||
Metadata
|
||||
元信息
|
||||
</div>
|
||||
<dl className="gap-x-6 gap-y-6 grid grid-cols-2 lg:grid-cols-3">
|
||||
{(
|
||||
[
|
||||
["Last Updated", updated],
|
||||
["Dimensions", `${viewport.w}×${viewport.h}`],
|
||||
["最后更新", updated],
|
||||
["视口尺寸", `${viewport.w}×${viewport.h}`],
|
||||
[
|
||||
"Characters",
|
||||
charCount !== null ? charCount.toLocaleString("en-US") : "—",
|
||||
"字数",
|
||||
charCount !== null ? charCount.toLocaleString("zh-CN") : "—",
|
||||
],
|
||||
] as const
|
||||
).map(([label, value]) => (
|
||||
@@ -491,29 +491,29 @@ function ArticleFooter({ updated }: { updated: string }) {
|
||||
<div className="my-6 border-line border-t border-dashed" />
|
||||
<div className="gap-x-6 gap-y-4 grid grid-cols-2 lg:grid-cols-3">
|
||||
<div className="hidden lg:block font-sans font-semibold text-l1 text-sm">
|
||||
Links
|
||||
链接
|
||||
</div>
|
||||
<div className="flex flex-col items-start gap-1 font-mono">
|
||||
<Link href="/" className={`${dotted} text-left`}>
|
||||
<ScrambleReveal text="Home" startDelayMs={300} scrambleColors={false} />
|
||||
<ScrambleReveal text="首页" startDelayMs={300} scrambleColors={false} />
|
||||
</Link>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => goAnchor("#selected-work")}
|
||||
className={`${dotted} text-left cursor-pointer`}
|
||||
>
|
||||
<ScrambleReveal text="Work" startDelayMs={300} scrambleColors={false} />
|
||||
<ScrambleReveal text="作品" startDelayMs={300} scrambleColors={false} />
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => goAnchor("#contact")}
|
||||
className={`${dotted} text-left cursor-pointer`}
|
||||
>
|
||||
<ScrambleReveal text="Contact" startDelayMs={300} scrambleColors={false} />
|
||||
<ScrambleReveal text="联系" startDelayMs={300} scrambleColors={false} />
|
||||
</button>
|
||||
</div>
|
||||
<div className="flex flex-col items-start gap-1 font-mono">
|
||||
{["Twitter/X", "Figma", "GitHub"].map((label) => (
|
||||
{["抖音", "微信", "小红书"].map((label) => (
|
||||
<a key={label} href="#" className={dotted}>
|
||||
<ScrambleReveal text={label} startDelayMs={300} scrambleColors={false} />
|
||||
</a>
|
||||
@@ -534,12 +534,12 @@ function Article({ slug }: { slug: string }) {
|
||||
404
|
||||
</h1>
|
||||
<p className="mt-1 text-l2! text-sm! lg:text-base! leading-relaxed">
|
||||
No article for this work yet.
|
||||
该作品的文章尚未完成。
|
||||
</p>
|
||||
<div className="mt-2 border-line border-b" />
|
||||
<p className="pt-3 text-l2! text-sm! lg:text-base! leading-relaxed">
|
||||
<Link className="underline underline-offset-4" href="/">
|
||||
← Home
|
||||
← 返回首页
|
||||
</Link>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
Reference in New Issue
Block a user