generated from adobe/aem-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from hlxsites/feature/blog
Feature/blog
- Loading branch information
Showing
9 changed files
with
385 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,37 +1 @@ | ||
.hero .hero-content { | ||
min-height: 310px; | ||
display: flex; | ||
align-items: center; | ||
color: #fff; | ||
} | ||
|
||
.hero .bg-primary { | ||
background-position: 50% 50%; | ||
background-size: cover; | ||
} | ||
|
||
.hero .hero-content h2 { | ||
line-height: 1.2; | ||
padding: 0; | ||
color: white; | ||
font-size: 44px; | ||
text-shadow: 0 0 6px rgba(0,0,0,50%); | ||
} | ||
|
||
@media (max-width: 1120px) { | ||
.hero .hero-content { | ||
min-height: 260px; | ||
} | ||
} | ||
|
||
@media (max-width: 860px) { | ||
.hero .hero-content { | ||
min-height: 220px; | ||
} | ||
} | ||
|
||
@media (max-width: 767px) { | ||
.hero .hero-content { | ||
min-height: 180px; | ||
} | ||
} | ||
/* hero css */ |
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,20 +1 @@ | ||
export default function decorate(block) { | ||
const bgImage = block.children[0].querySelector('img'); | ||
|
||
const heroContainer = document.createElement('div'); | ||
heroContainer.className = 'bg-primary'; | ||
|
||
// Set background image using CSS property | ||
heroContainer.style.backgroundImage = `url(${bgImage.src})`; | ||
heroContainer.style.backgroundSize = 'cover'; // Adjust as needed | ||
|
||
if (block.children.length > 1) { | ||
const additionalContent = block.children[1]; // Change the index if needed | ||
if (additionalContent) { | ||
additionalContent.classList.add('outer', 'hero-content'); | ||
heroContainer.appendChild(additionalContent); | ||
} | ||
} | ||
block.innerText = ''; | ||
block.appendChild(heroContainer); | ||
} | ||
// Hero block js |
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/* #blog css */ | ||
.post-topics { | ||
padding: 1em 0; | ||
} |
Oops, something went wrong.