Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

641 product citations embeds #656

Merged
merged 13 commits into from
Jan 17, 2024
25 changes: 25 additions & 0 deletions blocks/product-citations/product-citations.js
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' }),
a({ href: 'https://www.bioz.com/', target: '_blank', title: 'link' }, 'Powered by Bioz See more details on Bioz © 2024'),
));

const attrs = { defer: true };
await loadScript('https://cdn.bioz.com/assets/jquery-2.2.4.js', attrs);
await loadScript('https://cdn.bioz.com/assets/bioz-w-api-6.0.min.js', attrs);
}
}
Binary file added icons/bioz-favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions scripts/dom-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,4 @@ export function dl(...items) { return domEl('dl', ...items); }
export function dt(...items) { return domEl('dt', ...items); }
export function dd(...items) { return domEl('dd', ...items); }
export function hr(...items) { return domEl('hr', ...items); }
export function object(...items) { return domEl('object', ...items); }
9 changes: 9 additions & 0 deletions styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -3211,6 +3211,10 @@ main .default-content-wrapper ul {
grid-column: span 2 / span 2;
}

.float-none {
float: none;
}

.m-0 {
margin: 0px;
}
Expand Down Expand Up @@ -4778,6 +4782,11 @@ main .default-content-wrapper ul {
color: rgb(13 49 114 / var(--tw-text-opacity));
}

.text-danaherblue-900 {
--tw-text-opacity: 1;
color: rgb(6 28 68 / var(--tw-text-opacity));
}

.text-danahergray-500 {
--tw-text-opacity: 1;
color: rgb(107 114 128 / var(--tw-text-opacity));
Expand Down