@@ -31,18 +31,20 @@ const { data: cardData } = useAsyncData(`carousel-card-${props.uuid}`, () =>
3131<template >
3232 <div :class =" ['carousel-card-content', { 'carousel-card--focused': props.isFocused }]" >
3333 <BaseDirectusImage v-if =" cardData?.image" :uuid =" cardData?.image as string" :alt =" cardData?.title ?? ''" />
34- <Transition name = " fade " >
35- <div v-show = " props.isFocused " class =" card-content " >
34+ <div class = " content-container " >
35+ <div class = " card-content " : class =" { 'is-hidden': !props.isFocused } " >
3636 <h2 class =" title" >{{ cardData?.title }}</h2 >
3737 <p v-if =" cardData?.description" class =" description" >{{ cardData?.description }}</p >
38- <BlockButtonGroup
39- v-if =" cardData?.block_button_group"
40- class =" custom-button-group"
41- :uuid =" cardData?.block_button_group.id as string"
42- :align =" cardData.block_button_group.alignment"
43- />
38+ <div class =" button-container" >
39+ <BlockButtonGroup
40+ v-if =" cardData?.block_button_group"
41+ class =" custom-button-group"
42+ :uuid =" cardData?.block_button_group.id as string"
43+ :align =" cardData.block_button_group.alignment"
44+ />
45+ </div >
4446 </div >
45- </Transition >
47+ </div >
4648 </div >
4749</template >
4850<style lang="scss" scoped>
@@ -56,59 +58,71 @@ const { data: cardData } = useAsyncData(`carousel-card-${props.uuid}`, () =>
5658 img {
5759 border-radius : var (--rounded-lg );
5860 margin-bottom : var (--space-3 );
61+ width : 100% ;
62+ object-fit : cover ;
5963 }
60- .card-content {
61- display : flex ;
62- flex-direction : column ;
63- align-items : center ;
64- gap : var (--space-4 );
65- padding-bottom : var (--space-2 );
66- }
67- h2 {
68- font-style : normal ;
69- font-family : var (--family-display );
70- background : linear-gradient (143deg , var (--primary-500 ) 0% , var (--secondary ) 100% );
71- background-clip : text ;
72- -webkit-background-clip : text ;
73- -webkit-text-fill-color : transparent ;
74- position : relative ;
75- z-index : 1 ;
76- max-width : var (--space-80 );
77- word-wrap : break-word ;
78- line-height : var (--line-height-2xl );
64+ }
7965
80- overflow-wrap : break-word ;
81- }
82- .description {
83- order : 1 ;
84- min-height : calc (var (--line-height-2xl ) * 1.5 );
85- @media (max-width : 768px ) {
86- max-width : 80% ;
87- }
88- }
89- .custom-button-group {
90- order : 2 ;
91- display : flex ;
92- flex-wrap : nowrap !important ;
93- justify-content : center ;
94- align-items : center ;
95- gap : var (--space-4 );
96- }
97- .custom-button-group :deep (.button-group ) {
98- display : flex ;
99- flex-wrap : nowrap !important ;
100- justify-content : center ;
101- align-items : center ;
102- }
66+ .content-container {
67+ position : relative ;
68+ width : 100% ;
10369}
104- .fade-enter-active ,
105- .fade-leave-active {
70+
71+ .card-content {
72+ display : flex ;
73+ flex-direction : column ;
74+ align-items : center ;
75+ gap : var (--space-4 );
76+ padding-bottom : var (--space-2 );
10677 transition : opacity 0.3s ease-in-out ;
10778}
108- .fade-enter-from ,
109- .fade-leave-to {
79+
80+ .is-hidden {
11081 opacity : 0 ;
82+ pointer-events : none ;
11183}
84+
85+ h2 {
86+ font-style : normal ;
87+ font-family : var (--family-display );
88+ background : linear-gradient (143deg , var (--primary-500 ) 0% , var (--secondary ) 100% );
89+ background-clip : text ;
90+ -webkit-background-clip : text ;
91+ -webkit-text-fill-color : transparent ;
92+ position : relative ;
93+ z-index : 1 ;
94+ max-width : var (--space-80 );
95+ word-wrap : break-word ;
96+ line-height : var (--line-height-2xl );
97+ overflow-wrap : break-word ;
98+ }
99+ .description {
100+ order : 1 ;
101+ min-height : calc (var (--line-height-2xl ) * 1.5 );
102+ @media (max-width : 768px ) {
103+ max-width : 80% ;
104+ }
105+ }
106+
107+ .button-container {
108+ order : 2 ;
109+ width : 100% ;
110+ }
111+
112+ .custom-button-group {
113+ display : flex ;
114+ flex-direction : column ;
115+ align-items : center ;
116+ gap : var (--space-4 );
117+ }
118+
119+ .custom-button-group :deep(.button-group ) {
120+ display : flex ;
121+ flex-direction : column ;
122+ align-items : center ;
123+ gap : var (--space-4 );
124+ }
125+
112126@media (max-width : 768px ) {
113127 .carousel-card-content {
114128 margin-left : var (--space-0 );
0 commit comments