diff --git a/scripts/copy-images.mjs b/scripts/copy-images.mjs index 584c12d6..90f6da94 100644 --- a/scripts/copy-images.mjs +++ b/scripts/copy-images.mjs @@ -68,7 +68,8 @@ function main() { try { const srcStat = statSync(srcFile); const destStat = statSync(destFile); - if (destStat.mtimeMs >= srcStat.mtimeMs) { + // 이름만 바꾼 파일은 내용 수정 시각이 그대로라 시각만 보면 건너뛴다. 크기까지 본다 + if (destStat.mtimeMs >= srcStat.mtimeMs && destStat.size === srcStat.size) { shouldCopy = false; skipped++; } diff --git a/src/app/styles/globals.css b/src/app/styles/globals.css index fd5eaac0..de29a51f 100644 --- a/src/app/styles/globals.css +++ b/src/app/styles/globals.css @@ -256,6 +256,10 @@ max-width: 90vw; } +@utility max-h-mdx-image { + max-height: min(70vh, 35rem); +} + [data-toc-panel], [data-toc-opener] { transition-property: opacity, transform, visibility; diff --git a/src/app/styles/prose.css b/src/app/styles/prose.css index 04f52a45..84c9640b 100644 --- a/src/app/styles/prose.css +++ b/src/app/styles/prose.css @@ -43,6 +43,21 @@ line-height: var(--leading-prose); } +/* 볼드만 있는 문단은 소제목으로 쓴다. MDX가 이것을 p 없이 strong 하나로 내보내 인라인이 되므로 + 블록으로 세워야 간격이 먹는다. 위를 띄우고 아래를 붙여 뒤따르는 내용과 한 덩어리로 보이게 한다 */ +.prose > strong { + display: block; + margin-top: 32px; +} + +.prose > strong + :is(p, ul, ol, pre, table, blockquote) { + margin-top: 10px; +} + +.prose > strong + :is(ul, ol) > li:first-child { + margin-top: 0; +} + .prose a { color: var(--color-accent-default); text-decoration: underline; diff --git a/src/widgets/mdx-content/ui/MdxImage.tsx b/src/widgets/mdx-content/ui/MdxImage.tsx index 0519b826..0de2b211 100644 --- a/src/widgets/mdx-content/ui/MdxImage.tsx +++ b/src/widgets/mdx-content/ui/MdxImage.tsx @@ -49,7 +49,7 @@ export function MdxImage({ alt, caption, className, src, ...rest }: MdxImageProp loading="lazy" decoding="async" src={imageSrc} - className={cn("block h-auto max-w-full rounded-lg", className)} + className={cn("max-h-mdx-image block h-auto w-auto max-w-full rounded-lg", className)} {...rest} />