From b4ff605c88056f092174df9ace1f6884e367b74b Mon Sep 17 00:00:00 2001 From: Alfarish Fizikri Date: Wed, 23 Jul 2025 07:33:44 +0700 Subject: [PATCH 1/4] Create component --- src/constants/Categories.ts | 3 +- src/constants/Components.ts | 1 + .../code/Components/rollingGalleryCode.ts | 26 ++ .../RollingGallery/RollingGallery.vue | 392 ++++++++++++++++++ src/demo/Components/RollingGalleryDemo.vue | 94 +++++ 5 files changed, 515 insertions(+), 1 deletion(-) create mode 100644 src/constants/code/Components/rollingGalleryCode.ts create mode 100644 src/content/Components/RollingGallery/RollingGallery.vue create mode 100644 src/demo/Components/RollingGalleryDemo.vue diff --git a/src/constants/Categories.ts b/src/constants/Categories.ts index ac41eb1..9d04b2b 100644 --- a/src/constants/Categories.ts +++ b/src/constants/Categories.ts @@ -80,7 +80,8 @@ export const CATEGORIES = [ 'Flowing Menu', 'Elastic Slider', 'Stack', - 'Chroma Grid' + 'Chroma Grid', + 'Rolling Gallery' ] }, { diff --git a/src/constants/Components.ts b/src/constants/Components.ts index d543dc2..32129c0 100644 --- a/src/constants/Components.ts +++ b/src/constants/Components.ts @@ -69,6 +69,7 @@ const components = { 'tilted-card': () => import('../demo/Components/TiltedCardDemo.vue'), 'stack': () => import('../demo/Components/StackDemo.vue'), 'chroma-grid': () => import('../demo/Components/ChromaGridDemo.vue'), + 'rolling-gallery': () => import('../demo/Components/RollingGalleryDemo.vue'), }; const backgrounds = { diff --git a/src/constants/code/Components/rollingGalleryCode.ts b/src/constants/code/Components/rollingGalleryCode.ts new file mode 100644 index 0000000..19b8085 --- /dev/null +++ b/src/constants/code/Components/rollingGalleryCode.ts @@ -0,0 +1,26 @@ +import code from '@content/Components/RollingGallery/RollingGallery.vue?raw'; +import { createCodeObject } from '@/types/code.ts'; + +export const rollingGallery = createCodeObject(code, 'Components/RollingGallery', { + installation: `npm install motion-v`, + usage: ` + +` +}); diff --git a/src/content/Components/RollingGallery/RollingGallery.vue b/src/content/Components/RollingGallery/RollingGallery.vue new file mode 100644 index 0000000..33fef45 --- /dev/null +++ b/src/content/Components/RollingGallery/RollingGallery.vue @@ -0,0 +1,392 @@ + + + + + diff --git a/src/demo/Components/RollingGalleryDemo.vue b/src/demo/Components/RollingGalleryDemo.vue new file mode 100644 index 0000000..60a27d1 --- /dev/null +++ b/src/demo/Components/RollingGalleryDemo.vue @@ -0,0 +1,94 @@ + + + + + From 39c9820182b40d054ef15f197de28e3f8a89240f Mon Sep 17 00:00:00 2001 From: Alfarish Fizikri Date: Thu, 24 Jul 2025 05:07:27 +0700 Subject: [PATCH 2/4] refactor(style): utilize tailwind instead of CSS --- .../RollingGallery/RollingGallery.vue | 117 +++--------------- src/demo/Components/RollingGalleryDemo.vue | 83 ++++++------- 2 files changed, 54 insertions(+), 146 deletions(-) diff --git a/src/content/Components/RollingGallery/RollingGallery.vue b/src/content/Components/RollingGallery/RollingGallery.vue index 33fef45..b19d145 100644 --- a/src/content/Components/RollingGallery/RollingGallery.vue +++ b/src/content/Components/RollingGallery/RollingGallery.vue @@ -1,11 +1,12 @@