From 4b46e792259754150dbeb6fa263408257c81ca47 Mon Sep 17 00:00:00 2001 From: Martin Trapp <94928215+martrapp@users.noreply.github.com> Date: Wed, 13 Nov 2024 20:48:11 +0100 Subject: [PATCH] fix demos --- src/components/LightDark.astro | 1 + src/pages/shaft-demo/1.astro | 2 + src/pages/shaft-demo/2.astro | 2 + src/pages/shaft-demo/_Layout.astro | 30 +- src/pages/shaft-demo2/1.astro | 2 + src/pages/shaft-demo2/2.astro | 2 + src/pages/shaft-demo2/_Layout.astro | 510 +++++++++++++--------------- 7 files changed, 254 insertions(+), 295 deletions(-) diff --git a/src/components/LightDark.astro b/src/components/LightDark.astro index 8d40f68..ca6ea08 100644 --- a/src/components/LightDark.astro +++ b/src/components/LightDark.astro @@ -9,4 +9,5 @@ (window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"); + _.classList.add(_.dataset.theme); diff --git a/src/pages/shaft-demo/1.astro b/src/pages/shaft-demo/1.astro index ac49eae..21cd2fe 100644 --- a/src/pages/shaft-demo/1.astro +++ b/src/pages/shaft-demo/1.astro @@ -1,9 +1,11 @@ --- import Layout from "./_Layout.astro"; import Description from "./_Description1.astro"; +import Bsky from "../../components/Bsky.astro"; ---

Pseudo-Smooth-Scrolling Demo 1/2

+
diff --git a/src/pages/shaft-demo/2.astro b/src/pages/shaft-demo/2.astro index 05014d5..bcc8e84 100644 --- a/src/pages/shaft-demo/2.astro +++ b/src/pages/shaft-demo/2.astro @@ -1,9 +1,11 @@ --- import Layout from "./_Layout.astro"; import Description from "./_Description2.astro"; +import Bsky from "@/components/Bsky.astro"; ---

Pseud-Smooth-Scrolling Demo 2/2

+
diff --git a/src/pages/shaft-demo/_Layout.astro b/src/pages/shaft-demo/_Layout.astro index b95670a..10a0b22 100644 --- a/src/pages/shaft-demo/_Layout.astro +++ b/src/pages/shaft-demo/_Layout.astro @@ -1,4 +1,5 @@ --- +import LightDark from "@/components/LightDark.astro"; import TurnSignal from "@vtbag/turn-signal?url"; export interface Props { @@ -13,23 +14,8 @@ const { title } = Astro.props; {title} - + -
@@ -41,7 +27,6 @@ const { title } = Astro.props; href="/tips/pseudo-smooth-scrolling/#interactive-demo" id="back">Exit -