handle empty content

This commit is contained in:
nicwands 2026-06-25 12:54:04 -04:00
parent 445c7358a9
commit d36c0de7dc
2 changed files with 12 additions and 8 deletions

View file

@ -66,26 +66,30 @@ const closeWindow = ref()
const tl = shallowRef() const tl = shallowRef()
const ANIMATION_SETTINGS = { const ANIMATION_SETTINGS = {
duration: 0.5, duration: 0.5,
ease: 'power3.out', ease: 'expo.out',
} }
onMounted(() => { onMounted(() => {
tl.value = gsap.timeline() tl.value = gsap.timeline()
tl.value.fromTo( tl.value.fromTo(
dlWindow.value, dlWindow.value,
{ opacity: 0, height: 0 }, { opacity: 0, clipPath: 'inset(0% 0% 100% 0%)' },
{ opacity: 1, height: 'auto', ...ANIMATION_SETTINGS }, { opacity: 1, clipPath: 'inset(0% 0% 0% 0%)', ...ANIMATION_SETTINGS },
) )
tl.value.fromTo( tl.value.fromTo(
gifWindow.value, gifWindow.value,
{ opacity: 0, height: 0 }, { opacity: 0, clipPath: 'inset(0% 0% 100% 0%)' },
{ opacity: 1, height: 'auto', ...ANIMATION_SETTINGS }, {
opacity: 1,
clipPath: 'inset(0% 0% 0% 0%)',
...ANIMATION_SETTINGS,
},
'<+0.1', '<+0.1',
) )
tl.value.fromTo( tl.value.fromTo(
contentWindow.value, contentWindow.value,
{ opacity: 0, height: 0 }, { opacity: 0, clipPath: 'inset(0% 0% 100% 0%)' },
{ opacity: 1, height: 'auto', ...ANIMATION_SETTINGS }, { opacity: 1, clipPath: 'inset(0% 0% 0% 0%)', ...ANIMATION_SETTINGS },
'<+0.1', '<+0.1',
) )
tl.value.fromTo( tl.value.fromTo(

View file

@ -1,5 +1,5 @@
<template> <template>
<strapi-content class="strapi-copy" :content="content" /> <strapi-content v-if="content" class="strapi-copy" :content="content" />
</template> </template>
<script setup> <script setup>