From f68892875702de03a063c8680a000084f230eed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Pe=CC=81ault?= Date: Sat, 13 Aug 2022 16:10:01 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Make=20About=20page=20stacking=20ca?= =?UTF-8?q?rd=20scroll=20effect?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using Motion One example, thanks to https://codepen.io/bramus/pen/rNdzpZK (by Bramus) --- package.json | 1 + pnpm-lock.yaml | 74 +++++++++++++++++++++ src/components/molecules/ProcessStep.svelte | 24 ++----- src/routes/about.svelte | 52 +++++++++------ src/style/molecules/_process-step.scss | 60 +++++++---------- src/style/pages/_about.scss | 16 +++-- 6 files changed, 143 insertions(+), 84 deletions(-) diff --git a/package.json b/package.json index a5a215c..f285c23 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "dayjs": "^1.11.4", "embla-carousel": "^7.0.0", "focus-visible": "^5.2.0", + "motion": "^10.13.3", "ogl": "^0.0.97", "sanitize.css": "^13.0.0", "tweakpane": "^3.1.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5e4ece3..dbe75d2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,6 +17,7 @@ specifiers: eslint: ^8.21.0 eslint-plugin-svelte3: ^4.0.0 focus-visible: ^5.2.0 + motion: ^10.13.3 ogl: ^0.0.97 postcss: ^8.4.16 postcss-focus-visible: ^7.1.0 @@ -40,6 +41,7 @@ dependencies: dayjs: 1.11.4 embla-carousel: 7.0.0 focus-visible: 5.2.0 + motion: 10.13.3 ogl: 0.0.97 sanitize.css: 13.0.0 tweakpane: 3.1.0 @@ -298,6 +300,67 @@ packages: - supports-color dev: true + /@motionone/animation/10.13.2: + resolution: {integrity: sha512-YGWss58IR2X4lOjW89rv1Q+/Nq/QhfltaggI7i8sZTpKC1yUvM+XYDdvlRpWc6dk8LviMBrddBJAlLdbaqeRmw==} + dependencies: + '@motionone/easing': 10.13.2 + '@motionone/types': 10.13.2 + '@motionone/utils': 10.13.2 + tslib: 2.4.0 + dev: false + + /@motionone/dom/10.13.2: + resolution: {integrity: sha512-THCRW+M7JUTbHRiWFJU13pju7bZlnPjZz9VDXA/h/Qj/Or7LvzKY/XfEy45rUlO0wXSa4lQ+1DGlrZNewamdDA==} + dependencies: + '@motionone/animation': 10.13.2 + '@motionone/generators': 10.13.2 + '@motionone/types': 10.13.2 + '@motionone/utils': 10.13.2 + hey-listen: 1.0.8 + tslib: 2.4.0 + dev: false + + /@motionone/easing/10.13.2: + resolution: {integrity: sha512-3HqctS5NyDfDQ+8+cZqc3Pu7I6amFCt9zDUjcozHyFXHh4PKYHK4+GJDFjJIS8bCAF2BrJmpmduDQ2V7lFEYeQ==} + dependencies: + '@motionone/utils': 10.13.2 + tslib: 2.4.0 + dev: false + + /@motionone/generators/10.13.2: + resolution: {integrity: sha512-QMoXV1MXEEhR6D3dct/RMMS1FwJlAsW+kMPbFGzBA4NbweblgeYQCft9DcDAVpV9wIwD6qvlBG9u99sOXLfHiA==} + dependencies: + '@motionone/types': 10.13.2 + '@motionone/utils': 10.13.2 + tslib: 2.4.0 + dev: false + + /@motionone/svelte/10.13.2: + resolution: {integrity: sha512-p6gH7oGhbonHzrPeUPzZiU3dx2yjDYQ7K00w9GaTbXBfmH/+rjUQ6vvG5SPvjY6BLtMK3/FMK512WvOMtvDQPQ==} + dependencies: + '@motionone/dom': 10.13.2 + tslib: 2.4.0 + dev: false + + /@motionone/types/10.13.2: + resolution: {integrity: sha512-yYV4q5v5F0iADhab4wHfqaRJnM/eVtQLjUPhyEcS72aUz/xyOzi09GzD/Gu+K506BDfqn5eULIilUI77QNaqhw==} + dev: false + + /@motionone/utils/10.13.2: + resolution: {integrity: sha512-6Lw5bDA/w7lrPmT/jYWQ76lkHlHs9fl2NZpJ22cVy1kKDdEH+Cl1U6hMTpdphO6VQktQ6v2APngag91WBKLqlA==} + dependencies: + '@motionone/types': 10.13.2 + hey-listen: 1.0.8 + tslib: 2.4.0 + dev: false + + /@motionone/vue/10.13.2: + resolution: {integrity: sha512-DfMzOUwKlzyjpwxF+RP1Q74ClmeoanPAeSGfD/JTvAyR1W6ARCOBMFpdgDvile1o7FNgHGx2RHt8210MsOE59g==} + dependencies: + '@motionone/dom': 10.13.2 + tslib: 2.4.0 + dev: false + /@nodelib/fs.scandir/2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -1848,6 +1911,17 @@ packages: hasBin: true dev: true + /motion/10.13.3: + resolution: {integrity: sha512-lfBuoZL8xo0djAD3zGrMuSuc4J9MquE6hzRCsO9cVp+DgIUvNmvbM7+7SrZtpjLKxPWbppm+P56FRtVvMcGj1A==} + dependencies: + '@motionone/animation': 10.13.2 + '@motionone/dom': 10.13.2 + '@motionone/svelte': 10.13.2 + '@motionone/types': 10.13.2 + '@motionone/utils': 10.13.2 + '@motionone/vue': 10.13.2 + dev: false + /mri/1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} diff --git a/src/components/molecules/ProcessStep.svelte b/src/components/molecules/ProcessStep.svelte index 2c20b0c..bae8d43 100644 --- a/src/components/molecules/ProcessStep.svelte +++ b/src/components/molecules/ProcessStep.svelte @@ -3,7 +3,6 @@ - - -
+
{#if image} {image.title} {/if} +

{title}

{@html text}
+ +
\ No newline at end of file diff --git a/src/routes/about.svelte b/src/routes/about.svelte index 2c38dd3..1bc9088 100644 --- a/src/routes/about.svelte +++ b/src/routes/about.svelte @@ -5,6 +5,7 @@