generated from adobe/aem-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1st vers of blog article import with basic cleanup
- Loading branch information
1 parent
4e49cda
commit 135f4a6
Showing
3 changed files
with
34 additions
and
1 deletion.
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
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,26 @@ | ||
function blogBanner(main, document) { | ||
|
||
// Banner image is in mainContent element | ||
const bannerImage = main.querySelector('#mainContent img'); | ||
|
||
if( bannerImage ){ | ||
|
||
// Create div to hold image | ||
const div = document.createElement('div'); | ||
const img = document.createElement('img'); | ||
const imgSrc = bannerImage.getAttribute('src'); | ||
img.setAttribute('src', imgSrc); | ||
div.append(img); | ||
|
||
main.prepend(div); | ||
|
||
} | ||
|
||
// const p = document.createElement('p'); | ||
// p.textContent = 'Hello world!'; | ||
// main.append(p); | ||
|
||
|
||
} | ||
|
||
export default blogBanner; |
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