Skip to content

Commit 575a419

Browse files
committed
chore: update sample images
1 parent 301a43a commit 575a419

File tree

1 file changed

+71
-66
lines changed

1 file changed

+71
-66
lines changed

dev/slides.ts

Lines changed: 71 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,77 @@
11
const breakpoints = [3840, 1920, 1080, 640, 384, 256, 128];
22

3-
function assetLink(asset: string, width: number) {
4-
return `https://assets.yet-another-react-lightbox.com/_next/image?url=${encodeURIComponent(
5-
`/_next/static/media/${asset}`,
6-
)}&w=${width}&q=75`;
3+
function imageLink(asset: string, size: number) {
4+
return `https://images.yet-another-react-lightbox.com/${asset}.${size}w.jpg`;
75
}
86

9-
const slides = [
10-
{ asset: "image01.cd7ee301.jpeg", width: 3840, height: 5760 },
11-
{ asset: "image02.da10388f.jpeg", width: 3840, height: 5070 },
12-
{ asset: "image03.a6580cde.jpeg", width: 3840, height: 5120 },
13-
{ asset: "image04.cb767d7c.jpeg", width: 3840, height: 2546 },
14-
{ asset: "image05.fdbef001.jpeg", width: 3840, height: 5760 },
15-
{ asset: "image06.2e6597a1.jpeg", width: 3840, height: 2553 },
16-
{ asset: "image07.27dd139c.jpeg", width: 3840, height: 2553 },
17-
{ asset: "image08.f646dad6.jpeg", width: 3840, height: 5760 },
18-
{ asset: "image09.7f346735.jpeg", width: 3840, height: 5760 },
19-
{ asset: "image10.41ba7faa.jpeg", width: 3840, height: 2560 },
20-
{ asset: "image11.d57d7fe1.jpeg", width: 3840, height: 5760 },
21-
{ asset: "image12.faa02319.jpeg", width: 3840, height: 5124 },
22-
{ asset: "image13.94108f7d.jpeg", width: 3840, height: 5643 },
23-
{ asset: "image14.953c7b70.jpeg", width: 3840, height: 5781 },
24-
{ asset: "image15.5ebdf6ed.jpeg", width: 3840, height: 4800 },
25-
{ asset: "image16.e81dbeb1.jpeg", width: 3840, height: 5760 },
26-
{ asset: "image17.6546cfcd.jpeg", width: 3840, height: 2560 },
27-
{ asset: "image18.31163d01.jpeg", width: 3840, height: 6834 },
28-
{ asset: "image19.7d89a265.jpeg", width: 3840, height: 5771 },
29-
{ asset: "image20.05176f17.jpeg", width: 3840, height: 5735 },
30-
{ asset: "image21.bbfb647d.jpeg", width: 3840, height: 2560 },
31-
{ asset: "image22.e8ce81ce.jpeg", width: 3840, height: 5124 },
32-
{ asset: "image23.9dc5eb2c.jpeg", width: 3840, height: 4800 },
33-
{ asset: "image24.3fd5c729.jpeg", width: 3840, height: 2560 },
34-
{ asset: "image25.77de342d.jpeg", width: 3840, height: 5760 },
35-
{ asset: "image26.3ca53ad1.jpeg", width: 3840, height: 4654 },
36-
{ asset: "image27.c8fde361.jpeg", width: 3840, height: 2553 },
37-
{ asset: "image28.0ab6b361.jpeg", width: 3840, height: 6837 },
38-
{ asset: "image29.b3972088.jpeg", width: 3840, height: 2272 },
39-
{ asset: "image30.785ba204.jpeg", width: 3840, height: 5120 },
40-
{ asset: "image31.c3217527.jpeg", width: 3840, height: 5760 },
41-
{ asset: "image32.871ab9c0.jpeg", width: 3840, height: 5120 },
42-
{ asset: "image33.dcfe554a.jpeg", width: 3840, height: 4800 },
43-
{ asset: "image34.7486121b.jpeg", width: 3840, height: 6827 },
44-
{ asset: "image35.e881eb31.jpeg", width: 3840, height: 5120 },
45-
{ asset: "image36.4e5b5abd.jpeg", width: 3840, height: 2880 },
46-
{ asset: "image37.2a651052.jpeg", width: 3840, height: 3072 },
47-
{ asset: "image38.c26c2fea.jpeg", width: 3840, height: 2560 },
48-
{ asset: "image39.3cda0dc7.jpeg", width: 3840, height: 5756 },
49-
{ asset: "image40.45760457.jpeg", width: 3840, height: 5760 },
50-
{ asset: "image41.ff494aee.jpeg", width: 3840, height: 2158 },
51-
{ asset: "image42.1f591633.jpeg", width: 3840, height: 4800 },
52-
{ asset: "image43.080b9633.jpeg", width: 3840, height: 5120 },
53-
{ asset: "image44.1abbe2ca.jpeg", width: 3840, height: 4800 },
54-
{ asset: "image45.d3221a8a.jpeg", width: 3840, height: 4800 },
55-
{ asset: "image46.719c4a6b.jpeg", width: 3840, height: 5760 },
56-
{ asset: "image47.5d5c8ebf.jpeg", width: 3840, height: 7844 },
57-
{ asset: "image48.c3acad57.jpeg", width: 3840, height: 5760 },
58-
{ asset: "image49.2da6704b.jpeg", width: 3840, height: 2560 },
59-
{ asset: "image50.d0a43c01.jpeg", width: 3840, height: 5760 },
60-
{ asset: "image51.f63b7fea.jpeg", width: 3840, height: 2560 },
61-
].map(({ asset, width, height }) => ({
62-
src: assetLink(asset, width),
63-
width,
64-
height,
65-
srcSet: breakpoints.map((breakpoint) => ({
66-
src: assetLink(asset, breakpoint),
67-
width: breakpoint,
68-
height: Math.round((height / width) * breakpoint),
69-
})),
70-
}));
7+
export const slides = [
8+
{ asset: "image01.0800ee93.3840x5760" },
9+
{ asset: "image02.645bc7e4.3840x5070" },
10+
{ asset: "image03.13c5eeb7.3840x5120" },
11+
{ asset: "image04.2d71a97f.3840x2546" },
12+
{ asset: "image05.c6ce32ab.3840x5760" },
13+
{ asset: "image06.74d5e191.3840x2553" },
14+
{ asset: "image07.1602015b.3840x2553" },
15+
{ asset: "image08.33e60453.3840x5760" },
16+
{ asset: "image09.1d093bea.3840x5760" },
17+
{ asset: "image10.e7aa266c.3840x2560" },
18+
{ asset: "image11.6ed25a69.3840x5760" },
19+
{ asset: "image12.488257a7.3840x5124" },
20+
{ asset: "image13.0fc79d13.3840x5643" },
21+
{ asset: "image14.6bc8c696.3840x5781" },
22+
{ asset: "image15.fb53298e.3840x4800" },
23+
{ asset: "image16.77c07118.3840x5760" },
24+
{ asset: "image17.58ea6291.3840x2560" },
25+
{ asset: "image18.a9406288.3840x6834" },
26+
{ asset: "image19.e6ab64a0.3840x5771" },
27+
{ asset: "image20.9ed3d306.3840x5735" },
28+
{ asset: "image21.1623efe7.3840x2560" },
29+
{ asset: "image22.f31106df.3840x5124" },
30+
{ asset: "image23.34aef8b0.3840x4800" },
31+
{ asset: "image24.b3755f37.3840x2560" },
32+
{ asset: "image25.58b30d95.3840x5760" },
33+
{ asset: "image26.dec9345c.3840x4654" },
34+
{ asset: "image27.a206ba29.3840x2553" },
35+
{ asset: "image28.59adc517.3840x6837" },
36+
{ asset: "image29.a214f3ff.3840x2272" },
37+
{ asset: "image30.277ffefc.3840x5120" },
38+
{ asset: "image31.58452198.3840x5760" },
39+
{ asset: "image32.b13d36c3.3840x5120" },
40+
{ asset: "image33.64b5399a.3840x4800" },
41+
{ asset: "image34.d880c284.3840x6827" },
42+
{ asset: "image35.0c73b373.3840x5120" },
43+
{ asset: "image36.c4b0f6e6.3840x2880" },
44+
{ asset: "image37.46f6cccd.3840x3072" },
45+
{ asset: "image38.ea4a8d38.3840x2560" },
46+
{ asset: "image39.6f4ade23.3840x5756" },
47+
{ asset: "image40.9c67a759.3840x5760" },
48+
{ asset: "image41.f95d1ab1.3840x2158" },
49+
{ asset: "image42.2f191aff.3840x4800" },
50+
{ asset: "image43.f85e1091.3840x5120" },
51+
{ asset: "image44.624d86dc.3840x4800" },
52+
{ asset: "image45.9630abf7.3840x4800" },
53+
{ asset: "image46.9f1803af.3840x5760" },
54+
{ asset: "image47.8800ae70.3840x7844" },
55+
{ asset: "image48.7dfee306.3840x5760" },
56+
{ asset: "image49.76bd7f09.3840x2560" },
57+
{ asset: "image50.ca342ccd.3840x5760" },
58+
{ asset: "image51.06c02a19.3840x2560" },
59+
].map(({ asset, ...rest }) => {
60+
const matcher = asset.match(/\.(\d+)x(\d+)$/)!;
61+
const width = Number.parseInt(matcher[1], 10);
62+
const height = Number.parseInt(matcher[2], 10);
63+
64+
return {
65+
src: imageLink(asset, width),
66+
width,
67+
height,
68+
srcSet: breakpoints.map((breakpoint) => ({
69+
src: imageLink(asset, breakpoint),
70+
width: breakpoint,
71+
height: Math.round((height / width) * breakpoint),
72+
})),
73+
...rest,
74+
};
75+
});
7176

7277
export default slides;

0 commit comments

Comments
 (0)