diff --git a/src/components/BackgroundProvider.svelte b/src/components/BackgroundProvider.svelte new file mode 100644 index 0000000..dad4aa5 --- /dev/null +++ b/src/components/BackgroundProvider.svelte @@ -0,0 +1,115 @@ + + +
+ +
+
+
+ {#each Array(countX + offsetCount) as _, x} +
+ {#each Array(countY + offsetCount) as _, y} + + {/each} +
+ {/each} +
+
+
+ + diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 2a96771..bc3108f 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -11,6 +11,7 @@ import { bounceOut } from "svelte/easing"; import { generateTransition, transition } from "$lib/util/animation"; import { reducedMotion } from "$lib/accessibility"; + import BackgroundProvider from "$components/BackgroundProvider.svelte"; export let data: PageData; @@ -28,15 +29,16 @@ duration: 0, }; node = node.querySelector(".content") || node; + const intensity = node.dataset.intensity || "160"; const UA = navigator.userAgent; const ff = UA.indexOf("Firefox") > -1; if (!dropdownCloseFinished) { node.animate( [ { - top: "160px", + top: `${intensity}px`, opacity: "0", - filter: ff ? "none" : "blur(20px)", + filter: ff ? "none" : `blur(${parseInt(intensity) / 16}px)`, }, { top: "0", @@ -58,9 +60,9 @@ node.animate( [ { - top: "-240px", + top: `${-intensity}px`, opacity: "0", - filter: ff ? "none" : "blur(20px)", + filter: ff ? "none" : `blur(${parseInt(intensity) / 16}px)`, }, { top: "0", @@ -84,6 +86,7 @@ duration: 0, }; node = node.querySelector(".content") || node; + const intensity = node.dataset.intensity || "160"; if (!dropdownCloseFinished) return { duration: 0, @@ -98,9 +101,9 @@ filter: ff ? "none" : "blur(0px)", }, { - top: "240px", + top: `${intensity}px`, opacity: "0", - filter: ff ? "none" : "blur(80px)", + filter: ff ? "none" : `blur(${parseInt(intensity) / 16}px)`, }, ], { @@ -213,6 +216,15 @@ }); +{#if navigator.userAgent.indexOf("Firefox") === -1} +
+ +
+{/if} +
@@ -306,7 +318,7 @@
-1 ? "bg-[#0e0d10]" : "bg-[rgba(0,0,0,0.25)] backdrop-blur-xl"} fixed left-0 z-[99999] h-screen w-full p-9 pt-[120px] ${dropdownOpen ? "pointer-events-auto visible opacity-100" : "pointer-events-none opacity-0"} ${!dropdownOpen && dropdownCloseFinished ? "invisible" : ""}`} >