Skip to content

Commit bc003e7

Browse files
committed
Vary widths
1 parent 7ea24c5 commit bc003e7

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

src/app/conf/2025/components/gallery-strip/images/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ import image2024_13 from "./2024/13.webp"
2727
export const imagesByYear = {
2828
"2023": [
2929
image2023_8,
30-
image2023_3,
3130
image2023_11,
31+
image2023_3,
3232
image2023_1,
3333
image2023_13,
3434
image2023_6,
3535
image2023_9,
3636
image2023_4,
3737
image2023_12,
3838
image2023_2,
39-
image2023_7,
4039
image2023_10,
40+
image2023_7,
4141
image2023_5,
4242
],
4343
"2024": [
@@ -50,7 +50,7 @@ export const imagesByYear = {
5050
image2024_13,
5151
image2024_11,
5252
image2024_8,
53-
image2024_1,
5453
image2024_4,
54+
image2024_1,
5555
],
5656
}

src/app/conf/2025/components/gallery-strip/index.tsx

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,24 +52,39 @@ export function GalleryStrip({ className, ...rest }: GalleryStripProps) {
5252
{imagesByYear[selectedYear].map((image, i) => {
5353
const key = `${selectedYear}-${i}`
5454

55-
return <GalleryStripImage key={key} image={image} />
55+
return <GalleryStripImage key={key} image={image} index={i} />
5656
})}
5757
</Marquee>
5858
</div>
5959
</section>
6060
)
6161
}
6262

63-
function GalleryStripImage({ image }: { image: StaticImageData }) {
63+
function GalleryStripImage({
64+
image,
65+
index,
66+
}: {
67+
image: StaticImageData
68+
index: number
69+
}) {
6470
return (
6571
<div role="presentation" className="relative md:px-2">
6672
<Image
6773
src={image}
6874
alt=""
6975
role="presentation"
70-
width={799}
71-
height={533}
72-
className="pointer-events-none aspect-[799/533] h-[320px] w-auto object-cover"
76+
// intrinsic 799x533
77+
height={320}
78+
width={480}
79+
className={clsx(
80+
"pointer-events-none h-[320px] w-auto object-cover",
81+
// Alternate between 3 widths
82+
index % 4 === 2
83+
? "w-[200px]"
84+
: index % 3 === 2
85+
? "w-[420px]"
86+
: "w-[480px]",
87+
)}
7388
/>
7489
</div>
7590
)

0 commit comments

Comments
 (0)