Files
CyBySide/public/css/posts.css
Cyper b7822c8080
All checks were successful
Deploy Blog to Folder / deploy (push) Successful in 4s
fix: Added padding to post thumbnail image
2025-08-22 23:22:05 -04:00

64 lines
1.2 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: 375px;
object-fit: contain;
object-position: center;
margin: 2rem 0;
}
.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;
}
.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: 992px) {
.posts {
grid-template-columns: repeat(2, 1fr);
}
}