feat: 移植首页 passcode 彩蛋(■■■■■■ → /unlock/2026 解锁 TikTok 品牌名与隐藏作品卡)

- lib/passcode.ts:module 58156/28116 移植——primaryPasscodePath("/2026")、buildPasscodeUnlockHref("/unlock/2026?return=%2F")、slotCount:4、品牌名按原站 charCode-1 混淆解码(TikTok)、锁定占位符与字符/散段样式类
- PasscodeAccess.tsx:module 4278 移植——access store(useSyncExternalStore + passcode-access-changed 事件驱动刷新)、usePasscodeAllowed/usePasscodeAccessLookup、submit/logout(POST /api/passcode)
- PasscodeUnlockScreen:4 格圆环输入(inset ring label-1/label-3 + caret-blink 光标)、满 4 位自动提交、错误 shake(WAAPI 等价原 framer x 关键帧抖动)、成功 'Access granted' 600ms 后 replace 回来源、已解锁进入立即跳回
- layout 挂 PasscodeAccessProvider(服务端 cookies 读初始 access);新增 /api/passcode GET/POST(httpOnly cookie 持久化,解锁码经 PASSCODE_CODE 配置,默认 2026)与 /unlock/[scope] 页
- ScrambleReveal 支持 slot part({length,scramble,className,settled}):打散期显示占位字符、收尾替换为交互节点,1:1 原版语义
- 首页 about 段换 c9/c2 移植:锁定点击跳解锁页、解锁显示 TikTok、长按 500ms/右键 confirm 重锁;WorkSection 按 access 过滤,解锁后 TikTok 卡(tt01/tt02 素材)出现在首位
- CDP 全流程验证:锁定→解锁→持久化→重锁 循环 + 错码抖动清空 + 卡片数 10↔11
This commit is contained in:
2026-09-01 19:21:52 +08:00
parent 71825606a4
commit 8ce5471c25
13 changed files with 864 additions and 72 deletions
+2 -11
View File
@@ -3,13 +3,13 @@ import AboutMedia from "@/components/dom/AboutMedia";
import FooterSection from "@/components/dom/FooterSection";
import WorkSection from "@/components/dom/WorkSection";
import HyperSpaceSection from "@/components/dom/HyperSpaceSection";
import PasscodeRevealText from "@/components/dom/PasscodeRevealText";
/**
* Page content matching the original DOM (haoqi_body.html):
* - banner section (h-dvh) with meta row + big title, all scramble-revealed
* - signature/about section (kept simple)
*/
const PASSCODE_LENGTH = 6;
export default function Home() {
return (
@@ -36,16 +36,7 @@ export default function Home() {
startDelayMs={300}
letterDelayMs={10}
/>
<ScrambleReveal
className="col-span-12 lg:col-span-6 xl:col-span-4 lg:col-start-7 xl:col-start-9 mt-auto lg:mt-0 p-2"
startDelayMs={300}
letterDelayMs={10}
parts={[
"I'm Haoqi Wen, leading Design Engineering and AI exploration at ",
"■".repeat(PASSCODE_LENGTH),
", engineering, and AI at scale. Outside work, I build design tools for team efficiency.",
]}
/>
<PasscodeRevealText className="col-span-12 lg:col-span-6 xl:col-span-4 lg:col-start-7 xl:col-start-9 mt-auto lg:mt-0 p-2" />
</div>
<div
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 relative z-30"