Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion scripts/copy-images.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
Expand Down
4 changes: 4 additions & 0 deletions src/app/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
15 changes: 15 additions & 0 deletions src/app/styles/prose.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/mdx-content/ui/MdxImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
/>
</button>
Expand Down
Loading