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:
@@ -1,16 +1,16 @@
|
||||
"use client";
|
||||
|
||||
/**
|
||||
* About-paragraph passcode easter egg — 1:1 port of the original components
|
||||
* `c9` + `c2` (chunk 4d3f3b68dbbde33a.js):
|
||||
* About-paragraph passcode easter egg — ported from the original components
|
||||
* `c9` + `c2` (chunk 4d3f3b68dbbde33a.js),品牌标签国内化为「小红书」:
|
||||
*
|
||||
* - Locked: the brand label slot scrambles as "■■■■■■" (each char wrapped,
|
||||
* - Locked: the brand label slot scrambles as "■■" (each char wrapped,
|
||||
* PASSCODE_LOCKED_CHAR_CLASS); clicking navigates through the route
|
||||
* transition to /unlock/2026?return=%2F.
|
||||
* - Unlocked: the slot settles to the "TikTok" button span — long-press
|
||||
* - Unlocked: the slot settles to the "小红书" button span — long-press
|
||||
* (500ms) or context-menu re-locks (confirm + reload).
|
||||
* - The reveal sequence (ScrambleReveal) treats the label as a slot part, so
|
||||
* its 6 characters participate in the per-char scramble timing.
|
||||
* its characters participate in the per-char scramble timing.
|
||||
*/
|
||||
import { useCallback, useRef } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
@@ -30,8 +30,8 @@ import {
|
||||
} from "@/lib/passcode";
|
||||
|
||||
const SCOPE = primaryPasscodePath(); // "/2026"
|
||||
const BRAND = revealBrandLabel(); // "TikTok"
|
||||
const BRAND_LEN = revealBrandLabelLength(); // 6
|
||||
const BRAND = revealBrandLabel(); // "小红书"
|
||||
const BRAND_LEN = revealBrandLabelLength(); // 2
|
||||
|
||||
function RevealLabelButton() {
|
||||
const allowed = usePasscodeAllowed(SCOPE);
|
||||
@@ -47,7 +47,7 @@ function RevealLabelButton() {
|
||||
|
||||
const relock = useCallback(async () => {
|
||||
if (
|
||||
window.confirm("Lock protected content again? You will need the passcode to view it.")
|
||||
window.confirm("要重新锁定受保护的内容吗?再次查看需要输入口令。")
|
||||
) {
|
||||
await logoutPasscodeAccess({ reload: true });
|
||||
}
|
||||
@@ -62,7 +62,7 @@ function RevealLabelButton() {
|
||||
<span
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
aria-label="Protected — enter passcode to reveal"
|
||||
aria-label="受保护内容 — 输入口令后显示"
|
||||
className="inline-flex items-baseline gap-[0.12em] mx-[0.06em] align-baseline cursor-pointer select-text"
|
||||
onClick={go}
|
||||
onKeyDown={(e) => {
|
||||
@@ -87,7 +87,7 @@ function RevealLabelButton() {
|
||||
<span
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
aria-label={`${BRAND} — long press to lock again`}
|
||||
aria-label={`${BRAND} — 长按可重新锁定`}
|
||||
className="inline mx-[0.06em] align-baseline cursor-default select-none"
|
||||
onPointerDown={() => {
|
||||
clearTimer();
|
||||
@@ -117,14 +117,14 @@ export default function PasscodeRevealText({
|
||||
}) {
|
||||
const allowed = usePasscodeAllowed(SCOPE);
|
||||
const parts = [
|
||||
"I'm Haoqi Wen, leading Design Engineering and AI exploration at ",
|
||||
"我是北极新一,一名横跨设计与工程的全栈开发者:Web 前端与后端、Flutter 客户端、AI 应用开发都有实践,也从产品设计一路做到工程落地。工作之外,我常在 ",
|
||||
{
|
||||
length: BRAND_LEN,
|
||||
scramble: allowed ? BRAND : passcodeLockedPlaceholderText(),
|
||||
className: allowed ? undefined : PASSCODE_LOCKED_SCRAMBLE_CLASS,
|
||||
settled: <RevealLabelButton />,
|
||||
},
|
||||
", engineering, and AI at scale. Outside work, I build design tools for team efficiency.",
|
||||
" 上记录与分享这些探索。",
|
||||
];
|
||||
return (
|
||||
<ScrambleReveal
|
||||
|
||||
Reference in New Issue
Block a user