Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 491b1d7

Browse files
committedMar 2, 2024··
gallery updates
1 parent 15ca6ce commit 491b1d7

File tree

13 files changed

+12
-33
lines changed

13 files changed

+12
-33
lines changed
 

‎components/Gallery/index.tsx

+12-33
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import React from "react";
44
const Gallery = () => {
55
const photos = [
66
{ src: "/images/gallery/1.jpg", index: 1 },
7-
// { src: "/images/gallery/2.jpg", index: 2 },
8-
// { src: "/images/gallery/3.jpg", index: 3 },
9-
// { src: "/images/gallery/4.jpg", index: 4 },
7+
{ src: "/images/gallery/2.jpg", index: 2 },
8+
{ src: "/images/gallery/3.jpg", index: 3 },
9+
{ src: "/images/gallery/4.jpg", index: 4 },
1010
{ src: "/images/gallery/5.jpg", index: 5 },
1111
{ src: "/images/gallery/6.jpg", index: 6 },
1212
{ src: "/images/gallery/7.jpg", index: 7 },
@@ -22,40 +22,19 @@ const Gallery = () => {
2222
];
2323

2424
return (
25-
<div>
26-
<br />
27-
{/* <div className="masonry grid grid-cols-1 sm:grid-cols-2 md:grid-cols-2 lg:grid-cols-3 gap-3">
28-
{photos.map((photo, index) => (
29-
<div key={index}>
30-
<div className='relative ml-2 mr-2 mt-2 mb-2'>
31-
<img
25+
<div className="masonry" style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: '10px', justifyContent: 'center', alignItems: 'center', padding: '10px' }}>
26+
{photos.map((photo, index) => (
27+
<div key={index} className="relative" style={{ width: '100%', height: '480px' }}>
28+
<Image
3229
src={photo.src}
33-
className="square-full scale-105 ease-in-out"
30+
alt={`Photo ${index + 1}`}
31+
layout="fill" // Fill the container, cropping the image
32+
objectFit="cover" // Cover the container, cropping the image
3433
/>
35-
</div>
3634
</div>
37-
))}
38-
</div> */}
39-
40-
<div className="masonry grid w-full grid-cols-2 justify-center gap-3 p-[10px] lg:grid-cols-3 xl:grid-cols-3">
41-
{photos.map((photo, index) => (
42-
<div key={index} className="relative">
43-
{/* <div className="layout-intrinsic object-cover"> */}
44-
<Image
45-
src={photo.src}
46-
width={500}
47-
height={300}
48-
alt={`Photo ${index + 1}`}
49-
/>
50-
{/* </div> */}
51-
{/* </div> */}
52-
</div>
53-
))}
54-
</div>
55-
<br />
56-
<br />
57-
<br />
35+
))}
5836
</div>
5937
);
6038
};
39+
6140
export default Gallery;

‎public/images/gallery/10.jpg

-24.2 KB
Loading

‎public/images/gallery/12.jpg

182 KB
Loading

‎public/images/gallery/14.jpg

-15.9 KB
Loading

‎public/images/gallery/15.JPG

-25 KB
Binary file not shown.

‎public/images/gallery/15.jpg

4.39 MB
Loading

‎public/images/gallery/16.jpg

119 KB
Loading
File renamed without changes.

‎public/images/gallery/3.JPG

-32.4 KB
Binary file not shown.

‎public/images/gallery/3.jpg

216 KB
Loading

‎public/images/gallery/4.jpg

133 KB
Loading

‎public/images/gallery/6.jpg

-138 KB
Loading

‎public/images/gallery/8.jpg

-136 KB
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.