Initial commit
This commit is contained in:
parent
97249b1cfa
commit
e51ffdca91
@ -8,6 +8,16 @@
|
|||||||
export let yOffset = 6;
|
export let yOffset = 6;
|
||||||
export let inViewMargin = "-50px";
|
export let inViewMargin = "-50px";
|
||||||
export let blur = "6px";
|
export let blur = "6px";
|
||||||
|
const generateUUID = () =>
|
||||||
|
typeof crypto?.randomUUID === "function"
|
||||||
|
? crypto.randomUUID()
|
||||||
|
: "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
|
||||||
|
const r = (Math.random() * 16) | 0;
|
||||||
|
return (c === "x" ? r : (r & 0x3) | 0x8).toString(16);
|
||||||
|
});
|
||||||
|
|
||||||
|
export let id = generateUUID().slice(0, 8);
|
||||||
|
|
||||||
export let id = browser ? crypto.randomUUID().slice(0, 8) : "fallback-id";
|
export let id = browser ? crypto.randomUUID().slice(0, 8) : "fallback-id";
|
||||||
export let once = false;
|
export let once = false;
|
||||||
let defaultVariants = {
|
let defaultVariants = {
|
||||||
|
@ -4,8 +4,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import BlurFade from "./BlurFade.svelte";
|
import BlurFade from "./BlurFade.svelte";
|
||||||
import { browser } from "$app/environment";
|
import { browser } from "$app/environment";
|
||||||
|
|
||||||
export let id = browser ? crypto.randomUUID().slice(0, 8) : "fallback-id";
|
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.hero p {
|
.hero p {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user