77 lines
1.4 KiB
CSS
77 lines
1.4 KiB
CSS
.mb-2 {
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.post-layout {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
.post-layout main {
|
|
flex: 1;
|
|
}
|
|
.post-layout main .thumbnail {
|
|
width: 100%;
|
|
height: 300px;
|
|
object-fit: contain;
|
|
object-position: center;
|
|
}
|
|
.post-layout main > div {
|
|
background-color: rgba(255, 255, 255, .71);
|
|
padding: 2rem;
|
|
height: 100%;
|
|
}
|
|
|
|
.posts {
|
|
display: grid;
|
|
grid-template-columns: 1fr;
|
|
grid-template-rows: 1fr;
|
|
grid-column-gap: 2rem;
|
|
grid-row-gap: 2rem;
|
|
}
|
|
.posts > a {
|
|
text-decoration: none;
|
|
color: rgba(var(--black), .76);
|
|
}
|
|
.posts > div {
|
|
width: 100%;
|
|
}
|
|
.post-card {
|
|
background-color: white;
|
|
border-radius: 1rem;
|
|
box-shadow: 0 2px 4px rgba(var(--black), .21);
|
|
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
|
margin: 0 1rem;
|
|
}
|
|
.post-card:hover {
|
|
transform: translate(-4px, -4px); /* Up and left by 4px */
|
|
box-shadow: 0 8px 16px rgba(var(--black), 0.3); /* deeper shadow for “lifted” look */
|
|
}
|
|
.post-card > img {
|
|
width: 100%;
|
|
object-fit: cover;
|
|
object-position: center;
|
|
border-top-left-radius: 1rem;
|
|
border-top-right-radius: 1rem;
|
|
}
|
|
.post-card .post-body {
|
|
padding: 2rem;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
.post-layout main .thumbnail {
|
|
height: 375px;
|
|
margin: 1rem 0;
|
|
}
|
|
}
|
|
@media (min-width: 992px) {
|
|
.posts {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
.post-card {
|
|
margin: 0;
|
|
}
|
|
.post-layout main .thumbnail {
|
|
height: 375px;
|
|
margin: 2rem 0;
|
|
}
|
|
} |