From 596ec2ff44b83cc76fb1cd9d5608fa061562bde9 Mon Sep 17 00:00:00 2001 From: dusk Date: Sat, 2 Nov 2024 00:05:10 +0300 Subject: [PATCH] feat: make windows stackable properly --- src/components/window.svelte | 12 ++++++++++-- src/lib/index.ts | 2 +- src/lib/window.ts | 3 +++ 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 src/lib/window.ts diff --git a/src/components/window.svelte b/src/components/window.svelte index 21a530b..4b50f8c 100644 --- a/src/components/window.svelte +++ b/src/components/window.svelte @@ -1,4 +1,5 @@
{ + $highestZIndex += 1 + data.currentNode.style.zIndex = $highestZIndex.toString() + } + }} class=" - flex flex-col {sticky ? 'md:sticky md:-top-9' : ''} {center ? "mx-auto" : ""} + relative flex flex-col {sticky ? 'md:sticky md:-top-9' : ''} {center ? "mx-auto" : ""} max-w-screen-md xl:max-w-screen-lg 2xl:max-w-screen-xl min-w-[30ch] lg:min-w-[40ch] w-full md:w-fit [height:fit-content] bg-ralsei-black border-ralsei-white border-ridge border-8 border-t-[12px] animate-{chosenKeyframe} diff --git a/src/lib/index.ts b/src/lib/index.ts index 87429b1..3e34001 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -26,4 +26,4 @@ export const loginToBsky = async () => { await creds.login({identifier: 'gaze.systems', password: env.BSKY_PASSWORD ?? "" }) return new Agent(creds) } -export const bskyClient = writable(null) +export const bskyClient = writable(null) \ No newline at end of file diff --git a/src/lib/window.ts b/src/lib/window.ts new file mode 100644 index 0000000..2becdf1 --- /dev/null +++ b/src/lib/window.ts @@ -0,0 +1,3 @@ +import { writable } from "svelte/store"; + +export const highestZIndex = writable(0) \ No newline at end of file