Skip to content

Commit 0f11c61

Browse files
committed
Update spekers style.
1 parent 52cdb9b commit 0f11c61

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/components/sections/speakers.astro

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
import { getCollection } from "astro:content";
33
import type { CollectionEntry } from "astro:content";
4+
import { Image } from "astro:assets";
45
56
const allSpeakers = await getCollection("speakers");
67
@@ -33,10 +34,12 @@ const sectionSubtitle = "Meet some of our amazing speakers";
3334
<a href={`/speaker/${speaker.id}`} class="block group">
3435
<div class="bg-white rounded-lg shadow-md overflow-hidden transition-transform duration-300 group-hover:-translate-y-2">
3536
<div class="aspect-square overflow-hidden">
36-
<img
37+
<Image
3738
src={speaker.data.avatar}
3839
alt={`${speaker.data.name}'s profile picture`}
3940
class="w-full h-full object-cover transition-transform duration-300 group-hover:scale-105"
41+
height={250}
42+
width={250}
4043
loading="eager"
4144
/>
4245
</div>
@@ -88,7 +91,7 @@ const sectionSubtitle = "Meet some of our amazing speakers";
8891
function moveCarousel() {
8992
currentPosition += slideWidth;
9093

91-
track.style.transition = 'transform 2000ms linear';
94+
track.style.transition = 'transform 1000ms linear';
9295
track.style.transform = `translateX(-${currentPosition}%)`;
9396

9497
if (currentPosition >= slideWidth * totalOriginalSlides) {
@@ -98,9 +101,9 @@ const sectionSubtitle = "Meet some of our amazing speakers";
98101
track.style.transform = `translateX(0)`;
99102

100103
setTimeout(() => {
101-
track.style.transition = 'transform 2000ms linear';
104+
track.style.transition = 'transform 1000ms linear';
102105
}, 20);
103-
}, 1000);
106+
}, 4000);
104107
}
105108
}
106109

src/pages/speakers.astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function createOptimalGroups(speakers: Speaker[]): Record<string, Speaker[]> {
3737
currentGroup.push(speaker);
3838
}
3939
else {
40-
if (currentGroup.length < 10 && currentGroup.length + 1 <= 15) {
40+
if (currentGroup.length < 1 && currentGroup.length + 1 <= 15) {
4141
currentGroup.push(speaker);
4242
groupKey = `${currentLetter}-${letter}`;
4343
} else {
@@ -100,8 +100,8 @@ const description = "Our conference speakers organized alphabetically";
100100
<Image
101101
src={speaker.data.avatar}
102102
alt={`${speaker.data.name}'s profile picture`}
103-
height={300}
104-
width={300}
103+
height={250}
104+
width={250}
105105
class="w-full h-full object-cover"
106106
/>
107107
) : (

0 commit comments

Comments
 (0)