nettsiden/www/css/gallery.css

146 lines
3.0 KiB
CSS
Raw Permalink Normal View History

2022-01-25 15:04:00 +01:00
body, main, html {
width: 100%;
margin: 0;
2022-01-25 15:04:00 +01:00
padding: 0;
}
main {
background-color: #ddd;
2022-01-25 15:04:00 +01:00
margin-top: 3em;
margin-left: 0 !important; /* Override style.css */
margin-right: 0 !important;
padding: 4em;
}
.gallery-container {
display: grid;
2022-01-25 15:04:00 +01:00
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%;
}
2022-01-25 15:04:00 +01:00
.card-image-div {
margin: auto 0;
max-height: 45vh;
overflow: hidden;
2022-01-25 15:04:00 +01:00
border-radius: 1.5em;
}
.card-image {
2022-01-25 15:04:00 +01:00
max-width: 100%;
object-fit: cover;
2022-01-25 15:04:00 +01:00
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;
}
.modal-target:hover {opacity: 0.7;}
2024-04-07 01:50:31 +02:00
/* 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 {
margin: auto;
display: block;
object-fit: scale-down;
overflow: visible;
min-width: 60vw;
max-width: 90vw !important;
min-height: 60vh;
max-height: 80vh !important;
width: auto;
height: auto;
opacity: 1 !important;
}
.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;
2022-01-25 15:04:00 +01:00
font-size: 4em;
font-weight: bold;
transition: 0.3s;
}
.modal-close:hover, .modal-close:focus {
color: #bbb;
text-decoration: none;
cursor: pointer;
}
@media only screen and (min-width:320px) {
2022-01-25 15:04:00 +01:00
.gallery-container { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
main { padding: 1em; }
}
@media only screen and (min-width: 641px) {
2022-01-25 15:04:00 +01:00
.gallery-container { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
main { padding: 1em; }
}
@media only screen and (min-width: 961px) {
2022-01-25 15:04:00 +01:00
.gallery-container { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media only screen and (min-width: 1281px) {
2022-01-25 15:04:00 +01:00
.gallery-container { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}