"use client"; /** * Work detail pages — /work/[slug] rendering the original MDX article * markup 1:1 (from https://haoqi.design/reunimos et al.): * *
*
*
*
h1 + date + hr + year
*
blocks
*
* * Content comes from content/workArticles.ts (extracted from the live * pages). Passcode-protected scopes (/2026) render the unlock screen when * locked, exactly like the original. */ import { Suspense, useMemo } from "react"; import Link from "next/link"; import { useParams } from "next/navigation"; import { WORK_ARTICLES, type ArticleBlock, type InlineSeg, } from "@/content/workArticles"; import { usePasscodeAllowed } from "@/components/dom/PasscodeAccess"; import { useRouteTransitionController } from "@/lib/routeTransition"; import { PasscodeUnlockScreen } from "@/components/dom/PasscodeUnlockScreen"; import { buildPasscodeUnlockHref, primaryPasscodePath, scopeToPath } from "@/lib/passcode"; import CustomScrollbar from "@/components/dom/CustomScrollbar"; const PROSE_CLASS = "[&_p+p]:mt-3 [&_p]:mb-0 text-l2 [&_p]:text-sm [&_p]:text-l1 [&_p]:leading-relaxed lg:[&_p]:text-base"; function Inline({ segs }: { segs: InlineSeg[] }) { return ( <> {segs.map((s, i) => s.t === "link" ? ( {s.v} ) : ( {s.v} ) )} ); } function Block({ block }: { block: ArticleBlock }) { switch (block.type) { case "p": return (

); case "h2": return

{block.text}

; case "h3": return

{block.text}

; case "img": // eslint-disable-next-line @next/next/no-img-element -- original uses plain img with cursor-zoom-in return ( ); case "hr": return
; case "list": return block.ordered ? (
    {block.items.map((li, i) => (
  1. ))}
) : ( ); case "quote": return (
{block.items.map((q, i) => (

{q}

))}
); case "code": return (
          {block.text}
        
); default: return null; } } function Article({ slug }: { slug: string }) { const article = WORK_ARTICLES[slug]; if (!article) { return (

404

No article for this work yet.

← Home

); } return (

{article.title}

{article.date}

{article.year}

{article.blocks.map((b, i) => ( ))} {article.iframe && (