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.
Merge pull request #656 from hlxsites/641-product-citations-embeds
641 product citations embeds
- Loading branch information
Showing
4 changed files
with
35 additions
and
19 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { | ||
a, div, img, object, | ||
} from '../../scripts/dom-builder.js'; | ||
import { loadScript } from '../../scripts/lib-franklin.js'; | ||
|
||
export default async function decorate(block) { | ||
const citationsLinkEl = block.querySelector('a'); | ||
if (citationsLinkEl) { | ||
const id = citationsLinkEl.getAttribute('title'); | ||
const data = citationsLinkEl.getAttribute('href'); | ||
block.innerHTML = ''; | ||
block.append(object({ | ||
id, type: 'text/html', data, class: 'w-full h-48', | ||
})); | ||
block.append(div( | ||
{ id, class: 'text-xs text-danaherblue-900' }, | ||
img({ src: '/icons/bioz-favicon.png', class: 'w-3 h-3 align-top pb-0 ml-0 mb-0 float-none', alt: `${id}` }), | ||
a({ href: 'https://www.bioz.com/', target: '_blank', title: 'link' }, 'Powered by Bioz See more details on Bioz © 2024'), | ||
)); | ||
|
||
const attrs = { defer: true }; | ||
loadScript('https://cdn.bioz.com/assets/jquery-2.2.4.js', attrs); | ||
loadScript('https://cdn.bioz.com/assets/bioz-w-api-6.0.min.js', attrs); | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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