unboundedpress/portfolio/components/ImageSlider.vue

39 lines
1.1 KiB
Vue
Raw 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]"
class="h-full flex items-center justify-center"
2023-06-11 23:53:56 +02:00
>
<SwiperSlide v-for="image in gallery" class="!flex !items-center !justify-center !h-auto !py-10 !bg-zinc-100">
<NuxtImg :src="'/' + bucket + '/' + image.image"
style="max-width: calc(100% - 80px); max-height: 70vh; object-fit: contain;"/>
2023-06-11 23:53:56 +02:00
</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>