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
4 changes: 2 additions & 2 deletions src/lib/components/Toc.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
let desktop: boolean | undefined
let open: boolean | undefined
let headings: HTMLHeadingElement[] | undefined
let sidebarTop = 16 // Initial top offset in rem (below banner)
const maxTop = 14
let sidebarTop = maxTop // Initial top offset in rem (below banner)

// Track scroll to adjust sidebar position
onMount(() => {
const bannerHeight = 275 // Scroll distance in pixels for full transition (higher = slower)
const minTop = 1 // Minimum top value in rem when scrolled past banner
const maxTop = 16 // Maximum top value in rem when at page top

function handleScroll() {
const scrollY = window.scrollY
Expand Down
4 changes: 4 additions & 0 deletions src/routes/[slug]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
text-transform: none;
}

hgroup {
margin-top: 0;
}

.banner {
margin: 1.5rem 0 2rem;
border-radius: 12px;
Expand Down
Loading