From f6408b285268a13fe2385aa2076181d89726c4ea Mon Sep 17 00:00:00 2001 From: wz914876 Date: Thu, 11 Jan 2024 19:04:48 +0530 Subject: [PATCH 1/8] initial commit --- blocks/product-citations/product-citations.js | 21 +++++++++++++++++++ scripts/dom-builder.js | 1 + 2 files changed, 22 insertions(+) create mode 100644 blocks/product-citations/product-citations.js diff --git a/blocks/product-citations/product-citations.js b/blocks/product-citations/product-citations.js new file mode 100644 index 000000000..11899a3b7 --- /dev/null +++ b/blocks/product-citations/product-citations.js @@ -0,0 +1,21 @@ +import { object } from '../../scripts/dom-builder.js'; +import { loadScript } from '../../scripts/lib-franklin.js'; + +function createCitations() { + const citations = object({ + id: 'wobj-3230-mica-q', + type: 'text/html', + data: 'https://www.bioz.com/v_widget_6_0/3230/mica/', + style: 'width:100%; height: 193px', + }); + return citations; +} + +export default async function decorate(block) { + 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); + + block.innerHTML = ''; + block.append(createCitations()); +} diff --git a/scripts/dom-builder.js b/scripts/dom-builder.js index 302f33f75..45126567d 100644 --- a/scripts/dom-builder.js +++ b/scripts/dom-builder.js @@ -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); } From 82e19104d62a6e680f1819e60b77f9e05e233c0d Mon Sep 17 00:00:00 2001 From: wz914876 Date: Fri, 12 Jan 2024 15:00:42 +0530 Subject: [PATCH 2/8] product citations changes --- blocks/product-citations/product-citations.js | 20 ++++++++++++++----- scripts/lib-franklin.js | 2 +- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/blocks/product-citations/product-citations.js b/blocks/product-citations/product-citations.js index 11899a3b7..eed95e8bb 100644 --- a/blocks/product-citations/product-citations.js +++ b/blocks/product-citations/product-citations.js @@ -1,11 +1,11 @@ import { object } from '../../scripts/dom-builder.js'; import { loadScript } from '../../scripts/lib-franklin.js'; -function createCitations() { +function buildCitations(id, data) { const citations = object({ - id: 'wobj-3230-mica-q', + id, type: 'text/html', - data: 'https://www.bioz.com/v_widget_6_0/3230/mica/', + data, style: 'width:100%; height: 193px', }); return citations; @@ -16,6 +16,16 @@ export default async function decorate(block) { 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); - block.innerHTML = ''; - block.append(createCitations()); + const biozDiv = `
+ + Powered by Bioz See more details on Bioz © 2024
`; + + const citationsLinkEl = block.querySelector('a'); + if (citationsLinkEl) { + const id = citationsLinkEl.getAttribute('title'); + const data = citationsLinkEl.getAttribute('href'); + block.innerHTML = biozDiv; + block.prepend(buildCitations(id, data)); + } } diff --git a/scripts/lib-franklin.js b/scripts/lib-franklin.js index fa68816e5..c0752aacd 100644 --- a/scripts/lib-franklin.js +++ b/scripts/lib-franklin.js @@ -662,7 +662,7 @@ export function decorateButtons(element) { const up = a.parentElement; const twoup = a.parentElement.parentElement; if (!a.querySelector('img') && twoup.tagName !== 'LI' && !a.closest('.call-to-action') - && !a.closest('.mini-teasers') && !a.closest('.bg-color-right')) { + && !a.closest('.mini-teasers') && !a.closest('.bg-color-right') && !a.closest('.product-citations')) { if (up.childNodes.length === 1 && (up.tagName === 'P' || up.tagName === 'DIV')) { a.className = 'btn btn-outline-primary'; // default up.classList.add('button-container'); From 13fa2a1876498b583e0518dccfcbba505815a917 Mon Sep 17 00:00:00 2001 From: wz914876 Date: Mon, 15 Jan 2024 16:41:03 +0530 Subject: [PATCH 3/8] used dom-builder to construct block --- blocks/product-citations/product-citations.js | 30 +++++++----------- icons/bioz-favicon.png | Bin 0 -> 19890 bytes styles/styles.css | 9 ++++++ 3 files changed, 21 insertions(+), 18 deletions(-) create mode 100644 icons/bioz-favicon.png diff --git a/blocks/product-citations/product-citations.js b/blocks/product-citations/product-citations.js index eed95e8bb..0d0ce6666 100644 --- a/blocks/product-citations/product-citations.js +++ b/blocks/product-citations/product-citations.js @@ -1,31 +1,25 @@ -import { object } from '../../scripts/dom-builder.js'; +import { + a, div, img, object, +} from '../../scripts/dom-builder.js'; import { loadScript } from '../../scripts/lib-franklin.js'; -function buildCitations(id, data) { - const citations = object({ - id, - type: 'text/html', - data, - style: 'width:100%; height: 193px', - }); - return citations; -} - export default async function decorate(block) { 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); - const biozDiv = `
- - Powered by Bioz See more details on Bioz © 2024
`; - const citationsLinkEl = block.querySelector('a'); if (citationsLinkEl) { const id = citationsLinkEl.getAttribute('title'); const data = citationsLinkEl.getAttribute('href'); - block.innerHTML = biozDiv; - block.prepend(buildCitations(id, data)); + 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' }, 'Powered by Bioz See more details on Bioz © 2024'), + )); } } diff --git a/icons/bioz-favicon.png b/icons/bioz-favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..834bec35dd175504f72ed60e5f98ac9f4134c369 GIT binary patch literal 19890 zcmeI4c|26_+sBW}8bXAm#*!psW-P-@3})WWedpEJ_rCjyT}-frKKB%MxnY< zd_cw+49LfqLL_?<03e_@)rMqiGqyo%Zg2)|8XbDZlwvKy1+qrRh6=~aDM)b(m_$om zdMaX7E2yu(MxrS_diBYZp(jMF6nT&H^l*+yWt_&|i zOsAH#an^A0o-5P;JTY5YIT2F}91Kf531#P>J>jMr@K$vLSfB<^H z0Myu?Xap3O0X3}xYp(-bya3cHI&wR(CKzyOl934jB9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p+%1cS0KGUr~7iGe|Atr4LBuAB@$inGjgg$%8uteipUIev)gsbw;~XC&xSVw+7AEBibdk^8I8q+_M)d4uPgf07 zv8!AAuJBk7r{;?%CJ}2R{*)`OFdwY-1|~kZykR?3RVP`olsJE!S4-9?)4oq?-YR@5 z{jmD}17bqD@9V?ZAryU>PN!yUlcVgNjt`Y&Crf+GmT2WeN)b8sqUq^sAop3zS99sk zk`B+)Gl-kw-^HIqt$83Mqslj#fF)$~W&!oF(OXyL_ Date: Mon, 15 Jan 2024 19:49:50 +0530 Subject: [PATCH 4/8] review comments changes --- blocks/product-citations/product-citations.js | 10 +++++----- scripts/lib-franklin.js | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/blocks/product-citations/product-citations.js b/blocks/product-citations/product-citations.js index 0d0ce6666..50ebf120d 100644 --- a/blocks/product-citations/product-citations.js +++ b/blocks/product-citations/product-citations.js @@ -4,10 +4,6 @@ import { import { loadScript } from '../../scripts/lib-franklin.js'; export default async function decorate(block) { - 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); - const citationsLinkEl = block.querySelector('a'); if (citationsLinkEl) { const id = citationsLinkEl.getAttribute('title'); @@ -19,7 +15,11 @@ export default async function decorate(block) { 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' }, 'Powered by Bioz See more details on Bioz © 2024'), + 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); } } diff --git a/scripts/lib-franklin.js b/scripts/lib-franklin.js index c0752aacd..fa68816e5 100644 --- a/scripts/lib-franklin.js +++ b/scripts/lib-franklin.js @@ -662,7 +662,7 @@ export function decorateButtons(element) { const up = a.parentElement; const twoup = a.parentElement.parentElement; if (!a.querySelector('img') && twoup.tagName !== 'LI' && !a.closest('.call-to-action') - && !a.closest('.mini-teasers') && !a.closest('.bg-color-right') && !a.closest('.product-citations')) { + && !a.closest('.mini-teasers') && !a.closest('.bg-color-right')) { if (up.childNodes.length === 1 && (up.tagName === 'P' || up.tagName === 'DIV')) { a.className = 'btn btn-outline-primary'; // default up.classList.add('button-container'); From 376e30748307b21047ce6c30e79cde8f66a87808 Mon Sep 17 00:00:00 2001 From: wz914876 Date: Wed, 17 Jan 2024 18:22:07 +0530 Subject: [PATCH 5/8] alt attribute added for image --- blocks/product-citations/product-citations.js | 2 +- styles/styles.css | 19 ------------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/blocks/product-citations/product-citations.js b/blocks/product-citations/product-citations.js index 50ebf120d..33b1c8d3a 100644 --- a/blocks/product-citations/product-citations.js +++ b/blocks/product-citations/product-citations.js @@ -14,7 +14,7 @@ export default async function decorate(block) { })); 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' }), + 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'), )); diff --git a/styles/styles.css b/styles/styles.css index dd224af63..ef1b367dd 100644 --- a/styles/styles.css +++ b/styles/styles.css @@ -1483,25 +1483,6 @@ button.suggestion.selected { transition-duration: 700ms; } -.productdetail main .columns.columns-2-cols .product-hero .vertical-gallery-container > div div:nth-child(1) img { - padding-top: 0.5rem; - padding-bottom: 0.5rem; - font-size: 1rem; - line-height: 1.5rem; - --tw-text-opacity: 1; - color: rgb(55 65 81 / var(--tw-text-opacity)); -} - -.columns.features-card-left > div > div.product-hero .vertical-gallery-container > div div:nth-child(1) img > .card { - display: flex; - flex-direction: row; - padding-bottom: 1.5rem; -} - -.columns.features-card-left > div > div.product-hero .vertical-gallery-container > div div:nth-child(1) img > div.card > .left-content { - padding-right: 0.75rem; -} - .product-hero .vertical-gallery-container > div > div:not(:nth-child(1)) { grid-column: span 1 / span 1; display: flex; From 105b6836dd8d35726468c20acf686901af6a3296 Mon Sep 17 00:00:00 2001 From: Duy Nguyen Date: Wed, 17 Jan 2024 14:58:18 +0100 Subject: [PATCH 6/8] chore: load bioz scripts async --- blocks/product-citations/product-citations.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blocks/product-citations/product-citations.js b/blocks/product-citations/product-citations.js index 33b1c8d3a..32a426877 100644 --- a/blocks/product-citations/product-citations.js +++ b/blocks/product-citations/product-citations.js @@ -19,7 +19,7 @@ export default async function decorate(block) { )); 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); + 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); } } From acf93a2669093bcb8df22a20046d870fcd3604f0 Mon Sep 17 00:00:00 2001 From: wz914876 Date: Wed, 17 Jan 2024 19:48:10 +0530 Subject: [PATCH 7/8] minor change --- blocks/product-citations/product-citations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocks/product-citations/product-citations.js b/blocks/product-citations/product-citations.js index 32a426877..ea50895c1 100644 --- a/blocks/product-citations/product-citations.js +++ b/blocks/product-citations/product-citations.js @@ -5,7 +5,7 @@ import { loadScript } from '../../scripts/lib-franklin.js'; export default async function decorate(block) { const citationsLinkEl = block.querySelector('a'); - if (citationsLinkEl) { + if (citationsLinkEl && window.location.toString().includes('#citations')) { const id = citationsLinkEl.getAttribute('title'); const data = citationsLinkEl.getAttribute('href'); block.innerHTML = ''; From a7aaad0fa5fa0ab966a20fdb2a26808751305b31 Mon Sep 17 00:00:00 2001 From: wz914876 Date: Wed, 17 Jan 2024 20:04:28 +0530 Subject: [PATCH 8/8] reverted the condition --- blocks/product-citations/product-citations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocks/product-citations/product-citations.js b/blocks/product-citations/product-citations.js index ea50895c1..32a426877 100644 --- a/blocks/product-citations/product-citations.js +++ b/blocks/product-citations/product-citations.js @@ -5,7 +5,7 @@ import { loadScript } from '../../scripts/lib-franklin.js'; export default async function decorate(block) { const citationsLinkEl = block.querySelector('a'); - if (citationsLinkEl && window.location.toString().includes('#citations')) { + if (citationsLinkEl) { const id = citationsLinkEl.getAttribute('title'); const data = citationsLinkEl.getAttribute('href'); block.innerHTML = '';