feat: 路由转场+详情页+自定义滚动条+常显网格线+邮箱修复
- 新增 FullscreenTransitionProvider + RouteTransitionOverlay: cover(0.8s b1 遮罩 wipe) → push → reveal 状态机(原 73475/34841 移植), Work 卡片与详情页链接全部走 startNavigation(同路径点击回顶部) - 新增 app/work/[slug] 详情页:content/workArticles.ts 从原站 6 个详情页 1:1 提取(MDX 文章+Metadata+iframe 预览+Links),/2026 锁定时渲染解锁屏 - 新增 CustomScrollbar:桌面右缘 SVG 轨道+拖拽 thumb(188 轨道/min20)、 点击跳转、2s 自动隐藏;移动端底部进度环回顶按钮(原 72443 移植) - BackgroundGrid 重写为原版算法(3 行十字/12px 缺口/12 列内分数纵线, 主页 loading 时隐藏其余时间常显);层叠改为原版结构:canvas z-auto 最前 → grid z-20 → DOM 内容,移除各 section 的 z-30 - 修复 BGM:持久化开启时首次手势自动恢复播放(autoplay 策略被拒后 pointerdown/keydown/touchstart 重试),enabled 闭包改用 ref - 页脚邮箱改为 chenchun@virtheart.com
This commit is contained in:
+21
-7
@@ -4,9 +4,12 @@ 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({
|
||||
@@ -39,15 +42,26 @@ export default async function RootLayout({
|
||||
}>) {
|
||||
const initialAccess = await getPasscodeAccessServer();
|
||||
return (
|
||||
<html lang="en" className={`${tiktokSans.variable} ${geistMono.variable} ${departureMono.variable}`}>
|
||||
<html
|
||||
lang="en"
|
||||
className={`${tiktokSans.variable} ${geistMono.variable} ${departureMono.variable}`}
|
||||
>
|
||||
<body className="min-h-screen relative">
|
||||
<PasscodeAccessProvider initialAccess={initialAccess}>
|
||||
<BackgroundGrid />
|
||||
<HeroScene />
|
||||
<SmoothScroller />
|
||||
<Header />
|
||||
{children}
|
||||
<LoadingOverlay />
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user