diff --git a/AGENTS.md b/AGENTS.md index eae6c34..3461705 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -178,7 +178,9 @@ pnpm test:loading # 빌드 후 로딩 분리, 재시도, SSG 회귀 검사 ### Reader and browser regression checks - `scripts/image-assets.ts`에서 본문 이미지의 WebP와 크기 메타데이터를 생성합니다. 원본 파일은 유지합니다. -- 글 본문은 최대 800px, 1280px 이상에서 옆 목차, 작은 화면에서 접는 목차를 사용합니다. +- 글 본문과 목차 전체는 최대 1152px로 중앙 정렬합니다. 1280px 이상에서 본문 최대 912px + 간격 32px + 목차 208px로 배치하고, 작은 화면에서는 접는 목차를 사용합니다. +- SSR 본문에 목차 대상 제목이 있으면 접힌 목차의 48px 높이를 hydration 전부터 확보합니다. +- 태그·시리즈·소개·분석의 열 전환은 페이지나 목록의 실제 가용폭을 기준으로 합니다. - `useHydratedSearchParams`로 첫 렌더를 SSG와 맞춘 후 필터를 적용합니다. 404 프리렌더 표시가 있으면 클라이언트도 404 라우트로 시작합니다. - `pnpm preview`는 GitHub Pages의 실제 404 응답을 재현합니다. - 이동·hydration·접근성 변경 후 `pnpm build`, `pnpm test:browser`를 실행합니다. diff --git a/src/components/PostImage.tsx b/src/components/PostImage.tsx index 41c6b9b..7f00479 100644 --- a/src/components/PostImage.tsx +++ b/src/components/PostImage.tsx @@ -5,6 +5,6 @@ export function PostImage({ src, alt = "", ...props }: ComponentPropsWithoutRef< const asset = src ? images[src] : undefined return {alt} } diff --git a/src/index.css b/src/index.css index da85374..f3da51c 100644 --- a/src/index.css +++ b/src/index.css @@ -386,7 +386,7 @@ html.theme-transition *::after { } .page-container-article { - --page-container-max-width: 72rem; + --page-container-max-width: 57rem; } .page-container-wide { @@ -394,9 +394,10 @@ html.theme-transition *::after { } /* 글 본문과 목차를 화면 크기에 맞춰 배치한다. */ -.post-page-layout { display: flex; flex-direction: column; gap: 1.5rem; } -.page-container-article { --page-container-max-width: 50rem; } +.post-page-layout { display: flex; flex-direction: column; gap: 1.5rem; width: 100%; max-width: 72rem; margin-inline: auto; } .post-toc-layer { order: -1; position: sticky; top: 3rem; z-index: 30; } +/* SSR 본문에 목차 대상이 있으면 hydration 전부터 접힌 목차 높이를 확보한다. */ +.post-page-layout:has(.prose h2[id], .prose h3[id]) .post-toc-layer { min-height: 3rem; } .post-toc-panel { padding: .5rem .75rem; background: var(--background); } .post-toc-desktop-title { display: none; } .post-toc-list { display: none; margin-top: .75rem; max-height: 50vh; overflow-y: auto; } @@ -408,7 +409,7 @@ html.theme-transition *::after { .prose h2, .prose h3 { scroll-margin-top: 5rem; } } @media (min-width: 1280px) { - .post-page-layout { display: grid; grid-template-columns: minmax(0, 50rem) 13rem; gap: 2rem; max-width: 65rem; margin-inline: auto; align-items: start; } + .post-page-layout { display: grid; grid-template-columns: minmax(0, 1fr) 13rem; gap: 2rem; align-items: start; } .post-article-centered { grid-column: 1; grid-row: 1; } .post-toc-layer { grid-column: 2; grid-row: 1; top: 2rem; } .post-toc-panel { padding: .75rem; } diff --git a/src/pages/AboutPage.tsx b/src/pages/AboutPage.tsx index ed029a9..5cb0294 100644 --- a/src/pages/AboutPage.tsx +++ b/src/pages/AboutPage.tsx @@ -61,7 +61,7 @@ function CompanySection({ const t = useT() return ( -
+
{/* Left: Company Info */}

{company.name}

@@ -70,7 +70,7 @@ function CompanySection({
{/* Right: Projects */} -
+
{company.projects.map((ps, index) => { const project = projects.find((p) => p.slug === ps.slug) if (!project) return null @@ -214,17 +214,17 @@ export function AboutPage() { } return ( - + {/* Profile Header */} -
- +
+ HJ -
+

{resume.profile.name}

{t.about.description}

-
+ -
+