unboundedpress/portfolio-nuxt/components/ImageSlider.vue

37 lines
996 B
Vue
Raw Permalink Normal View History

2023-06-11 23:53:56 +02:00
<template>
<Swiper
2023-06-12 18:00:37 +02:00
:autoHeight="true"
2023-06-15 01:37:58 +02:00
:loop="true"
2023-06-11 23:53:56 +02:00
:spaceBetween="30"
:centeredSlides="true"
:autoplay="{
2023-06-12 18:00:37 +02:00
delay: 4000,
2023-06-11 23:53:56 +02:00
disableOnInteraction: false,
2023-08-28 19:28:57 +02:00
pauseOnMouseEnter: true
2023-06-11 23:53:56 +02:00
}"
:pagination="{
clickable: true,
}"
:navigation="true"
2023-06-15 01:37:58 +02:00
:style="{
'--swiper-navigation-color': 'rgb(71 85 105)',
'--swiper-pagination-color': 'rgb(71 85 105)',
'--swiper-pagination-bottom': 'auto',
'--swiper-pagination-top': '1rem',
'--swiper-navigation-top-offset': '5rem'
}"
2023-06-11 23:53:56 +02:00
:modules="[SwiperAutoplay, SwiperPagination, SwiperNavigation]"
>
2023-06-15 01:37:58 +02:00
<SwiperSlide v-for="image in gallery" class="p-10 bg-zinc-100">
2023-06-14 19:35:23 +02:00
<nuxt-img :src="'https://unboundedpress.org/api/' + bucket + '.files/' + image.image_id + '/binary'"
2023-06-11 23:53:56 +02:00
quality="50"/>
</SwiperSlide>
</Swiper>
</template>
<script>
export default {
2023-06-14 19:35:23 +02:00
props: ['gallery', 'bucket']
2023-06-11 23:53:56 +02:00
}
</script>