diff --git a/src/lib/Helper.mjs b/src/lib/Helper.mjs index 13bb13e..782bea4 100755 --- a/src/lib/Helper.mjs +++ b/src/lib/Helper.mjs @@ -1,6 +1,7 @@ /* eslint-disable no-useless-escape */ import { inview } from 'svelte-inview' import { pick } from 'remeda' +import { Observable, debounceTime, share, startWith, throttleTime } from 'rxjs' /** * Fade: The initial opacity from 0 to 1. @@ -100,3 +101,16 @@ export function getBlurredPath(path) { export function getRandom(array) { return array.at(Math.floor(Math.random() * array.length)) } + +const fps = 1000 / 60 // 60 frames per second +export const mousePosition$ = new Observable((subscriber) => { + // eslint-disable-next-line no-undef + if (globalThis.document === undefined) { + return + } + document.addEventListener('mousemove', nextPostion) + function nextPostion({ clientX, clientY }) { + subscriber.next({ clientX, clientY }) + } + return () => document?.removeEventListener('mousemove', nextPostion) +}).pipe(throttleTime(fps), share(), startWith({ clientX: 0, clientY: 0 })) diff --git a/src/lib/PatternBackground.svelte b/src/lib/PatternBackground.svelte index 2b48b73..fc60e3d 100644 --- a/src/lib/PatternBackground.svelte +++ b/src/lib/PatternBackground.svelte @@ -1,40 +1,78 @@ + +
(isMouseOver = false)} - on:mousemove={({ clientX, clientY }) => { - isMouseOver = true - mouse$.next([clientX, clientY]) - }} + on:mouseleave={() => isMouseOver$.next(false)} + on:mousemove={() => isMouseOver$.next(true)} aria-hidden bind:this={wrapperElement} > @@ -42,8 +80,7 @@ class="gradient" style:--x={$gradientWiggle.at(0) + 'px'} style:--y={$gradientWiggle.at(1) + 'px'} - style:--size={gradientSize + 'px'} - class:hidden={!isMouseOver} + style:--size={$gradientSize$ + 'px'} >
@@ -51,11 +88,11 @@ id="background-pattern-id" x="0" y="0" - width="32" - height="32" + width="30" + height="30" patternUnits="userSpaceOnUse" > - + .wrapper { - /* mask-image: radial-gradient(closest-side, black 50%, transparent); */ - /* contain: strict; */ + mask-image: linear-gradient(black 75%, transparent); + contain: strict; user-select: none; } svg { background: theme(colors.black); - /* background: theme(colors.black); */ - /* background-blend-mode: difference; */ } .gradient { @@ -89,7 +124,12 @@ mix-blend-mode: color-dodge; height: var(--size); width: var(--size); - background: radial-gradient(closest-side, theme(colors.cyan.700), transparent); + background: radial-gradient( + closest-side, + theme(colors.cyan.300), + theme(colors.blue.950 / 100%) 30%, + transparent + ); opacity: 100%; translate: var(--x) var(--y); z-index: 20; diff --git a/src/lib/components/Video.svelte b/src/lib/components/Video.svelte new file mode 100644 index 0000000..9b0bf50 --- /dev/null +++ b/src/lib/components/Video.svelte @@ -0,0 +1,76 @@ + + + + + diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index b39ad99..6810528 100755 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -5,6 +5,7 @@ import Hero from './Hero.svelte' import InstallSlice from './InstallSlice.svelte' import PreviewRiceSlice from './PreviewRiceSlice.svelte' + import PluginsSlice from './PluginsSlice.svelte' export let data @@ -21,6 +22,8 @@ + + diff --git a/src/routes/PluginsSlice.svelte b/src/routes/PluginsSlice.svelte new file mode 100644 index 0000000..e218ed2 --- /dev/null +++ b/src/routes/PluginsSlice.svelte @@ -0,0 +1,126 @@ + + +
+
+
+
+

Unlock full power

+

+ Get the latest features Linux offers. Have full controll over your workflow by customizing + and extending it how you want. +

+
+ +
+ {#each items as { icon, title, description }, index} + {@const isActive = index === activeIndex} + + {/each} +
+ + +
+ + +
+ {#each items as { src, poster }, index} +
+
+ + +
+ + diff --git a/static/videos/aylur.mp4 b/static/videos/aylur.mp4 new file mode 100644 index 0000000..896e422 Binary files /dev/null and b/static/videos/aylur.mp4 differ diff --git a/static/videos/aylur_thumb.png b/static/videos/aylur_thumb.png new file mode 100644 index 0000000..c2f4f02 Binary files /dev/null and b/static/videos/aylur_thumb.png differ diff --git a/static/videos/hypr_plugins_thumb.webp b/static/videos/hypr_plugins_thumb.webp new file mode 100644 index 0000000..048121b Binary files /dev/null and b/static/videos/hypr_plugins_thumb.webp differ diff --git a/static/videos/outfoxxed.mp4 b/static/videos/outfoxxed.mp4 new file mode 100644 index 0000000..0557428 Binary files /dev/null and b/static/videos/outfoxxed.mp4 differ