Skip to content

Commit

Permalink
feat: scroll card
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyinws committed Nov 30, 2023
1 parent 6be34f4 commit 8aa4363
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 9 deletions.
13 changes: 7 additions & 6 deletions components/ScrollCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ const ORIGIN = __ORIGIN__ || window.location.origin
<template>
<div class="container mt-10">
<div class="horizontal-scrolling-items gap-4">
<div v-for="i in 2" :key="i" class="flex gap-4">
<NuxtImg class="sm:h-[150px] sm:w-[400px] w-[311px] h-[117px]" :src="`${ORIGIN}/example/1.svg`" />
<NuxtImg class="sm:h-[150px] sm:w-[400px] w-[311px] h-[117px]" :src="`${ORIGIN}/example/2.svg`" />
<NuxtImg class="sm:h-[150px] sm:w-[400px] w-[311px] h-[117px]" :src="`${ORIGIN}/example/3.svg`" />
<NuxtImg class="sm:h-[150px] sm:w-[400px] w-[311px] h-[117px]" :src="`${ORIGIN}/example/4.svg`" />
</div>
<Vue3Marquee
:loop="0"
clone
pause-on-hover
>
<NuxtImg v-for="i in 4" :key="i" class="sm:h-[150px] sm:w-[400px] w-[311px] h-[117px] mr-5" :src="`${ORIGIN}/example/${i}.svg`" />
</Vue3Marquee>
</div>
</div>
</template>
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"openid": "^2.0.10",
"sass": "^1.67.0",
"uuid": "^9.0.1",
"vue-sonner": "^0.4.4"
"vue-sonner": "^0.4.4",
"vue3-marquee": "^4.1.0"
},
"devDependencies": {
"@antfu/eslint-config": "^2.1.1",
Expand Down
5 changes: 5 additions & 0 deletions plugins/Vue3Marquee.client.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Vue3Marquee from 'vue3-marquee'

export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use(Vue3Marquee, { name: 'Vue3Marquee' })
})
17 changes: 15 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 comment on commit 8aa4363

@vercel
Copy link

@vercel vercel bot commented on 8aa4363 Nov 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.