body, main, html {
width: 100%;
margin: 0;
padding: 0;
}
main {
background-color: #ddd;
margin-top: 3em;
margin-left: 0 !important; /* Override style.css */
margin-right: 0 !important;
padding: 4em;
}
.gallery-container {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));;
width: 100%;
grid-gap: 20px;
}
.card {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
border-radius: 1.5em;
background-color: #f1f1f1;
width: 100%;
}
.card-image-div {
margin: auto 0;
max-height: 45vh;
overflow: hidden;
border-radius: 1.5em;
}
.card-image {
max-width: 100%;
object-fit: cover;
object-position: center;
vertical-align: center;
}
.card-body, .card-footer {
font-family: monospace;
text-align: left;
width: 90%;
margin: 0;
word-wrap: break-word;
}
.card-body {
font-size: 1.5em;
}
/* #region modal */
.modal-target:hover {opacity: 0.7;}
/* The Modal (background) */
.modal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
padding-top: 5vh;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto; /* Enable scroll if needed */
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.8); /* Black w/ opacity */
}
/* Modal Content (image) */
.modal-content {
margin: auto;
display: block;
object-fit: scale-down;
overflow: visible;
/* yolo, it all goes down from here */
min-width: 60vw;
max-width: 90vw !important;
min-height: 60vh;
max-height: 80vh !important;
width: auto;
height: auto;
opacity: 1 !important;
}
/* Caption of Modal Image */
.modal-caption {
margin: auto;
display: block;
width: 80%;
max-width: 90vw;
text-align: center;
color: white;
font-weight: 700;
font-size: 1em;
margin-top: 32px;
}
.modal-content, .modal-caption {
-webkit-animation-name: zoom;
-webkit-animation-duration: 0.6s;
animation-name: zoom;
animation-duration: 0.6s;
}
@-webkit-keyframes zoom {
from {-webkit-atransform:scale(0)}
to {-webkit-transform:scale(1)}
}
@keyframes zoom {
from {transform:scale(0)}
to {transform:scale(1)}
}
.modal-close {
position: absolute;
top: 15px;
right: 35px;
color: #f1f1f1;
font-size: 4em;
font-weight: bold;
transition: 0.3s;
}
.modal-close:hover, .modal-close:focus {
color: #bbb;
text-decoration: none;
cursor: pointer;
}
/* #endregion modal */
/* #region screen-size media-rules */
@media only screen and (min-width:320px) {
.gallery-container { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
main { padding: 1em; }
}
@media only screen and (min-width: 641px) {
.gallery-container { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
main { padding: 1em; }
}
@media only screen and (min-width: 961px) {
.gallery-container { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media only screen and (min-width: 1281px) {
.gallery-container { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
/* #endregion */