Files
personal/app/page.tsx
T
virtheart a844b26250 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
2026-09-01 20:33:36 +08:00

116 lines
5.5 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import ScrambleReveal from "@/components/dom/ScrambleReveal";
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)
*/
export default function Home() {
return (
// NOTE: the original scrolls INSIDE <main> (its Lenis wraps the main
// container), which is what lets its position:sticky children pin. Our
// Lenis is window-level, so main must NOT be a scroll container —
// otherwise sticky (hyper-space section) never pins.
<main className="w-full">
<div>
{/* Banner Section */}
<div
data-section="banner"
className="grid grid-cols-12 grid-rows-[auto_1fr] px-4 lg:px-14 py-18 lg:py-24 w-full h-dvh lg:h-screen"
>
<div className="flex flex-col order-2 lg:order-1 lg:grid lg:grid-cols-12 col-span-12 font-mono text-base">
<span className="hidden lg:block lg:col-span-3 xl:col-span-2 lg:col-start-1 xl:col-start-1 p-2 font-sans font-medium text-[4svw] sm:text-2xl lg:text-3xl leading-tight">
<ScrambleReveal text="Design &" startDelayMs={300} letterDelayMs={10} />
<br />
<ScrambleReveal text="Engineering" startDelayMs={300} letterDelayMs={10} />
</span>
<ScrambleReveal
className="hidden lg:block lg:col-span-3 xl:col-span-2 lg:col-start-4 xl:col-start-5 p-2 text-balance"
text="Thinking in systems. Designing with care."
startDelayMs={300}
letterDelayMs={10}
/>
<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"
style={{ fontVariationSettings: '"wdth" 120' }}
>
<ScrambleReveal text="I bring" startDelayMs={300} />
<ScrambleReveal text="craft & taste" startDelayMs={500} />
<ScrambleReveal text="to digital work" startDelayMs={700} />
</div>
</div>
{/* Signature / About Section */}
<div className="grid grid-cols-12 px-4 lg:px-14 py-18 lg:py-24 lg:pb-28 w-full">
<AboutMedia />
<div className="flex flex-col justify-start items-start gap-6 col-span-12 sm:col-span-7 lg:col-span-8 sm:col-start-6 lg:col-start-5 text-base lg:text-xl leading-none">
<p
className="p-2 w-full text-l1 md:text-[4.2svw] text-xl leading-[1.3] md:leading-none select-text"
style={{ fontFamily: "var(--font-tiktok), sans-serif" }}
>
<span>
I explore how to shape AI-era workflows with craft and taste,
building the next generation of digital products.
</span>
</p>
<p
className="p-2 w-full text-l2 md:text-[4.2svw] text-xl leading-[1.3] md:leading-none select-text"
style={{ fontFamily: "var(--font-tiktok), sans-serif" }}
>
<span>
I’m building{" "}
<a
href="https://reunimos.cc"
target="_blank"
rel="noopener noreferrer"
className="inline text-l1 underline underline-offset-[0.08em] decoration-solid decoration-(--label-3) transition-[text-decoration-color] duration-150 ease-out lg:[@media(hover:hover)]:hover:decoration-(--label-1)"
>
reunimos™
</a>
, and previously worked on Alibaba{" "}
<a
href="https://www.alipan.com/"
target="_blank"
rel="noopener noreferrer"
className="inline text-l1 underline underline-offset-[0.08em] decoration-solid decoration-(--label-3) transition-[text-decoration-color] duration-150 ease-out lg:[@media(hover:hover)]:hover:decoration-(--label-1)"
>
aDrive
</a>
,{" "}
<a
href="https://www.teambition.com/"
target="_blank"
rel="noopener noreferrer"
className="inline text-l1 underline underline-offset-[0.08em] decoration-solid decoration-(--label-3) transition-[text-decoration-color] duration-150 ease-out lg:[@media(hover:hover)]:hover:decoration-(--label-1)"
>
Teambition
</a>
, and 100offer.
</span>
</p>
</div>
</div>
{/* Selected Work grid (id="selected-work", WebGL image layers) */}
<WorkSection />
{/* Hyper-space scroll section (id="hyper-space"): the WebGL
hyperspace arrow (cursor.glb stripes) tracks this section's
screen rect and engulfs the viewport mid-scroll. */}
<HyperSpaceSection />
{/* Contact / Footer Section (#contact, data-section="footer") */}
<FooterSection />
</div>
</main>
);
}