From cdf411a649764d4edb5fb3099cc9c156b48ecb8a Mon Sep 17 00:00:00 2001 From: kiosion Date: Tue, 17 Oct 2023 11:20:29 -0400 Subject: [PATCH] fix: Misc responsive stuff --- .../document/content/common/header.svelte | 26 +++++-- .../layouts/scroll-container.svelte | 3 +- .../serializers/custom-heading.svelte | 27 ++++--- svelte-app/src/lib/summary.ts | 71 ++++++++++--------- svelte-app/src/routes/+layout.svelte | 6 +- 5 files changed, 80 insertions(+), 53 deletions(-) diff --git a/svelte-app/src/components/document/content/common/header.svelte b/svelte-app/src/components/document/content/common/header.svelte index 401c5708f..96d4cf0ba 100644 --- a/svelte-app/src/components/document/content/common/header.svelte +++ b/svelte-app/src/components/document/content/common/header.svelte @@ -29,10 +29,7 @@
-

+

{data.title}

@@ -75,3 +72,24 @@
+ + diff --git a/svelte-app/src/components/layouts/scroll-container.svelte b/svelte-app/src/components/layouts/scroll-container.svelte index 434ab70d9..a129078b8 100644 --- a/svelte-app/src/components/layouts/scroll-container.svelte +++ b/svelte-app/src/components/layouts/scroll-container.svelte @@ -30,6 +30,7 @@ beforeNavigate(() => { summaryVisible.set(false); + visibleHeadings.set(new Set()); }); afterNavigate(() => { @@ -37,8 +38,6 @@ clearTimeout(timeout); } - visibleHeadings.set(new Set()); - timeout = setTimeout(() => { element.scrollTo({ top: 0, diff --git a/svelte-app/src/components/portable-text/serializers/custom-heading.svelte b/svelte-app/src/components/portable-text/serializers/custom-heading.svelte index 3b416d3a8..b0d7f51c5 100644 --- a/svelte-app/src/components/portable-text/serializers/custom-heading.svelte +++ b/svelte-app/src/components/portable-text/serializers/custom-heading.svelte @@ -1,10 +1,8 @@