Fix image carousel sizing and modal height for audio
This commit is contained in:
parent
9d1391eae0
commit
4bf23f0d25
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<Swiper
|
||||
:autoHeight="true"
|
||||
:autoHeight="false"
|
||||
:loop="true"
|
||||
:spaceBetween="30"
|
||||
:centeredSlides="true"
|
||||
|
|
@ -21,12 +21,12 @@
|
|||
'--swiper-navigation-top-offset': '5rem'
|
||||
}"
|
||||
:modules="[SwiperAutoplay, SwiperPagination, SwiperNavigation]"
|
||||
class="h-full flex items-center justify-center"
|
||||
class="h-full w-full"
|
||||
>
|
||||
|
||||
<SwiperSlide v-for="image in gallery" class="!flex !items-center !justify-center !h-auto !py-10 !bg-zinc-100">
|
||||
<SwiperSlide v-for="(image, index) in gallery" :key="image.id || index" class="!flex !items-center !justify-center !py-4 !bg-zinc-100">
|
||||
<img :src="'/' + bucket + '/' + image.image"
|
||||
style="max-width: calc(100% - 80px); max-height: 70vh; object-fit: contain;"/>
|
||||
style="max-width: 100%; max-height: calc(85vh - 40px); object-fit: contain;"/>
|
||||
</SwiperSlide>
|
||||
</Swiper>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -12,11 +12,13 @@ const props = withDefaults(
|
|||
modelValue?: boolean
|
||||
persistent?: boolean
|
||||
fullscreen?: boolean
|
||||
maxHeight?: string
|
||||
}>(),
|
||||
{
|
||||
modelValue: false,
|
||||
persistent: false,
|
||||
fullscreen: false,
|
||||
maxHeight: '85vh',
|
||||
},
|
||||
)
|
||||
|
||||
|
|
@ -93,11 +95,12 @@ provide('modal', api)
|
|||
leave-to="opacity-0 scale-95"
|
||||
>
|
||||
<DialogPanel
|
||||
class="w-full transform overflow-hidden bg-white text-left align-middle shadow-xl transition-all max-h-[85vh]"
|
||||
class="w-full transform overflow-hidden bg-white text-left align-middle shadow-xl transition-all"
|
||||
:class="{
|
||||
'h-screen': fullscreen,
|
||||
'max-w-[85vw] rounded-lg': !fullscreen,
|
||||
}"
|
||||
:style="!fullscreen ? { maxHeight } : {}"
|
||||
>
|
||||
<slot />
|
||||
</DialogPanel>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
:src="'https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/' + audioPlayerStore.soundcloud_trackid + '&inverse=false&auto_play=true&show_user=false'"></iframe>
|
||||
</div>
|
||||
|
||||
<Modal v-model="modalStore.isOpen">
|
||||
<Modal v-model="modalStore.isOpen" :maxHeight="modalStore.type === 'image' && modalStore.soundcloudUrl ? 'calc(85vh + 60px)' : '85vh'">
|
||||
<ModalBody :class="modalStore.aspect">
|
||||
<ImageSlider v-if="modalStore.type === 'image'" :bucket="modalStore.bucket" :gallery="modalStore.gallery"></ImageSlider>
|
||||
<div v-if="modalStore.type === 'image' && modalStore.soundcloudUrl" class="flex justify-center mt-2">
|
||||
|
|
|
|||
Loading…
Reference in a new issue