diff --git a/src/lib/components/admin/ContentEditor.svelte b/src/lib/components/admin/ContentEditor.svelte index 4054766..5005354 100644 --- a/src/lib/components/admin/ContentEditor.svelte +++ b/src/lib/components/admin/ContentEditor.svelte @@ -38,7 +38,7 @@ function trackPreview() { if (!preview || navigatingPreview) return; - const top = preview.getBoundingClientRect().top + 24; + const top = preview.getBoundingClientRect().top + 120; let active = -1; previewHeadings.forEach((heading, index) => { if (heading.getBoundingClientRect().top <= top) active = index; diff --git a/src/lib/components/admin/MarkdownEditor.svelte b/src/lib/components/admin/MarkdownEditor.svelte index 4da5367..7eb0368 100644 --- a/src/lib/components/admin/MarkdownEditor.svelte +++ b/src/lib/components/admin/MarkdownEditor.svelte @@ -74,7 +74,7 @@ scrollFrame = 0; if (!view || navigationPending) return; const rect = view.contentDOM.getBoundingClientRect(); - const top = Math.max(toolbar.getBoundingClientRect().bottom + 12, rect.top + 1); + const top = Math.max(toolbar.getBoundingClientRect().bottom + 120, rect.top + 1); if (top >= window.innerHeight || top >= rect.bottom) return; const position = view.posAtCoords({ x: rect.left + 8, y: top }, false); if (position !== null) onPositionChange?.(position); diff --git a/src/routes/posts/[slug]/+page.svelte b/src/routes/posts/[slug]/+page.svelte index 109880d..720b34e 100644 --- a/src/routes/posts/[slug]/+page.svelte +++ b/src/routes/posts/[slug]/+page.svelte @@ -68,7 +68,7 @@ listItemClass: 'toc-list-item', collapseDepth: 0, scrollSmooth: true, - headingsOffset: 20 + headingsOffset: 120 }); if (window.innerWidth < 1200) {