8
8
<ul id =" team" role =" list" class =" mx-auto flex flex-wrap md:flex-nowrap justify-center gap-4" >
9
9
<li
10
10
v-for =" (person, index) in featuredSpeakers" :key =" person.id" :class =" [
11
- 'single-photo rounded-xl overflow-hidden relative group',
11
+ 'single-photo rounded-xl overflow-hidden relative group cursor-pointer ',
12
12
'index-' + index,
13
- isCenter(index, featuredSpeakers.length) && 'active',
14
- ]" >
13
+ activeSpeakerId === person.id && 'active',
14
+ ]"
15
+ @click =" activeSpeakerId = person.id" >
15
16
<img
16
- class =" mx-auto md:saturate-0 rounded-xl ease-in-out duration-300 md:h-[640px] h-[150px] w-[150px] md:w-[90px] object-cover object-center md:group-hover:w-[120px] group-hover:saturate-100 transition-all"
17
+ class =" mx-auto md:saturate-0 rounded-xl ease-in-out duration-300 md:h-[640px] h-[150px] w-[150px] md:w-[90px] object-cover object-center md:group-hover:w-[120px] group-hover:saturate-100 transition-all"
17
18
:src =" getGithubUrl(person.github_account || '')" :alt =" person.name" :title =" person.name" width =" 300"
18
19
height =" 300" >
19
20
20
21
<div
21
22
class =" speaker-details-background inset-0 space-y-2 absolute text-center top-0 left-0 flex flex-col justify-end" >
22
23
<div class =" p-2 md:p-10 speaker-details md:opacity-0 flex flex-col items-center md:gap-2" >
23
- <p class =" text-verse-200 text-xs md:text-2xl block" >
24
+ <p class =" text-verse-200 text-xs md:text-2xl block cursor-text " >
24
25
@{{ person.github_account }}
25
26
</p >
26
- <h3 class =" text-verse-100 font-extrabold text-sm md:text-4xl block" >
27
+ <h3 class =" text-verse-100 font-extrabold text-sm md:text-4xl block cursor-text " >
27
28
{{ person.name }}
28
29
</h3 >
29
30
<NuxtLink
@@ -50,9 +51,11 @@ const featuredSpeakers = ref(
50
51
speakersResponse .filter ((speaker : { featured: boolean }) => speaker .featured )
51
52
);
52
53
53
- const isCenter = (index : number , length : number ) => {
54
- return index === Math .floor (length / 2 );
55
- };
54
+ const initialActiveSpeakerIndex = Math .floor (featuredSpeakers .value .length / 2 );
55
+
56
+ const activeSpeakerId = ref <string >(
57
+ featuredSpeakers .value [initialActiveSpeakerIndex ].id
58
+ );
56
59
</script >
57
60
58
61
<style lang="postcss" scoped>
0 commit comments