File tree 2 files changed +23
-8
lines changed
src/app/conf/2025/components/gallery-strip
2 files changed +23
-8
lines changed Original file line number Diff line number Diff line change @@ -27,17 +27,17 @@ import image2024_13 from "./2024/13.webp"
27
27
export const imagesByYear = {
28
28
"2023" : [
29
29
image2023_8 ,
30
- image2023_3 ,
31
30
image2023_11 ,
31
+ image2023_3 ,
32
32
image2023_1 ,
33
33
image2023_13 ,
34
34
image2023_6 ,
35
35
image2023_9 ,
36
36
image2023_4 ,
37
37
image2023_12 ,
38
38
image2023_2 ,
39
- image2023_7 ,
40
39
image2023_10 ,
40
+ image2023_7 ,
41
41
image2023_5 ,
42
42
] ,
43
43
"2024" : [
@@ -50,7 +50,7 @@ export const imagesByYear = {
50
50
image2024_13 ,
51
51
image2024_11 ,
52
52
image2024_8 ,
53
- image2024_1 ,
54
53
image2024_4 ,
54
+ image2024_1 ,
55
55
] ,
56
56
}
Original file line number Diff line number Diff line change @@ -52,24 +52,39 @@ export function GalleryStrip({ className, ...rest }: GalleryStripProps) {
52
52
{ imagesByYear [ selectedYear ] . map ( ( image , i ) => {
53
53
const key = `${ selectedYear } -${ i } `
54
54
55
- return < GalleryStripImage key = { key } image = { image } />
55
+ return < GalleryStripImage key = { key } image = { image } index = { i } />
56
56
} ) }
57
57
</ Marquee >
58
58
</ div >
59
59
</ section >
60
60
)
61
61
}
62
62
63
- function GalleryStripImage ( { image } : { image : StaticImageData } ) {
63
+ function GalleryStripImage ( {
64
+ image,
65
+ index,
66
+ } : {
67
+ image : StaticImageData
68
+ index : number
69
+ } ) {
64
70
return (
65
71
< div role = "presentation" className = "relative md:px-2" >
66
72
< Image
67
73
src = { image }
68
74
alt = ""
69
75
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
+ ) }
73
88
/>
74
89
</ div >
75
90
)
You can’t perform that action at this time.
0 commit comments