diff --git a/package-lock.json b/package-lock.json index 56d0729..e7d6d75 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,9 @@ "": { "name": "openbirchmockupsite", "version": "0.0.1", + "dependencies": { + "svelte-parallax": "^0.6.0" + }, "devDependencies": { "@fontsource/fira-mono": "^4.5.10", "@neoconfetti/svelte": "^1.0.0", @@ -1457,6 +1460,11 @@ "node": ">=8" } }, + "node_modules/focus-options-polyfill": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/focus-options-polyfill/-/focus-options-polyfill-1.6.0.tgz", + "integrity": "sha512-uyrAmLZrPnUItQY5wTdg31TO9GGZRGsh/jmohUg9oLmLi/sw5y7LlTV/mwyd6rvbxIOGwmRiv6LcTS8w7Bk9NQ==" + }, "node_modules/foreground-child": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", @@ -2704,6 +2712,14 @@ "svelte": "^3.19.0 || ^4.0.0" } }, + "node_modules/svelte-parallax": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/svelte-parallax/-/svelte-parallax-0.6.0.tgz", + "integrity": "sha512-W2dGPNmK274AmL8Ibzr96luh24jr3u2MfAmAJTpnhAZwxkRws5MKgCxfxBBPvpRUc2GpGGIGanhTYXoHV6DcBw==", + "dependencies": { + "focus-options-polyfill": "^1.6.0" + } + }, "node_modules/svelte-preprocess": { "version": "5.1.4", "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-5.1.4.tgz", diff --git a/package.json b/package.json index 8021e80..6dd0de3 100644 --- a/package.json +++ b/package.json @@ -26,5 +26,8 @@ "typescript": "^5.0.0", "vite": "^5.0.3" }, - "type": "module" + "type": "module", + "dependencies": { + "svelte-parallax": "^0.6.0" + } } diff --git a/src/lib/videos/DifferentialEquation.gif b/src/lib/videos/DifferentialEquation.gif new file mode 100644 index 0000000..f608940 Binary files /dev/null and b/src/lib/videos/DifferentialEquation.gif differ diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index ccc5c9f..ad41020 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -23,14 +23,7 @@ } main { - flex: 1; - display: flex; - flex-direction: column; - padding: 1rem; width: 100%; - max-width: 64rem; - margin: 0 auto; - box-sizing: border-box; } footer { diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 218d282..5d81197 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -2,14 +2,15 @@ import Counter from './Counter.svelte'; import welcome from '$lib/images/svelte-welcome.webp'; import welcome_fallback from '$lib/images/svelte-welcome.png'; + import differencialBackgroundVideo from '$lib/videos/DifferentialEquation.gif'; import "tailwindcss/tailwind.css"; - const sleep = (ms) => { + const sleep = (ms: number) => { return new Promise((resolve) => setTimeout(resolve, ms)); }; let isAutoTyping = true; - let textField; + let textField: HTMLInputElement; async function startTyping(){ for (let charecter of "testing..."){ if (!isAutoTyping) break; @@ -18,8 +19,14 @@ } } + async function resetFeild() { + textField.value = ""; + } + import { onMount } from 'svelte'; + import { Parallax, ParallaxLayer, StickyLayer } from 'svelte-parallax'; onMount(() => { + resetFeild(); startTyping(); }) @@ -30,18 +37,40 @@
-
-
-

- Welcome to
- OpenBirch -

-
-
-
- -
-
+ + +
+ Background +
+
+
+

+ Welcome to
+ OpenBirch +

+
+
+
+ +
+
+
+
+
+ +
+
+

+ Welcome to
+ OpenBirch +

+
+
+
+
+
+
+