diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 1fa4930..a28b90a 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -13,6 +13,7 @@ export interface Props { canonicalURL?: string; pubDatetime?: Date; modDatetime?: Date; + scrollSmooth?: boolean; } const { @@ -23,6 +24,7 @@ const { canonicalURL = new URL(Astro.url.pathname, Astro.site).href, pubDatetime, modDatetime, + scrollSmooth = false, } = Astro.props; const socialImageURL = new URL( @@ -32,7 +34,10 @@ const socialImageURL = new URL( --- - +
diff --git a/src/layouts/PostDetails.astro b/src/layouts/PostDetails.astro index 24e32fe..5af12aa 100644 --- a/src/layouts/PostDetails.astro +++ b/src/layouts/PostDetails.astro @@ -40,6 +40,7 @@ const layoutProps = { modDatetime, canonicalURL, ogImage: ogUrl, + scrollSmooth: true, }; --- diff --git a/src/styles/base.css b/src/styles/base.css index c0105b0..e787768 100644 --- a/src/styles/base.css +++ b/src/styles/base.css @@ -20,9 +20,6 @@ --color-card-muted: 138, 51, 2; --color-border: 171, 75, 8; } - html { - scroll-behavior: smooth; - } #sun-svg, html[data-theme="dark"] #moon-svg { display: none;