mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Add video row and card elements
This commit is contained in:
parent
19371492dc
commit
31ec38f5ed
2 changed files with 122 additions and 0 deletions
41
components/video/row.vue
Normal file
41
components/video/row.vue
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<template>
|
||||
<div class="video-row w-full">
|
||||
<div
|
||||
:style="{
|
||||
scrollSnapType: 'x mandatory'
|
||||
}"
|
||||
class="video-row-contents flex overflow-x-auto whitespace-no-wrap py-2 space-x-6"
|
||||
>
|
||||
<VideoCard
|
||||
v-for="video in videos"
|
||||
:key="video.slug"
|
||||
:video="video"
|
||||
:style="{
|
||||
maxWidth: '350px',
|
||||
flexBasis: '350px',
|
||||
flexGrow: '0',
|
||||
scrollSnapAlign: 'start'
|
||||
}"
|
||||
class="w-full flex-shrink-0 flex-grow-0"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import VideoCard from '~/components/video/card.vue'
|
||||
|
||||
|
||||
export default {
|
||||
components: {
|
||||
VideoCard
|
||||
},
|
||||
props: {
|
||||
videos: {
|
||||
type: Array,
|
||||
required: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue