diff --git a/src/lib/Helper.mjs b/src/lib/Helper.mjs index 5cdcf05..6a522c3 100755 --- a/src/lib/Helper.mjs +++ b/src/lib/Helper.mjs @@ -95,3 +95,7 @@ export function getIsMobile() { export function getBlurredPath(path) { return `${path.substring(0, path.lastIndexOf('/'))}/generated_${path.split('/').at(-1)}` } + +export function getRandom(array) { + return array.at(Math.floor(Math.random() * array.length)) +} diff --git a/src/lib/components/Quotes.js b/src/lib/components/Quotes.js new file mode 100755 index 0000000..162d0ce --- /dev/null +++ b/src/lib/components/Quotes.js @@ -0,0 +1,13 @@ +export const quotes = [ + `Lt. Dixon Piper: +Why did he do it? Why did Cunth kill your wife? + +MacGruber: +To this day, I have no idea. We actually all went to college together. Believe it or not, we were very close friends. \nThen after graduation, he got engaged to her. He asked me to be his best man and right about that time, I started banging her and mowing her box. \nShe was actually the first person I felt comfortable enough around to let eat out my butt. \nAnyway, shortly thereafter, she left him for me. She was actually carrying his child at the time. I asked her to terminate it, obviously, so we could start fresh. And she agreed. We were so in love. \nAnd he took that from me. + +Lt. Dixon Piper: +That's really f***ed up. + +MacGruber: +Thanks.` +] diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 3654202..556058c 100755 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,9 +1,17 @@ diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 37a6a8c..b39ad99 100755 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -5,25 +5,8 @@ import Hero from './Hero.svelte' import InstallSlice from './InstallSlice.svelte' import PreviewRiceSlice from './PreviewRiceSlice.svelte' - import { onMount } from 'svelte' export let data - - onMount(() => { - import.meta.env.DEV && - console.log(` -Lt. Dixon Piper: -Why did he do it? Why did Cunth kill your wife? - -MacGruber: -To this day, I have no idea. We actually all went to college together. Believe it or not, we were very close friends. \nThen after graduation, he got engaged to her. He asked me to be his best man and right about that time, I started banging her and mowing her box. \nShe was actually the first person I felt comfortable enough around to let eat out my butt. \nAnyway, shortly thereafter, she left him for me. She was actually carrying his child at the time. I asked her to terminate it, obviously, so we could start fresh. And she agreed. We were so in love. \nAnd he took that from me. - -Lt. Dixon Piper: -That's really f***ed up. - -MacGruber: -Thanks.`) - }) diff --git a/src/routes/DiscordProfilePicture.svelte b/src/routes/DiscordProfilePicture.svelte index d039b38..ca021c2 100755 --- a/src/routes/DiscordProfilePicture.svelte +++ b/src/routes/DiscordProfilePicture.svelte @@ -45,6 +45,7 @@ function onViewEnter() { setTimeout(() => (hasEnteredView = true), 550) + // Only load the library if the element entered the view, to improve performance import('interactjs').then(({ default: interact }) => { interactionjs = interact(imageElement).draggable({ inertia: { resistance: lerp(5, 200, relativeSize) }, @@ -115,10 +116,7 @@ /> {#if quote} -