Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Commit 7e9f29e

Browse files
committed
Improved gallery 🚀
1 parent 4606e46 commit 7e9f29e

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

src/components/design-system/organism/gallery.tsx

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,30 @@ const GalleryContainer = styled(ContainerFluid)`
1515
justify-items: center;
1616
grid-column-gap: 20px;
1717
grid-row-gap: 20px;
18-
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
19-
20-
@media (min-width: 992px) {
21-
grid-column-gap: 20px;
22-
grid-row-gap: 40px;
23-
}
18+
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
2419
`;
2520

2621
const GalleryImageFrame = styled.figure`
27-
padding: ${(props) => props.theme.spacing[2]};
22+
padding: ${(props) => props.theme.spacing[1]};
2823
margin: 0;
2924
background-color: ${(props) => props.theme.light.generalBackgroundLight};
25+
box-shadow: 0 3px 10px 0 ${(props) => props.theme.light.boxShadowLight};
26+
transition: transform 0.2s;
27+
28+
@media (min-width: 992px) {
29+
&:hover {
30+
transform: scale(1.025);
31+
}
32+
}
3033
3134
@media (prefers-color-scheme: dark) {
3235
background: ${(props) => props.theme.dark.generalBackgroundLight};
36+
box-shadow: 0 3px 10px 0 ${(props) => props.theme.dark.boxShadowLight};
3337
}
3438
`;
3539

3640
const GalleryImageDescription = styled(Paragraph)`
37-
width: 250px;
41+
width: 280px;
3842
height: 55px;
3943
text-align: center;
4044
display: flex;
@@ -45,8 +49,8 @@ const GalleryImageDescription = styled(Paragraph)`
4549
`;
4650

4751
const GalleryImage = styled(GatsbyImage)`
48-
height: auto;
49-
width: 250px;
52+
width: 280px;
53+
height: 280px;
5054
object-fit: cover;
5155
transition: opacity 0.25s ease-in-out;
5256

0 commit comments

Comments
 (0)