@@ -48,31 +48,41 @@ const carouselRef = templateRef<HTMLDivElement>('carouselRef')
48
48
tabindex =" 0"
49
49
aria-label =" Sponsor logos carousel"
50
50
>
51
- <div
51
+ <NuxtLink
52
52
v-for =" (sponsor) in sortedSponsors"
53
53
:key =" sponsor.id"
54
- class =" grid place-items-center justify-center items-center bg-white p-4 rounded-md"
55
- :title =" sponsor.name"
54
+ :to =" {
55
+ name: 'meetup-id',
56
+ params: {
57
+ id: sponsor.meetups[0].id,
58
+ },
59
+ }"
60
+ :title =" `${sponsor.name} has sponsored the ${sponsor.meetups[0].title} meetup at ${sponsor.meetups[0].venue}`"
56
61
>
57
- <!-- :style="{ opacity: `${opacityValue(index)}%`, width: `${opacityValue(index) / 6}%`, filter: `saturate(${opacityValue(index) / 100})` }" -->
58
- <NuxtLink
59
- :to =" {
60
- name: 'meetup-id',
61
- params: {
62
- id: sponsor.meetups[0].id,
63
- },
64
- }"
65
- :title =" `${sponsor.name} has sponsored the ${sponsor.meetups[0].title} meetup at ${sponsor.meetups[0].venue}`"
62
+ <div
63
+
64
+ class =" flip-card h-32 w-full object-contain rounded-md"
65
+ :title =" sponsor.name"
66
66
>
67
- <img
68
- :src =" sponsorLogoUrl(sponsor)"
69
- :alt =" sponsor.name"
70
- :class =" sponsor.darkbg ? 'dark:bg-verse-900 bg-gray-500' : ''"
71
- class =" h-20 max-h-24 w-full object-contain rounded-md p-2"
72
- draggable =" false"
73
- >
74
- </NuxtLink >
75
- </div >
67
+ <div class =" flip-card-inner" >
68
+ <div class =" flip-card-front grid place-items-center justify-center items-center bg-white p-4 rounded-md" >
69
+ <img
70
+ :src =" sponsorLogoUrl(sponsor)"
71
+ :alt =" sponsor.name"
72
+ :class =" sponsor.darkbg ? 'dark:bg-verse-900 bg-gray-500' : ''"
73
+ class =" h-20 max-h-28 w-full object-contain rounded-md p-2"
74
+ draggable =" false"
75
+ >
76
+ </div >
77
+ <div class =" flip-card-back grid place-items-center justify-center items-center bg-white p-4 rounded-md" >
78
+ <span class =" z-0 absolute inset-0 h-full text-center w-full items-center justify-center text-gray-200 text-[100px] flex gap-2" >
79
+ {{ sponsor.meetups[0].date.split('-')[0] }}
80
+ </span >
81
+ <span class =" z-10 font-medium font-mono text-lg text-center w-full block" >{{ `${sponsor.name} has sponsored the ${sponsor.meetups[0].title} meetup` }}</span >
82
+ </div >
83
+ </div >
84
+ </div >
85
+ </NuxtLink >
76
86
</div >
77
87
</div >
78
88
<div class =" text-center" >
@@ -82,3 +92,49 @@ const carouselRef = templateRef<HTMLDivElement>('carouselRef')
82
92
</div >
83
93
</section >
84
94
</template >
95
+
96
+ <style scoped>
97
+ .flip-card {
98
+ background : transparent ;
99
+ perspective : 200px ;
100
+ }
101
+
102
+ .flip-card-inner {
103
+ position : relative ;
104
+ width : 100% ;
105
+ height : 100% ;
106
+ transition : transform 0.4s ease-in-out ;
107
+ transform-style : preserve-3d ;
108
+ /* transform-origin: 100px center; */
109
+ }
110
+
111
+ .flip-card :hover .flip-card-inner ,
112
+ .flip-card :focus-within .flip-card-inner {
113
+ transition : transform 0.6s cubic-bezier (0.68 , -0.6 , 0.32 , 1.5 );
114
+ transform : rotateX (180deg );
115
+ }
116
+
117
+ .flip-card-front , .flip-card-back {
118
+ position : absolute ;
119
+ width : 100% ;
120
+ height : 100% ;
121
+ backface-visibility : hidden ;
122
+ display : flex ;
123
+ align-items : center ;
124
+ justify-content : center ;
125
+ border-radius : 0.375rem ; /* match rounded-md */
126
+ }
127
+
128
+ .flip-card-front {
129
+ z-index : 2 ;
130
+ }
131
+
132
+ .flip-card-back {
133
+ transform : rotateX (180deg );
134
+ z-index : 1 ;
135
+ background : #fff ;
136
+ color : #222 ;
137
+ padding : 1rem ;
138
+ box-sizing : border-box ;
139
+ }
140
+ </style >
0 commit comments