diff --git a/src/lib/utils/scroll.ts b/src/lib/utils/scroll.ts index d9c30160b3..b3e392a408 100644 --- a/src/lib/utils/scroll.ts +++ b/src/lib/utils/scroll.ts @@ -18,6 +18,20 @@ export const createScrollInfo = () => { let lastDirChange = 0; onMount(() => { + const handleInitialAnchor = () => { + if (window.location.hash) { + const anchorElement = document.querySelector(window.location.hash); + if (anchorElement) { + return window.pageYOffset + anchorElement.getBoundingClientRect().top; + } + } + return 0; + }; + + const initialTop = handleInitialAnchor(); + scrollInfo.set({ direction: 'down', top: initialTop, deltaDirChange: 0 }); + lastDirChange = initialTop; + const handleScroll = () => { scrollInfo.update((p) => { const top = window.scrollY; diff --git a/src/routes/pricing/+page.svelte b/src/routes/pricing/+page.svelte index c87cea06a7..9f5a84ff17 100644 --- a/src/routes/pricing/+page.svelte +++ b/src/routes/pricing/+page.svelte @@ -64,7 +64,7 @@ >
-

Starter

+

Starter

@@ -112,7 +112,7 @@ >
-

Pro

+

Pro

@@ -159,7 +159,7 @@ >
-

Scale

+

Scale

@@ -205,7 +205,7 @@ style="background:rgba(35, 35, 37, 0.90);" >
-

+

Enterprises

Coming Soon
@@ -228,7 +228,7 @@ style="background:rgba(35, 35, 37, 0.90);" >
-

+

Open-source teams