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:
@@ -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