distorsion.interhacker.space/assets/sass/_gallery.scss

75 lines
1.2 KiB
SCSS
Raw Normal View History

2025-01-24 23:17:58 +01:00
.gallery {
.gallery-item {
position: relative;
width: 50%;
padding: 0;
&::after {
content: "";
display: block;
padding-bottom: 100%;
}
&:hover {
.overlay {
visibility: visible;
opacity: 1;
}
}
}
.overlay {
visibility: hidden;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
transition: .2s ease-out;
opacity: 0;
background-color: $black;
cursor: pointer;
a {
color: $white;
&:hover {
color: $accent;
}
}
h2 {
margin: $vertical-rhythm;
color: $white;
}
}
.gallery-img-container {
display: flex;
position: absolute;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
overflow: hidden;
}
img {
padding: $vertical-rhythm * 3;
/*TODO: This is an ugly hack. Either fix or ensure images to have a good dimension*/
width: 640px;
height: auto;
}
.gallery-modal-link {
display: flex;
position: absolute;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
}
}