Update modal with simplified carousel and responsive sizing
This commit is contained in:
parent
f2666ce12c
commit
96e81b12c3
|
|
@ -1,16 +1,18 @@
|
|||
<template>
|
||||
<div class="flex flex-col h-full">
|
||||
<div class="relative h-[60vh] w-full flex items-center justify-center">
|
||||
<!-- Image -->
|
||||
<NuxtImg
|
||||
v-if="gallery[currentIndex]"
|
||||
:src="'/' + bucket + '/' + gallery[currentIndex].image"
|
||||
class="max-w-full max-h-full object-contain"
|
||||
/>
|
||||
<div class="flex-1 flex items-center justify-center min-h-0">
|
||||
<div class="w-full max-w-[80vw] aspect-video" style="height: 50vh;">
|
||||
<!-- Image -->
|
||||
<NuxtImg
|
||||
v-if="gallery[currentIndex]"
|
||||
:src="'/' + bucket + '/' + gallery[currentIndex].image"
|
||||
class="w-full h-full object-contain"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Dots indicator -->
|
||||
<div v-if="gallery.length > 1" class="flex gap-2 py-2 justify-center">
|
||||
<div v-if="gallery.length > 1" class="flex-none flex gap-2 py-2 justify-center">
|
||||
<button
|
||||
v-for="(img, index) in gallery"
|
||||
:key="index"
|
||||
|
|
|
|||
|
|
@ -1,23 +1,15 @@
|
|||
<template>
|
||||
<Teleport to="body">
|
||||
<div v-if="modelValue" class="fixed inset-0 z-50" @click.self="close">
|
||||
<!-- Backdrop -->
|
||||
<div class="fixed inset-0 bg-black/50" @click="close"></div>
|
||||
<div v-if="modelValue" class="fixed inset-0 z-50">
|
||||
<!-- Backdrop - click to close -->
|
||||
<div class="fixed inset-0 bg-black/50 cursor-pointer" @click="close"></div>
|
||||
|
||||
<!-- Modal Panel -->
|
||||
<div class="fixed inset-0 flex items-center justify-center p-4">
|
||||
<div class="fixed inset-0 flex items-center justify-center pointer-events-none">
|
||||
<div
|
||||
class="bg-white rounded-lg shadow-xl max-w-[85vw] max-h-[85vh] overflow-auto relative"
|
||||
class="bg-white rounded-lg shadow-xl max-w-[80vw] max-h-[85vh] overflow-hidden relative pointer-events-auto"
|
||||
:style="{ maxHeight }"
|
||||
>
|
||||
<!-- Close button -->
|
||||
<button
|
||||
@click="close"
|
||||
class="absolute top-4 right-4 z-10 text-gray-500 hover:text-gray-700 text-2xl leading-none"
|
||||
>
|
||||
×
|
||||
</button>
|
||||
|
||||
<!-- Content -->
|
||||
<slot />
|
||||
</div>
|
||||
|
|
@ -27,7 +19,7 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
defineProps({
|
||||
modelValue: Boolean,
|
||||
maxHeight: {
|
||||
type: String,
|
||||
|
|
|
|||
|
|
@ -87,8 +87,8 @@
|
|||
<iframe :src="modalStore.soundcloudUrl" class="w-64" height="20px" scrolling="no" frameborder="no" allow="autoplay"></iframe>
|
||||
</ClientOnly>
|
||||
</div>
|
||||
<div v-if="modalStore.type === 'video'" class="w-full flex items-center justify-center">
|
||||
<div class="w-full aspect-video">
|
||||
<div v-if="modalStore.type === 'video'" class="flex-1 flex items-center justify-center min-h-0">
|
||||
<div class="w-full max-w-[80vw] aspect-video" style="height: 50vh;">
|
||||
<ClientOnly>
|
||||
<iframe
|
||||
:src="'https://player.vimeo.com/video/' + modalStore.vimeo_trackid"
|
||||
|
|
@ -98,7 +98,7 @@
|
|||
webkitallowfullscreen
|
||||
mozallowfullscreen
|
||||
allowfullscreen
|
||||
class="w-full h-full"
|
||||
class="w-full h-full block"
|
||||
></iframe>
|
||||
</ClientOnly>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue