d5a1228aac
- 暗色主题 1:1:ThemeModeProvider 原逻辑(localStorage 'theme' light/dark/system、system 跟随 prefers-color-scheme、<html> class 切换), CSS tokens 按原站 .dark 块翻值(--label/--background-deep/--code-*); shellMedia 重构为 useSyncExternalStore 单例 store(Header 与 Canvas 共享) - WebGL 主题分支:BackgroundFX 暗色渐变(#2c4bd5/#00000d/#00344C + outputMix .95/edgeIntensity -.82,原 sj 配置)、DotOverlay #0F1111、 LoadingCurtain #191b1b、玻璃模型暗色参数组(shininess 100/fresnel .72/ brightness .6/uDark=1 Hard-Light)与暗色 tint(hello #64c3ff、 footer #8e9dc4/#64c3ff) - /2026 路由:rewrite 补 2026(此前 404),workArticles 增加 /2026 占位文章 (原站内容被服务端口令保密无法读取,已注释说明);解锁屏→刷新→服务端 放行全链路 CDP 验证通过 - 逐页 <title>:app/work/[slug]/layout.tsx generateMetadata 映射作品名 (reunimos→Reunimos™),受保护 /2026 未解锁时 SSR 'Protected'(原站行为), 根标题改回原站 'HAOQI©2026'
72 lines
2.4 KiB
TypeScript
72 lines
2.4 KiB
TypeScript
import type { Metadata } from "next";
|
|
import localFont from "next/font/local";
|
|
import "./globals.css";
|
|
import SmoothScroller from "@/components/dom/SmoothScroller";
|
|
import Header from "@/components/dom/Header";
|
|
import BackgroundGrid from "@/components/dom/BackgroundGrid";
|
|
import CustomScrollbar from "@/components/dom/CustomScrollbar";
|
|
import LoadingOverlay from "@/components/dom/LoadingOverlay";
|
|
import { HeroScene } from "@/components/canvas/HeroScene";
|
|
import { PasscodeAccessProvider } from "@/components/dom/PasscodeAccess";
|
|
import { FullscreenTransitionProvider } from "@/lib/routeTransition";
|
|
import RouteTransitionOverlay from "@/components/dom/RouteTransitionOverlay";
|
|
import { getPasscodeAccessServer } from "@/lib/passcodeServer";
|
|
|
|
const tiktokSans = localFont({
|
|
src: "./fonts/TikTokSans.ttf",
|
|
variable: "--font-tiktok",
|
|
display: "swap",
|
|
});
|
|
|
|
const geistMono = localFont({
|
|
src: "./fonts/GeistMono[wght].ttf",
|
|
variable: "--font-mono",
|
|
display: "swap",
|
|
});
|
|
|
|
const departureMono = localFont({
|
|
src: "./fonts/DepartureMono-Regular.otf",
|
|
variable: "--font-mono-2",
|
|
display: "swap",
|
|
});
|
|
|
|
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",
|
|
};
|
|
|
|
export default async function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
const initialAccess = await getPasscodeAccessServer();
|
|
return (
|
|
<html
|
|
lang="en"
|
|
className={`${tiktokSans.variable} ${geistMono.variable} ${departureMono.variable}`}
|
|
>
|
|
<body className="min-h-screen relative">
|
|
<PasscodeAccessProvider initialAccess={initialAccess}>
|
|
<FullscreenTransitionProvider>
|
|
{/* Original stacking (1:1): the WebGL canvas host is a plain `fixed`
|
|
z-auto element first in the body; the grid overlay (z-20) comes
|
|
AFTER it in DOM order so it paints above the canvas, exactly like
|
|
the original's main > canvas + z-20 grid sibling. */}
|
|
<HeroScene />
|
|
<BackgroundGrid />
|
|
<SmoothScroller />
|
|
<Header />
|
|
{children}
|
|
<CustomScrollbar />
|
|
<RouteTransitionOverlay />
|
|
<LoadingOverlay />
|
|
</FullscreenTransitionProvider>
|
|
</PasscodeAccessProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|