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:
2026-09-02 17:18:22 +08:00
parent 1860bc9f41
commit 285028c61d
380 changed files with 1189 additions and 181 deletions
+10 -3
View File
@@ -38,6 +38,13 @@ import { useRouteTransitionController } from "@/lib/routeTransition";
// Module-level cache mirroring the original `o` (persists across remounts).
const ratioCache: Record<string, string> = {};
/** 作品卡片右下角类型角标(post 不显示角标)。 */
const TYPE_LABELS: Record<WorkItem["type"], string> = {
post: "文章",
tools: "工具",
event: "活动",
};
export default function WorkSection() {
const [ratios, setRatios] = useState<Record<string, string>>({ ...ratioCache });
const [colWidth, setColWidth] = useState(0);
@@ -124,7 +131,7 @@ export default function WorkSection() {
function WorkCard({ item, ratio }: { item: WorkItem; ratio?: string }) {
const external = item.href.startsWith("http://") || item.href.startsWith("https://");
const cls = "group block space-y-3 p-2";
const label = `${item.name} - ${item.year}${external ? " (external)" : ""}`;
const label = `${item.name} - ${item.year}${external ? "(外部链接)" : ""}`;
const target = getLayerTarget(item.href);
const { startNavigation } = useRouteTransitionController();
const allowed = usePasscodeAllowed(item.href);
@@ -143,7 +150,7 @@ function WorkCard({ item, ratio }: { item: WorkItem; ratio?: string }) {
className="top-0 right-0 z-10 absolute bg-selection px-1 font-mono-2 text-black text-xs uppercase pointer-events-none select-none"
aria-hidden="true"
>
Coding Project
代码项目
</span>
)}
</div>
@@ -153,7 +160,7 @@ function WorkCard({ item, ratio }: { item: WorkItem; ratio?: string }) {
<span>{item.year}</span>
{item.type !== "post" && (
<span className="hidden lg:inline-flex items-center gap-1" aria-hidden="true">
<span>{item.type}</span>
<span>{TYPE_LABELS[item.type] ?? item.type}</span>
<span>↗</span>
</span>
)}