generated from adobe/aem-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b510cf8
commit f1dc357
Showing
2 changed files
with
198 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,135 @@ | ||
/* Blog card container */ | ||
.blog-cards-container { | ||
display: flex; | ||
flex-wrap: wrap; | ||
gap: 20px; | ||
/* For the 2-column layout */ | ||
.content .col .blog-cards-container { | ||
display: grid; | ||
grid-template-columns: repeat(2, 1fr); | ||
gap: 32px; | ||
} | ||
|
||
/* Individual blog card */ | ||
.blog-card { | ||
width: calc(50% - 10px); /* 50% width with 10px gap between columns */ | ||
background-color: #FFF; | ||
border-radius: 8px; | ||
overflow: hidden; | ||
/* For the 3-cloumn layout */ | ||
.child .content .col .blog-cards-container { | ||
display: grid; | ||
grid-template-columns: repeat(3, 1fr); | ||
gap: 32px; | ||
} | ||
|
||
/* Blog card image */ | ||
.blog-card img { | ||
width: 100%; | ||
height: 200px; | ||
object-fit: cover; | ||
.child .content .col .blog-cards-container .blog-card { | ||
float: left; | ||
width: auto; | ||
} | ||
|
||
/* Blog card title */ | ||
.blog-title { | ||
margin: 10px; | ||
font-size: 1.2rem; | ||
font-weight: bold; | ||
.child { | ||
max-width: 980px; | ||
margin: 0 auto; /*Center the container horizontally*/ | ||
} | ||
|
||
/* Styles for the blog cards */ | ||
.blog-card { | ||
display: flex; | ||
flex-direction: column; | ||
overflow: hidden; | ||
background-color: #FFF; | ||
padding-top: 20px; | ||
padding-bottom: 20px; | ||
border-radius: 8px; | ||
text-align: left; | ||
/* transition: transform 0.3s ease-in-out;*/ | ||
} | ||
|
||
/* Blog card description */ | ||
.blog-description { | ||
margin: 0 10px 10px; | ||
font-size: 1rem; | ||
} | ||
.blog-card p{ | ||
padding: 0.6em 0; | ||
} | ||
|
||
.blog-card h3 { | ||
border-left: 0 !important; | ||
padding-left: 0 !important; | ||
} | ||
|
||
/* Read more link */ | ||
.read-more { | ||
.blog-card picture { | ||
display: block; | ||
margin: 10px; | ||
text-align: right; | ||
color: #007bff; | ||
text-decoration: none; | ||
} | ||
float: none; | ||
max-width: none; | ||
overflow: hidden; | ||
padding-bottom: 56%; | ||
position: relative; | ||
width: 100%; | ||
} | ||
|
||
.recent-blogs { | ||
text-align: left; | ||
} | ||
.blog-card a{ | ||
background: transparent; | ||
color: var(--link-color); | ||
text-decoration: none; | ||
} | ||
|
||
.recent-blogs h1:first-child, .recent-blogs h2:first-child { | ||
padding-top: 0!important; | ||
} | ||
.blog-card picture img { | ||
/*width: 100%; | ||
height: 200px; | ||
object-fit: cover; | ||
transition: all 0.3s ease 0s;*/ | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
object-fit: cover; | ||
transition: all 0.3s ease 0s; | ||
} | ||
|
||
@media (max-width: 767px) { | ||
.recent-blogs .content .col { | ||
width: 100%; | ||
margin: 0!important; | ||
} | ||
} | ||
.blog-card img:hover { | ||
transform: scale(1.1); | ||
} | ||
|
||
.blog-title { | ||
font-size: 20px; | ||
font-weight: bold; | ||
padding: 1em 0 0.5em; | ||
} | ||
|
||
.blog-description { | ||
padding: 0.6em 0; | ||
} | ||
|
||
.read-more { | ||
display: inline-block; | ||
color: #007bff; | ||
text-decoration: none; | ||
font-size: 1rem; | ||
margin-top: 10px; | ||
} | ||
|
||
.read-more:hover { | ||
text-decoration: underline; | ||
} | ||
} | ||
|
||
.pagination { | ||
margin-top: 20px; | ||
} | ||
|
||
.page-link { | ||
display: inline-block; | ||
padding: 5px 10px; | ||
margin-right: 5px; | ||
color: #007bff; | ||
text-decoration: none; | ||
border: 1px solid #007bff; | ||
border-radius: 3px; | ||
} | ||
|
||
.page-link:hover { | ||
background-color: #007bff; | ||
color: white; | ||
} | ||
|
||
/* Media Query for Tablets and larger screens */ | ||
@media screen and (min-width: 479px) { | ||
.blog-card-content { | ||
width: 60%; | ||
padding: 20px; | ||
} | ||
} | ||
|
||
/* Media Query for Smaller screens */ | ||
@media screen and (max-width: 1024px) { | ||
.blog-card picture { | ||
border-radius: 0 0 0 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters