diff --git a/.github/workflows/deploy-converter.yaml b/.github/workflows/deploy-converter.yaml index f3d2037a..fe6347a8 100644 --- a/.github/workflows/deploy-converter.yaml +++ b/.github/workflows/deploy-converter.yaml @@ -46,6 +46,7 @@ jobs: ${{ runner.os }}-build- ${{ runner.os }}- - run: npm ci + - run: npm run converter:test - run: npm run converter:build:prod - run: npm run converter:deploy -- convert/${ACTION_NAME} env: diff --git a/blocks/accordion/accordion.css b/blocks/accordion/accordion.css index 6ac7557a..41b4a7c7 100644 --- a/blocks/accordion/accordion.css +++ b/blocks/accordion/accordion.css @@ -119,6 +119,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.accordion-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .accordion-wrapper :is(.fill-current) { fill: currentColor } diff --git a/blocks/article-info/article-info.css b/blocks/article-info/article-info.css index 0b5e391c..479bae52 100644 --- a/blocks/article-info/article-info.css +++ b/blocks/article-info/article-info.css @@ -88,6 +88,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.article-info-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .article-info-wrapper :is(.pl-1) { padding-left: 0.25rem } diff --git a/blocks/articles-list/articles-list.css b/blocks/articles-list/articles-list.css index 43007052..322a21b4 100644 --- a/blocks/articles-list/articles-list.css +++ b/blocks/articles-list/articles-list.css @@ -171,6 +171,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.articles-list-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .articles-list-wrapper :is(.bg-white) { --tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity)) diff --git a/blocks/banner/banner.css b/blocks/banner/banner.css index 78ab8a4c..c377dc48 100644 --- a/blocks/banner/banner.css +++ b/blocks/banner/banner.css @@ -45,6 +45,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.banner :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .banner :is(.p-4) { padding: 1rem } diff --git a/blocks/blog-hero/blog-hero.css b/blocks/blog-hero/blog-hero.css index c461b369..26a72700 100644 --- a/blocks/blog-hero/blog-hero.css +++ b/blocks/blog-hero/blog-hero.css @@ -16,6 +16,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.blog-hero-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .blog-hero-wrapper :is(.px-2) { padding-left: 0.5rem; padding-right: 0.5rem diff --git a/blocks/breadcrumb/breadcrumb.css b/blocks/breadcrumb/breadcrumb.css index 48ae57d2..e982a453 100644 --- a/blocks/breadcrumb/breadcrumb.css +++ b/blocks/breadcrumb/breadcrumb.css @@ -86,6 +86,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.breadcrumb-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .breadcrumb-wrapper :is(.bg-white) { --tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity)) diff --git a/blocks/card-list/articleCard.js b/blocks/card-list/articleCard.js index 6fa92575..c97adf71 100644 --- a/blocks/card-list/articleCard.js +++ b/blocks/card-list/articleCard.js @@ -2,6 +2,10 @@ import { formatDateUTCSeconds, imageHelper, makePublicUrl } from '../../scripts/ import { li, a, p, div, time, span, h3, } from '../../scripts/dom-builder.js'; +import { getMetadata } from '../../scripts/lib-franklin.js'; + +const template = getMetadata('template'); +const linkText = template === 'wsaw' ? 'Learn More →' : 'Read Article →'; export default function createCard(article, firstCard = false) { const cardTitle = article.title.indexOf('| Danaher Life Sciences') > -1 @@ -17,14 +21,7 @@ export default function createCard(article, firstCard = false) { { class: 'eyebrow-sm' }, article.brand || 'Danaher Corporation', ), - p( - { class: 'text-base text-gray-500 font-extralight' }, - time( - { datetime: formatDateUTCSeconds(article.publishDate) }, - formatDateUTCSeconds(article.publishDate, { month: 'long' }), - ), - span({ class: 'pl-2' }, `${article.readingTime} min read`), - ), + h3( { class: @@ -37,10 +34,19 @@ export default function createCard(article, firstCard = false) { class: 'mt-auto inline-flex w-full py-5 text-base text-danaherpurple-500 font-semibold', }, - 'Read Article →', + linkText, ), ), ); + const showDateTime = p( + { class: 'text-base text-gray-500 font-extralight' }, + time( + { datetime: formatDateUTCSeconds(article.publishDate) }, + formatDateUTCSeconds(article.publishDate, { month: 'long' }), + ), + span({ class: 'pl-2' }, `${article.readingTime} min read`), + ); + if (template !== 'wsaw') cardWrapper.querySelector('.eyebrow-sm')?.after(showDateTime); return li( { diff --git a/blocks/card-list/card-list.css b/blocks/card-list/card-list.css index 27c25b90..6231b6a6 100644 --- a/blocks/card-list/card-list.css +++ b/blocks/card-list/card-list.css @@ -278,6 +278,11 @@ background-color: rgb(117 35 255 / var(--tw-bg-opacity)) } +.card-list-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .card-list-wrapper :is(.bg-white) { --tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity)) diff --git a/blocks/card-list/card-list.js b/blocks/card-list/card-list.js index 61ea21b5..9080d3e5 100644 --- a/blocks/card-list/card-list.js +++ b/blocks/card-list/card-list.js @@ -2,7 +2,6 @@ import ffetch from '../../scripts/ffetch.js'; import { ul, a, div, span, } from '../../scripts/dom-builder.js'; - import { getMetadata, toClassName } from '../../scripts/lib-franklin.js'; import createArticleCard from './articleCard.js'; import createLibraryCard from './libraryCard.js'; @@ -10,14 +9,16 @@ import createApplicationCard from './applicationCard.js'; import { makePublicUrl } from '../../scripts/scripts.js'; import { buildItemListSchema } from '../../scripts/schema.js'; -const getSelectionFromUrl = () => (window.location.pathname.indexOf('topics') > -1 ? toClassName(window.location.pathname.replace('.html', '').split('/').pop()) : ''); +const tagName = getMetadata('template') === 'wsaw' ? 'solutions' : 'topics'; + +const getSelectionFromUrl = () => (window.location.pathname.indexOf(tagName) > -1 ? toClassName(window.location.pathname.replace('.html', '').split('/').pop()) : ''); const getPageFromUrl = () => toClassName(new URLSearchParams(window.location.search).get('page')) || ''; const createTopicUrl = (currentUrl, keyword = '') => { - if (currentUrl.indexOf('topics') > -1) { + if (currentUrl.indexOf(tagName) > -1) { return currentUrl.substring(0, currentUrl.lastIndexOf('/') + 1) + toClassName(keyword).toLowerCase(); } - return `${currentUrl.replace('.html', '')}/topics/${toClassName(keyword).toLowerCase()}`; + return `${currentUrl.replace('.html', '')}/${tagName}/${toClassName(keyword).toLowerCase()}`; }; const patchBannerHeading = () => { @@ -83,7 +84,7 @@ const createPagination = (entries, page, limit) => { export function createFilters(articles, viewAll = false) { // collect tag filters - const allKeywords = articles.map((item) => item.topics.replace(/,\s*/g, ',').split(',')); + const allKeywords = articles.map((item) => item[tagName].replace(/,\s*/g, ',').split(',')); const keywords = new Set([].concat(...allKeywords)); keywords.delete(''); keywords.delete('Blog'); // filter out generic blog tag @@ -92,8 +93,8 @@ export function createFilters(articles, viewAll = false) { // render tag cloud const newUrl = new URL(window.location); newUrl.searchParams.delete('page'); - if (window.location.pathname.indexOf('topics') > -1) { - newUrl.pathname = window.location.pathname.substring(0, window.location.pathname.indexOf('/topics/')); + if (window.location.pathname.indexOf(tagName) > -1) { + newUrl.pathname = window.location.pathname.substring(0, window.location.pathname.indexOf(`/${tagName}/`)); } const tags = viewAll ? div( { class: 'flex flex-wrap gap-2 gap-y-0 mb-4' }, @@ -138,7 +139,7 @@ export function createFilters(articles, viewAll = false) { }); // patch banner heading with selected tag only on topics pages - if (getMetadata('heading') && window.location.pathname.indexOf('topics') > -1) { + if (getMetadata('heading') && window.location.pathname.indexOf(tagName) > -1) { patchBannerHeading(); } @@ -146,12 +147,14 @@ export function createFilters(articles, viewAll = false) { } export default async function decorate(block) { + block.setAttribute('id', 'card-list'); const articleType = block.classList.length > 2 ? block.classList[1] : ''; if (articleType) block.classList.remove(articleType); block.textContent = ''; + const indexType = getMetadata('template') === 'wsaw' ? 'wsaw' : 'article'; // fetch and sort all articles - const articles = await ffetch('/us/en/article-index.json') + const articles = await ffetch(`/us/en/${indexType}-index.json`) .chunks(500) .filter(({ type }) => type.toLowerCase() === articleType) .filter((article) => !article.path.includes('/topics-template')) @@ -160,7 +163,7 @@ export default async function decorate(block) { const activeTagFilter = block.classList.contains('url-filtered') ? getSelectionFromUrl() : ''; if (activeTagFilter) { filteredArticles = articles.filter( - (item) => toClassName(item.topics).toLowerCase().indexOf(activeTagFilter) > -1, + (item) => toClassName(item[tagName]).toLowerCase().indexOf(activeTagFilter) > -1, ); } buildItemListSchema(filteredArticles, 'resources'); diff --git a/blocks/cards/cards.css b/blocks/cards/cards.css index e4f55ffc..a51c6c89 100644 --- a/blocks/cards/cards.css +++ b/blocks/cards/cards.css @@ -166,6 +166,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.cards-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .cards-wrapper :is(.bg-white) { --tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity)) diff --git a/blocks/carousel/carousel.css b/blocks/carousel/carousel.css index d04a80a3..73ab00a6 100644 --- a/blocks/carousel/carousel.css +++ b/blocks/carousel/carousel.css @@ -262,6 +262,11 @@ background-color: rgb(234 222 255 / var(--tw-bg-opacity)); } +.carousel-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)); +} + .carousel-wrapper :is(.bg-white) { --tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity)); diff --git a/blocks/columns/columns.css b/blocks/columns/columns.css index 4dc59eff..389725aa 100644 --- a/blocks/columns/columns.css +++ b/blocks/columns/columns.css @@ -136,6 +136,10 @@ height: 100%; } +.columns-wrapper :is(.\!w-1\/2) { + width: 50% !important; +} + .columns-wrapper :is(.w-12) { width: 3rem; } @@ -164,6 +168,10 @@ grid-template-columns: repeat(1, minmax(0, 1fr)); } +.columns-wrapper :is(.flex-col) { + flex-direction: column; +} + .columns-wrapper :is(.flex-col-reverse) { flex-direction: column-reverse; } @@ -244,6 +252,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)); } +.columns-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)); +} + .columns-wrapper :is(.bg-danaherred-800) { --tw-bg-opacity: 1; background-color: rgb(122 25 127 / var(--tw-bg-opacity)); @@ -461,14 +474,22 @@ width: 50%; } - .columns-wrapper :is(.lg\:grid-cols-2) { - grid-template-columns: repeat(2, minmax(0, 1fr)); + .columns-wrapper :is(.lg\:w-1\/3) { + width: 33.333333%; + } + + .columns-wrapper :is(.lg\:w-2\/3) { + width: 66.666667%; } .columns-wrapper :is(.lg\:grid-cols-3) { grid-template-columns: repeat(3, minmax(0, 1fr)); } + .columns-wrapper :is(.lg\:flex-row) { + flex-direction: row; + } + .columns-wrapper :is(.lg\:flex-col-reverse) { flex-direction: column-reverse; } diff --git a/blocks/columns/columns.js b/blocks/columns/columns.js index 64bc7b28..6d6444be 100644 --- a/blocks/columns/columns.js +++ b/blocks/columns/columns.js @@ -3,6 +3,7 @@ import { } from '../../scripts/dom-builder.js'; export default function decorate(block) { + const sectionDiv = block.closest('.section'); const cols = [...block.firstElementChild.children]; block.classList.add(`columns-${cols.length}-cols`); const imageAspectRatio = 1.7778; @@ -12,11 +13,25 @@ export default function decorate(block) { ele.classList.add(...'align-text-center w-full h-full'.split(' ')); } else { ele.classList.add(...'align-text-top pb-7 py-0 my-0'.split(' ')); + const firstDiv = ele.querySelector('div:nth-child(1)'); + const secondDiv = ele.querySelector('div:nth-child(2)'); + if (sectionDiv.className.includes('thirtyseventy')) { + firstDiv.classList.add('lg:w-1/3'); + secondDiv.classList.add('lg:w-2/3'); + } else if (sectionDiv.className.includes('seventythirty')) { + firstDiv.classList.add('lg:w-2/3'); + secondDiv.classList.add('lg:w-1/3'); + } else { + firstDiv.classList.add('lg:w-1/2'); + secondDiv.classList.add('lg:w-1/2'); + } } } }); block.querySelectorAll('h2').forEach((ele) => { - ele.classList.add(...'my-0 lg:my-4 font-medium text-4xl2 inline-flex leading-10 text-danahergray-900'.split(' ')); + ele.classList.add(...'my-0 lg:my-4 font-medium text-4xl2 inline-flex leading-10'.split(' ')); + if (sectionDiv.className.includes('text-white')) ele.classList.add('text-white'); + else ele.classList.add('text-danahergray-900'); }); block.querySelectorAll('.button-container > a').forEach((ele) => { ele.classList.add(...'bg-transparent no-underline text-lg px-5 py-3 text-danaherpurple-500 border border-danaherpurple-500 leading-5 rounded-full font-medium mt-6 ease-in-out duration-150 transition-all hover:bg-danaherpurple-500 hover:text-white'.split(' ')); @@ -99,7 +114,7 @@ export default function decorate(block) { if (window.location.pathname.includes('/us/en/blog/') || window.location.pathname.includes('/us/en/news/')) { block.firstElementChild?.classList.add(...'container max-w-7xl mx-auto flex flex-col-reverse gap-x-12 lg:flex-col-reverse justify-items-center'.split(' ')); } else { - block.firstElementChild?.classList.add(...'container max-w-7xl mx-auto grid grid-cols-1 gap-x-12 gap-y-4 lg:grid-cols-2 justify-items-center'.split(' ')); + block.firstElementChild?.classList.add(...'container max-w-7xl mx-auto flex flex-col gap-x-12 gap-y-4 lg:flex-row justify-items-center'.split(' ')); } const pTags = row.querySelectorAll('p'); pTags.forEach((element) => { @@ -119,7 +134,9 @@ export default function decorate(block) { if (item.title === 'link') { item.parentElement.classList.add('link', 'pb-8'); item.textContent += ' ->'; - item.classList.add(...'text-sm font-bold text-danaherpurple-500'.split(' ')); + item.classList.add(...'text-sm font-bold'.split(' ')); + if (sectionDiv.className.includes('text-white')) item.classList.add('text-white'); + else item.classList.add('text-danaherpurple-500'); } }); } @@ -134,7 +151,13 @@ export default function decorate(block) { pic.querySelector('img').classList.add(...'absolute bottom-0 h-full w-full object-cover'.split(' ')); } else { picWrapper.classList.add('columns-img-col', 'order-none'); - pic.querySelector('img').classList.add('block'); + const seventythirtyEl = picWrapper.parentElement + ?.parentElement?.parentElement?.parentElement; + if (seventythirtyEl.querySelector('img')) { + pic.querySelector('img').classList.add('block', '!w-1/2'); + } else { + pic.querySelector('img').classList.add('block'); + } } } } diff --git a/blocks/download/download.css b/blocks/download/download.css index bdcc0bcc..78c37c01 100644 --- a/blocks/download/download.css +++ b/blocks/download/download.css @@ -86,6 +86,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.download-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .download-wrapper :is(.object-cover) { -o-object-fit: cover; object-fit: cover diff --git a/blocks/embed/embed.css b/blocks/embed/embed.css index f535fcd8..099c20cf 100644 --- a/blocks/embed/embed.css +++ b/blocks/embed/embed.css @@ -45,6 +45,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.embed-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .embed-wrapper :is(.text-center) { text-align: center } diff --git a/blocks/footer/footer.css b/blocks/footer/footer.css index 7cafb873..dca8bcfb 100644 --- a/blocks/footer/footer.css +++ b/blocks/footer/footer.css @@ -183,6 +183,11 @@ background-color: rgb(234 222 255 / var(--tw-bg-opacity)); } +.footer-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)); +} + .footer-wrapper :is(.fill-transparent) { fill: transparent; } diff --git a/blocks/header/header.js b/blocks/header/header.js index 4aedb034..7a79df32 100644 --- a/blocks/header/header.js +++ b/blocks/header/header.js @@ -663,8 +663,8 @@ function handleScroll() { async function getQuote(headerBlock, authHeader) { const quoteRequest = await fetch(`${baseURL}/rfqcart/-`, { headers: authHeader }); - if (quoteRequest.ok) { - const data = await quoteRequest.json(); + if (quoteRequest.status === 200) { + const data = await quoteRequest?.json(); if (data && data.items) { const rfqQuantity = data.items.length; if (rfqQuantity !== 0) { diff --git a/blocks/hero/hero.css b/blocks/hero/hero.css index 76084195..6dd30e6b 100644 --- a/blocks/hero/hero.css +++ b/blocks/hero/hero.css @@ -137,6 +137,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.hero-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .hero-wrapper :is(.bg-transparent) { background-color: transparent } diff --git a/blocks/logo-clouds/logo-clouds.css b/blocks/logo-clouds/logo-clouds.css index b8fae28f..d0f4919c 100644 --- a/blocks/logo-clouds/logo-clouds.css +++ b/blocks/logo-clouds/logo-clouds.css @@ -130,6 +130,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)); } +.logo-clouds-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)); +} + .logo-clouds-wrapper :is(.bg-gray-200) { --tw-bg-opacity: 1; background-color: rgb(229 231 235 / var(--tw-bg-opacity)); diff --git a/blocks/marketo-form/marketo-form.css b/blocks/marketo-form/marketo-form.css index a7612dc3..a16a5584 100644 --- a/blocks/marketo-form/marketo-form.css +++ b/blocks/marketo-form/marketo-form.css @@ -76,6 +76,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.marketo-form-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .marketo-form-wrapper :is(.bg-white) { --tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity)) diff --git a/blocks/mini-teasers/mini-teasers.css b/blocks/mini-teasers/mini-teasers.css index 82eb0cf3..02a1f907 100644 --- a/blocks/mini-teasers/mini-teasers.css +++ b/blocks/mini-teasers/mini-teasers.css @@ -85,6 +85,10 @@ border-bottom-width: 1px } +.mini-teasers-wrapper :is(.border-l) { + border-left-width: 1px +} + .mini-teasers-wrapper :is(.border-t) { border-top-width: 1px } @@ -98,11 +102,21 @@ border-color: rgb(0 0 0 / var(--tw-border-opacity)) } +.mini-teasers-wrapper :is(.border-danahergray-300) { + --tw-border-opacity: 1; + border-color: rgb(209 213 219 / var(--tw-border-opacity)) +} + .mini-teasers-wrapper :is(.bg-danaherlightblue-50) { --tw-bg-opacity: 1; background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.mini-teasers-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .mini-teasers-wrapper :is(.stroke-current) { stroke: currentColor } @@ -112,6 +126,10 @@ padding-right: 0.5rem } +.mini-teasers-wrapper :is(.pl-6) { + padding-left: 1.5rem +} + .mini-teasers-wrapper :is(.pt-4) { padding-top: 1rem } diff --git a/blocks/mini-teasers/mini-teasers.js b/blocks/mini-teasers/mini-teasers.js index b7f8aa36..83b945ec 100644 --- a/blocks/mini-teasers/mini-teasers.js +++ b/blocks/mini-teasers/mini-teasers.js @@ -5,7 +5,7 @@ export default function decorate(block) { [...block.children].forEach((element) => { if ([...block.children].length === 4) block.classList.add('lg:grid-cols-4'); else block.classList.add('lg:grid-cols-3'); - element.classList.add(...'items-center mt-2'.split(' ')); + element.classList.add(...'items-center mt-2 border-l border-danahergray-300 pl-6'.split(' ')); element.querySelector('span')?.classList.add(...'w-16 h-16 stroke-current'.split(' ')); const h3El = element.querySelector('h3'); if (h3El) { @@ -25,6 +25,12 @@ export default function decorate(block) { link.classList.add(...'text-base font-semibold text-danaherpurple-500'.split(' ')); if (link.href.endsWith('#RequestAQuote')) link.classList.add('show-modal-btn'); } + const hrefLinks = element.querySelectorAll('a'); + hrefLinks.forEach((hrefLink) => { + if (hrefLink.href.includes('/null.html')) { + hrefLink.remove(); + } + }); }); if (block.classList.contains('add-border')) block.classList.add(...'border-t border-b border-solid border-black'.split(' ')); decorateModals(block); diff --git a/blocks/page-jump-menu/page-jump-menu.css b/blocks/page-jump-menu/page-jump-menu.css index afb59f8f..563a0abb 100644 --- a/blocks/page-jump-menu/page-jump-menu.css +++ b/blocks/page-jump-menu/page-jump-menu.css @@ -52,6 +52,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.page-jump-menu-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .page-jump-menu-wrapper :is(.bg-white) { --tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity)) diff --git a/blocks/page-tabs/page-tabs.css b/blocks/page-tabs/page-tabs.css index e56f0e5d..03c9f260 100644 --- a/blocks/page-tabs/page-tabs.css +++ b/blocks/page-tabs/page-tabs.css @@ -48,6 +48,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.page-tabs-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .page-tabs-wrapper :is(.bg-white) { --tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity)) diff --git a/blocks/page-tabs/page-tabs.js b/blocks/page-tabs/page-tabs.js index 86b1ebbb..e7410c85 100644 --- a/blocks/page-tabs/page-tabs.js +++ b/blocks/page-tabs/page-tabs.js @@ -102,6 +102,10 @@ function hasSpecifications(productResponse) { return productResponse?.raw?.numattributes > 0; } +function hasOverview(productResponse) { + return productResponse?.raw?.richlongdescription; +} + export default async function decorate(block) { const response = await getProductResponse(); let productResponse; @@ -157,11 +161,24 @@ export default async function decorate(block) { return hasProducts(productResponse); case 'product-details': return hasParts(productResponse); + case 'overview': + return hasOverview(productResponse); default: return true; } }); + // Check if 'overview' tab exists + const hasOverviewTab = filteredTabs.some((tab) => tab.id === 'overview'); + + // Set currentTab to 'overview' if it exists, otherwise 'specifications' + currentTab = hasOverviewTab ? 'overview' : 'specifications'; + + // If 'overview' tab does not exist, reload the page with '#specifications' in the URL + if (!hasOverviewTab) { + window.location.hash = '#specifications'; + } + const navList = createTabList(filteredTabs, currentTab); // For Mobile View diff --git a/blocks/popular-articles/popular-articles.css b/blocks/popular-articles/popular-articles.css index 9b3f184c..3458bc42 100644 --- a/blocks/popular-articles/popular-articles.css +++ b/blocks/popular-articles/popular-articles.css @@ -1,4 +1,9 @@ .popular-articles-wrapper :is(.bg-danaherlightblue-50) { --tw-bg-opacity: 1; background-color: rgb(239 251 253 / var(--tw-bg-opacity)) +} + +.popular-articles-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) } \ No newline at end of file diff --git a/blocks/product-card/product-card.css b/blocks/product-card/product-card.css index 0fff18f2..e6054b6a 100644 --- a/blocks/product-card/product-card.css +++ b/blocks/product-card/product-card.css @@ -174,6 +174,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.product-card-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .product-card-wrapper :is(.bg-gray-100) { --tw-bg-opacity: 1; background-color: rgb(243 244 246 / var(--tw-bg-opacity)) diff --git a/blocks/product-category-list/product-category-list.css b/blocks/product-category-list/product-category-list.css index 3cb19335..1e1da29c 100644 --- a/blocks/product-category-list/product-category-list.css +++ b/blocks/product-category-list/product-category-list.css @@ -182,6 +182,11 @@ background-color: rgb(117 35 255 / var(--tw-bg-opacity)) } +.product-category-list-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .product-category-list-wrapper :is(.bg-white) { --tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity)) diff --git a/blocks/product-category/product-category.css b/blocks/product-category/product-category.css index a3f65e26..f95d9368 100644 --- a/blocks/product-category/product-category.css +++ b/blocks/product-category/product-category.css @@ -174,6 +174,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.product-category-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .product-category-wrapper :is(.bg-gray-100) { --tw-bg-opacity: 1; background-color: rgb(243 244 246 / var(--tw-bg-opacity)) diff --git a/blocks/product-citations/product-citations.css b/blocks/product-citations/product-citations.css index 947d5145..aa57e687 100644 --- a/blocks/product-citations/product-citations.css +++ b/blocks/product-citations/product-citations.css @@ -35,6 +35,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.product-citations-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .product-citations-wrapper :is(.pb-0) { padding-bottom: 0px } diff --git a/blocks/product-family/product-family.css b/blocks/product-family/product-family.css index 5d330706..14cba5dc 100644 --- a/blocks/product-family/product-family.css +++ b/blocks/product-family/product-family.css @@ -409,6 +409,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.product-family-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .product-family-wrapper :is(.bg-gray-100) { --tw-bg-opacity: 1; background-color: rgb(243 244 246 / var(--tw-bg-opacity)) diff --git a/blocks/product-hero/product-hero.css b/blocks/product-hero/product-hero.css index 0c39bb15..b912568b 100644 --- a/blocks/product-hero/product-hero.css +++ b/blocks/product-hero/product-hero.css @@ -145,6 +145,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)); } +.product-hero-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)); +} + .product-hero-wrapper :is(.bg-white) { --tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity)); diff --git a/blocks/product-hero/product-hero.js b/blocks/product-hero/product-hero.js index db63a0c9..e062e9f3 100644 --- a/blocks/product-hero/product-hero.js +++ b/blocks/product-hero/product-hero.js @@ -6,6 +6,7 @@ import { getProductResponse, } from '../../scripts/commerce.js'; import { createOptimizedS7Picture, decorateModals } from '../../scripts/scripts.js'; +import { getMetadata } from '../../scripts/lib-franklin.js'; function showImage(e) { const selectedImage = document.querySelector('.image-content picture'); @@ -164,20 +165,22 @@ async function addToQuote(product) { export default async function decorate(block) { const titleEl = block.querySelector('h1'); + const h1Value = getMetadata('h1'); titleEl?.classList.add('title'); titleEl?.parentElement.parentElement.remove(); const response = await getProductResponse(); if (response?.length > 0) { - document.title = response[0].Title ? response[0].Title : 'Danaher Product'; const allImages = response[0]?.raw.images; const verticalImageGallery = imageSlider(allImages, response[0]?.Title); const defaultContent = div(); defaultContent.innerHTML = response[0]?.raw.richdescription; defaultContent.prepend(span({ class: 'sku hidden' }, response[0]?.raw.productid)); - defaultContent.prepend(titleEl || h1({ class: 'title' }, response[0]?.Title)); + defaultContent.prepend(h1({ class: 'title' }, h1Value || response[0]?.raw.titlelsig)); defaultContent.prepend(span({ class: 'categories hidden' }, response[0]?.raw.categories)); defaultContent.prepend(span({ class: 'category-name' }, response[0]?.raw?.defaultcategoryname ? response[0]?.raw?.defaultcategoryname : '')); const rfqEl = block.querySelector(':scope > div:nth-child(1)'); + const addCartBtnEl = block.querySelector(':scope > div:nth-child(1)'); + addCartBtnEl.classList.add(...'btn-outline-trending-brand text-lg rounded-full px-4 py-2 !no-underline'.split(' ')); if (rfqEl && rfqEl.textContent.includes('Request for Quote')) { let rfqParent; rfqEl.classList.add(...'btn-outline-trending-brand text-lg rounded-full px-4 py-2 !no-underline'.split(' ')); diff --git a/blocks/product-menu/product-menu.css b/blocks/product-menu/product-menu.css index 1c77122c..5070adfa 100644 --- a/blocks/product-menu/product-menu.css +++ b/blocks/product-menu/product-menu.css @@ -88,6 +88,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.product-menu-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .product-menu-wrapper :is(.object-contain) { -o-object-fit: contain; object-fit: contain diff --git a/blocks/product-overview/product-overview.css b/blocks/product-overview/product-overview.css index 10bd10cf..417420aa 100644 --- a/blocks/product-overview/product-overview.css +++ b/blocks/product-overview/product-overview.css @@ -32,6 +32,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)); } +.product-overview-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)); +} + .product-overview-wrapper :is(.pl-12) { padding-left: 3rem; } diff --git a/blocks/product-parts/product-parts.css b/blocks/product-parts/product-parts.css index 2266b442..c32eb8d9 100644 --- a/blocks/product-parts/product-parts.css +++ b/blocks/product-parts/product-parts.css @@ -75,6 +75,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.product-parts-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .product-parts-wrapper :is(.pb-2) { padding-bottom: 0.5rem } diff --git a/blocks/product-recommendations/product-recommendations.css b/blocks/product-recommendations/product-recommendations.css index 89cab1e1..f83b69c3 100644 --- a/blocks/product-recommendations/product-recommendations.css +++ b/blocks/product-recommendations/product-recommendations.css @@ -235,6 +235,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.product-recommendations-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .product-recommendations-wrapper :is(.bg-gray-100) { --tw-bg-opacity: 1; background-color: rgb(243 244 246 / var(--tw-bg-opacity)) diff --git a/blocks/product-specifications/product-specifications.css b/blocks/product-specifications/product-specifications.css index c99a714c..0494ce30 100644 --- a/blocks/product-specifications/product-specifications.css +++ b/blocks/product-specifications/product-specifications.css @@ -63,6 +63,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.product-specifications-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .product-specifications-wrapper :is(.bg-gray-100) { --tw-bg-opacity: 1; background-color: rgb(243 244 246 / var(--tw-bg-opacity)) diff --git a/blocks/recent-articles/recent-articles.css b/blocks/recent-articles/recent-articles.css index 5e28dd21..7df29780 100644 --- a/blocks/recent-articles/recent-articles.css +++ b/blocks/recent-articles/recent-articles.css @@ -67,6 +67,11 @@ background-color: rgb(245 239 255 / var(--tw-bg-opacity)) } +.recent-articles-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .recent-articles-wrapper :is(.p-1) { padding: 0.25rem } diff --git a/blocks/related-articles/related-articles.css b/blocks/related-articles/related-articles.css index c9a1549c..77822606 100644 --- a/blocks/related-articles/related-articles.css +++ b/blocks/related-articles/related-articles.css @@ -148,6 +148,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.related-articles-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .related-articles-wrapper :is(.bg-white) { --tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity)) diff --git a/blocks/side-nav/side-nav.css b/blocks/side-nav/side-nav.css index 1e55961c..4738b886 100644 --- a/blocks/side-nav/side-nav.css +++ b/blocks/side-nav/side-nav.css @@ -63,6 +63,11 @@ background-color: rgb(234 222 255 / var(--tw-bg-opacity)) } +.side-nav-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .side-nav-wrapper :is(.px-0) { padding-left: 0px; padding-right: 0px diff --git a/blocks/social-feeds/social-feeds.css b/blocks/social-feeds/social-feeds.css index 50df417d..c189cce5 100644 --- a/blocks/social-feeds/social-feeds.css +++ b/blocks/social-feeds/social-feeds.css @@ -1,4 +1,9 @@ .social-feeds-wrapper :is(.bg-danaherlightblue-50) { --tw-bg-opacity: 1; background-color: rgb(239 251 253 / var(--tw-bg-opacity)) +} + +.social-feeds-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) } \ No newline at end of file diff --git a/blocks/social-media/social-media.css b/blocks/social-media/social-media.css index d44f987a..181d2cc1 100644 --- a/blocks/social-media/social-media.css +++ b/blocks/social-media/social-media.css @@ -40,6 +40,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.social-media-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .social-media-wrapper :is(.pb-0) { padding-bottom: 0px } diff --git a/blocks/spline-viewer/spline-viewer.css b/blocks/spline-viewer/spline-viewer.css new file mode 100644 index 00000000..1d2ff12c --- /dev/null +++ b/blocks/spline-viewer/spline-viewer.css @@ -0,0 +1,23 @@ +.spline-viewer-wrapper :is(.block) { + display: block +} + +.spline-viewer-wrapper :is(.\!h-\[200px\]) { + height: 200px !important +} + +.spline-viewer-wrapper :is(.bg-danaherlightblue-50) { + --tw-bg-opacity: 1; + background-color: rgb(239 251 253 / var(--tw-bg-opacity)) +} + +.spline-viewer-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + +@media (min-width: 768px) { + .spline-viewer-wrapper :is(.md\:\!h-\[600px\]) { + height: 600px !important + } +} \ No newline at end of file diff --git a/blocks/spline-viewer/spline-viewer.js b/blocks/spline-viewer/spline-viewer.js new file mode 100644 index 00000000..9ef61bc7 --- /dev/null +++ b/blocks/spline-viewer/spline-viewer.js @@ -0,0 +1,27 @@ +import { loadScript } from '../../scripts/lib-franklin.js'; +import { getFragmentFromFile } from '../../scripts/scripts.js'; + +export default async function decorate(block) { + try { + // get the content + const fragment = await getFragmentFromFile('/fragments/spline.html'); + block.innerHTML = ''; + const parser = new DOMParser(); + const fragmentHtml = parser.parseFromString(fragment, 'text/html'); + const observer = new IntersectionObserver((entries) => { + if (entries.some((e) => e.isIntersecting)) { + observer.disconnect(); + setTimeout(() => { + loadScript(fragmentHtml?.head?.firstElementChild?.src, { type: 'module' }); + block.append(fragmentHtml?.body?.firstElementChild); + }, 2000); + } + }); + observer.observe(block); + block.classList.add('!h-[200px]', 'md:!h-[600px]'); + } catch (e) { + block.textContent = ''; + // eslint-disable-next-line no-console + console.warn(`cannot load snippet at ${e}`); + } +} diff --git a/blocks/stats/stats.css b/blocks/stats/stats.css index 58f11aec..e0648f45 100644 --- a/blocks/stats/stats.css +++ b/blocks/stats/stats.css @@ -24,6 +24,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.stats-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .stats-wrapper :is(.px-4) { padding-left: 1rem; padding-right: 1rem diff --git a/blocks/talk-to-an-expert-form/talk-to-an-expert-form.css b/blocks/talk-to-an-expert-form/talk-to-an-expert-form.css index 981ebc46..407119a4 100644 --- a/blocks/talk-to-an-expert-form/talk-to-an-expert-form.css +++ b/blocks/talk-to-an-expert-form/talk-to-an-expert-form.css @@ -200,6 +200,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.talk-to-an-expert-form-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .talk-to-an-expert-form-wrapper :is(.bg-white) { --tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity)) diff --git a/blocks/timeline/timeline.css b/blocks/timeline/timeline.css index 22d40466..0c8ee4af 100644 --- a/blocks/timeline/timeline.css +++ b/blocks/timeline/timeline.css @@ -174,6 +174,11 @@ background-color: rgb(239 251 253 / var(--tw-bg-opacity)) } +.timeline-wrapper :is(.bg-danaherpurple-800) { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)) +} + .timeline-wrapper :is(.bg-gray-50) { --tw-bg-opacity: 1; background-color: rgb(249 250 251 / var(--tw-bg-opacity)) diff --git a/build-css.js b/build-css.js index bc9be2a9..7c55cde8 100644 --- a/build-css.js +++ b/build-css.js @@ -106,6 +106,11 @@ const fileMappings = [ output: './blocks/mini-teasers/mini-teasers.css', wrapper: 'mini-teasers-wrapper', }, + { + content: './blocks/spline-viewer/spline-viewer.js', + output: './blocks/spline-viewer/spline-viewer.css', + wrapper: 'spline-viewer-wrapper', + }, { content: ['./blocks/page-jump-menu/page-jump-menu.js', './blocks/page-tabs/page-tabs.js'], output: './blocks/page-jump-menu/page-jump-menu.css', diff --git a/converter.yaml b/converter.yaml index bb9c993f..824e8096 100644 --- a/converter.yaml +++ b/converter.yaml @@ -1,7 +1,7 @@ # the origin to fetch content from -origin: https://author-p93411-e849552.adobeaemcloud.com/ +origin: https://author-p93411-e849602.adobeaemcloud.com suffix: ".html?wcmmode=disabled" -internalHost: https://main--danaher-ls-aem-prod--hlxsites.hlx.live +internalHost: https://main--danaher-ls-aem--hlxsites.hlx.live # the live urls of the content # this is used to make absolute links to the urls domain reliatve # it may be an array, if there are mutliple urls possible like diff --git a/fragments/spline.html b/fragments/spline.html new file mode 100644 index 00000000..4d28cb89 --- /dev/null +++ b/fragments/spline.html @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/fstab.yaml b/fstab.yaml index 077254cd..639ab0f3 100644 --- a/fstab.yaml +++ b/fstab.yaml @@ -1,6 +1,6 @@ mountpoints: /: - url: https://1050314-569danaherxwalk.adobeioruntime.net/api/v1/web/convert/main/ + url: https://1050314-569danaherxwalk-stage.adobeioruntime.net/api/v1/web/convert/main/ type: markup suffix: ".html?wcmmode=disabled" @@ -10,4 +10,5 @@ folders: /us/en/products/bundles/: /us/en/products/product-coveo /us/en/blog/topics/: /us/en/blog/topics-template /us/en/news/topics/: /us/en/news/topics-template - /us/en/library/topics/: /us/en/library/topics-template \ No newline at end of file + /us/en/library/topics/: /us/en/library/topics-template + /us/en/we-see-a-way/solutions/: /us/en/we-see-a-way \ No newline at end of file diff --git a/head.html b/head.html index bfe5a946..08b09ebd 100644 --- a/head.html +++ b/head.html @@ -5,4 +5,4 @@ - + \ No newline at end of file diff --git a/helix-query.yaml b/helix-query.yaml index 46d3b0b2..c420d865 100644 --- a/helix-query.yaml +++ b/helix-query.yaml @@ -27,6 +27,9 @@ indices: topics: select: head > meta[name="topics"] value: attribute(el, "content") + solutions: + select: head > meta[name="solutions"] + value: attribute(el, "content") readingTime: select: head > meta[name="readingtime"] value: attribute(el, "content") @@ -79,3 +82,39 @@ indices: solution: select: head > meta[name="solution"] value: attribute(el, "content") + wsaw: + include: + - /us/en/we-see-a-way/** + exclude: + - /us/en/we-see-a-way + - /us/en/we-see-a-way/solutions + - /us/en/we-see-a-way/solutions/** + target: /us/en/wsaw-index.json + properties: + lastModified: + select: none + value: parseTimestamp(headers["last-modified"], "ddd, DD MMM YYYY hh:mm:ss GMT") + title: + select: main h1 + value: textContent(el) + navTitle: + select: head > meta[name="navtitle"] + value: attribute(el, "content") + description: + select: head > meta[name="description"] + value: attribute(el, "content") + image: + select: head > meta[property="og:image"] + value: match(attribute(el, "content"), "^(https?:\/\/.*?(danaher.com))+(.*)|^(.*)") + solutions: + select: head > meta[name="solutions"] + value: attribute(el, "content") + publishDate: + select: head > meta[name="publishdate"] + value: parseTimestamp(attribute(el, "content"), "ddd, DD MMM YYYY hh:mm:ss GMT") + type: + select: head > meta[name="template"] + value: attribute(el, "content") + brand: + select: head > meta[name="brand"] + value: attribute(el, "content") \ No newline at end of file diff --git a/scripts/delayed.js b/scripts/delayed.js index 5b5451a3..bee1f034 100644 --- a/scripts/delayed.js +++ b/scripts/delayed.js @@ -35,31 +35,6 @@ function loadGTM() { } // google tag manager -end -// SalesForce MCP - start - -function loadEvergageScript() { - const script = document.createElement('script'); - if (window.location.host === 'lifesciences.danaher.com') { - script.src = 'https://cdn.evgnet.com/beacon/v55685555553mx3rf3h3n3n3i091550196/danaher_ls_prod/scripts/evergage.min.js'; - } else { - script.src = 'https://cdn.evgnet.com/beacon/v55685555553mx3rf3h3n3n3i091550196/danaher_ls_staging/scripts/evergage.min.js'; - } - script.onload = function onEvergageLoad() { - }; - script.onerror = function onEvergageError() { - }; - document.head.appendChild(script); -} - -/* eslint-disable no-console */ -setTimeout(() => { - if (typeof OnetrustActiveGroups !== 'undefined' && OnetrustActiveGroups.includes("C0004")) { - loadEvergageScript(); - } -}, 3000); - -// SalesForce MCP - end - // Adobe Target - start window.targetGlobalSettings = { diff --git a/scripts/scripts-dev.js b/scripts/scripts-dev.js index a6ce6fd5..204ffc8b 100644 --- a/scripts/scripts-dev.js +++ b/scripts/scripts-dev.js @@ -19,7 +19,6 @@ import { import { div, - domEl, img, } from './dom-builder.js'; @@ -425,17 +424,14 @@ function decorateTwoColumnSection(main) { if (currentDiv?.classList.contains('col-right')) { newSection.appendChild(currentDiv); } - childClone.className = 'text-gray-900 !text-base leading-6 font-bold pt-6 pb-4 my-0'; + childClone.className = 'text-3xl leading-6 pt-6 pb-4 my-0'; newSection.appendChild( div( - { class: 'col-left lg:w-1/3 xl:w-1/4 pt-4' }, + { class: 'col-left lg:w-1/3 xl:w-1/3 pr-11' }, childClone, - domEl('hr', { - style: 'height: 10px; width: 54px; border-width: 0px; color: rgb(216, 244, 250); background-color: rgb(216, 244, 250);', - }), ), ); - currentDiv = div({ class: 'col-right w-full mt-4 lg:mt-0 lg:w-2/3 xl:w-3/4 pt-6 pb-10' }); + currentDiv = div({ class: 'col-right w-full mt-4 lg:mt-0 lg:w-2/3 xl:w-2/3 pt-6 pb-10' }); } else if (currentDiv?.classList.contains('col-right')) { currentDiv.appendChild(childClone); } @@ -653,6 +649,25 @@ export async function processEmbedFragment(element) { return block; } +// SalesForce MCP - start + +function loadEvergageScript() { + const script = document.createElement('script'); + if (window.location.host === 'lifesciences.danaher.com') { + script.src = 'https://cdn.evgnet.com/beacon/v55685555553mx3rf3h3n3n3i091550196/danaher_ls_prod/scripts/evergage.min.js'; + } else { + script.src = 'https://cdn.evgnet.com/beacon/v55685555553mx3rf3h3n3n3i091550196/danaher_ls_staging/scripts/evergage.min.js'; + } + script.onload = function onEvergageLoad() { + }; + script.onerror = function onEvergageError() { + }; + document.head.appendChild(script); +} +loadEvergageScript(); + +// SalesForce MCP - end + /** * Loads the page parameters for Adobe Target. * @returns {Object} The target parameters object. diff --git a/scripts/scripts.js b/scripts/scripts.js index 3c73a096..6553038e 100644 --- a/scripts/scripts.js +++ b/scripts/scripts.js @@ -1 +1 @@ -import{sampleRUM,loadHeader,loadFooter,decorateButtons,decorateIcons,decorateSections,decorateBlocks,decorateTemplateAndTheme,waitForLCP,loadBlocks,loadCSS,toClassName,getMetadata,createOptimizedPicture,loadBlock,decorateBlock}from"./lib-franklin.js";import{div,domEl,img}from"./dom-builder.js";const LCP_BLOCKS=["breadcrumb","product-hero","carousel","columns"];const TEMPLATE_LIST={blog:{templateName:"blog",dependencies:["./schema.js","../blocks/columns/columns.js","../blocks/social-media/social-media.js","../blocks/article-info/article-info.js"]},productdetail:{templateName:"productDetail",dependencies:["./commerce.js","./product-payload-builder.js","./schema.js"]},processstep:"processstep",topic:"topic",library:"library",info:"library"};TEMPLATE_LIST.news=TEMPLATE_LIST.blog;export function getEdgeDeliveryPath(path){return path.replace(/^\/content\/danaher\/ls/,"").replace(/\.html$/,"")}export function moveAttributes(from,to,attributes){if(!attributes){attributes=[...from.attributes].map((({nodeName:nodeName})=>nodeName))}attributes.forEach((attr=>{const value=from.getAttribute(attr);if(value){to.setAttribute(attr,value);from.removeAttribute(attr)}}))}export function moveInstrumentation(from,to){moveAttributes(from,to,[...from.attributes].map((({nodeName:nodeName})=>nodeName)).filter((attr=>attr.startsWith("data-aue-")||attr.startsWith("data-richtext-"))))}export function imageHelper(imageUrl,imageAlt,eager=false){if(imageUrl.indexOf(".scene7.com")>-1){return img({src:`${imageUrl}`,alt:imageAlt,loading:eager?"eager":"lazy",class:"mb-2 h-48 w-full object-cover"})}const cardImage=createOptimizedPicture(imageUrl,imageAlt,eager,[{width:"500"}]);cardImage.querySelector("img").className="mb-2 h-48 w-full object-cover";return cardImage}export function createOptimizedS7Picture(src,alt="",eager=false){if(src.startsWith("/is/image")||src.indexOf(".scene7.com")>-1){const picture=document.createElement("picture");picture.appendChild(img({src:`${src}?$danaher-mobile$`,fetchpriority:"high",alt:alt,loading:eager?"eager":"lazy"}));return picture}return img({src:src,alt:alt,loading:eager?"eager":"lazy"})}export function formatDateUTCSeconds(date,options={}){const dateObj=new Date(0);dateObj.setUTCSeconds(date);return dateObj.toLocaleDateString("en-US",{month:"short",day:"2-digit",year:"numeric",...options})}export function generateUUID(){return Math.floor(1e3+Math.random()*9e3)}let originalOffset=0;export function scrollJumpMenuFixed(pageJumpMenuContainer){if(!originalOffset){const rectPageTabs=pageJumpMenuContainer.getBoundingClientRect();originalOffset=rectPageTabs.top}if(window.scrollY>originalOffset){pageJumpMenuContainer.classList.add(..."w-full fixed mt-[-1px] bg-white shadow-lg inset-x-0 top-[83px] py-2 z-10 [&_.page-jump-menu-wrapper]:md:max-w-7xl [&_ul>li>a]:flex-row [&_ul>li>a]:items-center [&_ul>li>a]:h-full [&_li>a>span.icon-chevron-down]:hidden".split(" "));document.querySelector(".page-jump-menu-container.fixed ul")?.classList.add("shadow-none","rounded-none");document.querySelectorAll(".page-jump-menu-container.fixed ul li")?.forEach((el=>{el?.firstElementChild?.classList.add("rounded-full");el?.firstElementChild?.querySelector("span.icon svg use")?.classList.add("stroke-danaherpurple-500")}));document.querySelector('.page-jump-menu-container.fixed li[aria-selected="true"] a span.icon svg')?.classList.add("stroke-white");pageJumpMenuContainer.classList.remove(..."[&_.page-jump-menu-wrapper]:md:max-w-max [&_ul]:divide-x [&_ul>li>a]:h-40 [&_ul>li>a]:flex-col [&_ul>li>a]:justify-center".split(" "))}else{pageJumpMenuContainer.classList.remove(..."w-full fixed mt-[-1px] bg-white shadow-lg inset-x-0 top-[83px] py-2 z-10 [&_.page-jump-menu-wrapper]:md:max-w-7xl [&_ul>li>a]:flex-row [&_ul>li>a]:items-center [&_ul>li>a]:h-full [&_li>a>span.icon-chevron-down]:hidden".split(" "));document.querySelectorAll(".page-jump-menu-container ul li")?.forEach((el=>{el?.firstElementChild?.classList.remove("rounded-full");el?.firstElementChild?.querySelector("span.icon svg use")?.classList.remove("stroke-danaherpurple-500")}));pageJumpMenuContainer.classList.add(..."[&_.page-jump-menu-wrapper]:md:max-w-max [&_ul]:divide-x [&_ul>li>a]:h-40 [&_ul>li>a]:flex-col [&_ul>li>a]:justify-center".split(" "))}}let pageTabsOriginalOffset=0;export function scrollPageTabFixed(pageTabsContainer){if(!pageTabsOriginalOffset){const rectPageTabs=pageTabsContainer.getBoundingClientRect();pageTabsOriginalOffset=rectPageTabs.top}if(window.scrollY>pageTabsOriginalOffset){pageTabsContainer.classList.add(..."w-full fixed mt-[-1px] bg-white shadow-lg inset-x-0 top-[83px] py-2 z-10 [&_.page-tabs-wrapper]:md:max-w-7xl [&_ul>li>a]:flex-row [&_ul>li>a]:items-center [&_ul>li>a]:h-full [&_li>a>span.icon-chevron-down]:hidden".split(" "));pageTabsContainer.classList.remove(..."[&_.page-tabs-wrapper]:md:max-w-max [&_ul]:divide-x [&_ul>li>a]:h-40 [&_ul>li>a]:flex-col [&_ul>li>a]:justify-center".split(" "))}else{pageTabsContainer.classList.remove(..."w-full fixed mt-[-1px] bg-white shadow-lg inset-x-0 top-[83px] py-2 z-10 [&_.page-tabs-wrapper]:md:max-w-7xl [&_ul>li>a]:flex-row [&_ul>li>a]:items-center [&_ul>li>a]:h-full [&_li>a>span.icon-chevron-down]:hidden".split(" "));pageTabsContainer.classList.add(..."[&_.page-tabs-wrapper]:md:max-w-max [&_ul]:divide-x [&_ul>li>a]:h-40 [&_ul>li>a]:flex-col [&_ul>li>a]:justify-center".split(" "))}}export function makePublicUrl(url){const isProd=window.location.hostname.includes("lifesciences.danaher.com");try{const newURL=new URL(url,window.location.origin);if(isProd){if(newURL.pathname.endsWith(".html")){return newURL.pathname}newURL.pathname+=".html";return newURL.pathname}if(newURL.pathname.endsWith(".html")){newURL.pathname=newURL.pathname.slice(0,-5);return newURL.pathname}return newURL.pathname}catch(error){console.error("Invalid URL:",error);return url}}export function setJsonLd(data,name){const existingScript=document.head.querySelector(`script[data-name="${name}"]`);if(existingScript){existingScript.innerHTML=JSON.stringify(data);return}const script=document.createElement("script");script.type="application/ld+json";script.innerHTML=JSON.stringify(data);script.dataset.name=name;document.head.appendChild(script)}function setFavicon(){const faviconLink=document.querySelector("link[rel*='icon']")||document.createElement("link");faviconLink.type="image/x-icon";faviconLink.rel="shortcut icon";faviconLink.href=`https://${window.location.hostname}/favicon.ico`;document.getElementsByTagName("head")[0].appendChild(faviconLink)}export async function getFragmentFromFile(url){const response=await fetch(url);if(!response.ok){console.error("error loading fragment details",response);return null}const text=await response.text();if(!text){console.error("fragment details empty",url);return null}return text}export function getCookie(cname){let value=decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(cname).replace(/[\\-\\.\\+\\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null;if(value&&(value.substring(0,1)==="{"&&value.substring(value.length-1,value.length)==="}"||value.substring(0,1)==="["&&value.substring(value.length-1,value.length)==="]")){try{value=JSON.parse(value)}catch(e){return value}}return value}export function isOTEnabled(){const otCookie=getCookie("OptanonConsent");if(typeof otCookie==="string"){return otCookie.includes("C0002:1")}return true}export function setCookie(cname,cvalue,expTime=30*1e3*60*60*24,path="/"){const today=new Date;today.setTime(today.getTime()+expTime);const expires="expires=".concat(today.toGMTString());const cookieString=cname.concat("=").concat(cvalue).concat(";").concat(expires).concat(";path=").concat(path);document.cookie=cookieString}async function buildVideo(main){const videoLinks=main.querySelectorAll('a[href*="youtube.com"],a[href*="vimeo.com"],a[href*="vidyard.com"]');if(videoLinks.length>0){const{default:decorateEmbed}=await import("../blocks/embed/embed.js");videoLinks.forEach((link=>{if(link.closest(".embed, .hero")==null){decorateEmbed(link.parentNode)}}))}}async function loadFonts(){await loadCSS(`${window.hlx.codeBasePath}/styles/fonts.css`);try{if(!window.location.hostname.includes("localhost"))sessionStorage.setItem("fonts-loaded","true")}catch(e){}}function loadBreadCrumb(){const header=document.querySelector("header");const breadcrumb=document.createElement("breadcrumb");if(window.location.pathname!=="/")header.after(breadcrumb)}function loadMobileMenu(){const breadcrumb=document.querySelector("breadcrumb");const mobileMunu=document.createElement("mobilemenu");const url=new URL(window.location.href);if(url.pathname.match(/\/us\/en\/products\/(family\/|sku\/|bundles\/)/)||url.pathname.match(/\/us\/en\/solutions\//)){breadcrumb.after(mobileMunu)}}function buildAutoBlocks(main){try{buildVideo(main)}catch(error){console.error("Auto Blocking failed",error)}}export function decorateModals(main){const ctaModalButton=main.querySelector(".show-modal-btn");const content=()=>ctaModalButton.getAttribute("data-dialog-message")?ctaModalButton.getAttribute("dialog-message"):"";ctaModalButton?.addEventListener("click",(async e=>{e.preventDefault();const{default:getModal}=await import("./modal.js");const customModal=await getModal("custom-modal",content,(modal=>{modal.querySelector('p[name="close"]')?.addEventListener("click",(()=>modal.close()))}));customModal.showModal()}))}function decorateTwoColumnSection(main){main.querySelectorAll(".section.container-two-col").forEach((section=>{const defaultContentWrappers=section.querySelectorAll(":scope > .default-content-wrapper");defaultContentWrappers.forEach((contentWrapper=>{[...contentWrapper.children].forEach((child=>{section.appendChild(child)}));let nextElement=contentWrapper.nextSibling;const allBlocks=[];while(nextElement){if(nextElement.className.includes("-wrapper"))allBlocks.push(nextElement);nextElement=nextElement.nextSibling}section.append(...allBlocks);section.removeChild(contentWrapper)}));const newSection=div();let currentDiv=null;[...section.children].forEach((child=>{if(child.tagName==="H1"){newSection.appendChild(div({class:"col-left lg:w-1/3 xl:w-1/4 pt-4"}));currentDiv=div({class:"col-right w-full mt-0 md:mt-4 lg:mt-0 lg:w-2/3 xl:w-3/4 pt-6 pb-0 md:pb-10"})}const childClone=child.cloneNode(true);if(childClone.tagName==="H2"&&childClone.querySelector(":scope > strong")){if(currentDiv?.classList.contains("col-right")){newSection.appendChild(currentDiv)}childClone.className="text-gray-900 !text-base leading-6 font-bold pt-6 pb-4 my-0";newSection.appendChild(div({class:"col-left lg:w-1/3 xl:w-1/4 pt-4"},childClone,domEl("hr",{style:"height: 10px; width: 54px; border-width: 0px; color: rgb(216, 244, 250); background-color: rgb(216, 244, 250);"})));currentDiv=div({class:"col-right w-full mt-4 lg:mt-0 lg:w-2/3 xl:w-3/4 pt-6 pb-10"})}else if(currentDiv?.classList.contains("col-right")){currentDiv.appendChild(childClone)}}));if(currentDiv){newSection.appendChild(currentDiv)}newSection.classList.add("w-full","flex","flex-wrap","break-normal");section.innerHTML=newSection.outerHTML;section.classList.add("mx-auto","w-full","flex","flex-wrap","mb-5")}))}function updateExternalLinks(main){const REFERERS=[window.location.origin];main.querySelectorAll("a[href]").forEach((a=>{try{const{origin:origin,pathname:pathname,hash:hash}=new URL(a.href,window.location.href);const targetHash=hash&&hash.startsWith("#_");const isPDF=pathname.split(".").pop()==="pdf";if(origin&&origin!==window.location.origin&&!targetHash||isPDF){a.setAttribute("target","_blank");if(!REFERERS.includes(origin))a.setAttribute("rel","noopener")}else if(targetHash){a.setAttribute("target",hash.replace("#",""));a.href=a.href.replace(hash,"")}}catch(e){console.warn(`Invalid link in ${main}: ${a.href}`)}}))}function lazyLoadHiddenPageNavTabs(sections,nameOfFirstSection){const activeHash=window.location.hash;const active=activeHash?activeHash.substring(1,activeHash.length).toLowerCase():nameOfFirstSection;sections.forEach((section=>{const hasBreadCrumb=section.className.includes("breadcrumb-container");if(!hasBreadCrumb&§ion.getAttribute("aria-labelledby")!==active){section.querySelectorAll(".block").forEach((block=>{block.setAttribute("data-block-status","loaded");block.setAttribute("data-block-lazy-load",true);block.parentElement.style.display="none"}));const loadLazyBlocks=lazySection=>{lazySection.querySelectorAll(".block[data-block-lazy-load]").forEach((async block=>{block.removeAttribute("data-block-lazy-load");block.setAttribute("data-block-status","initialized");await loadBlock(block);block.parentElement.style.display=""}));section.setAttribute("data-section-status","loaded")};const observer=new IntersectionObserver((entries=>{if(entries.some((e=>e.isIntersecting))){observer.disconnect();loadLazyBlocks(section)}}));observer.observe(section);setTimeout((()=>{observer.disconnect();loadLazyBlocks(section)}),5e3)}}))}function decoratePageNav(main){const pageTabsBlock=main.querySelector(".page-tabs");if(!pageTabsBlock)return;const pageTabSection=pageTabsBlock.closest("div.section");let sections=[...main.querySelectorAll("div.section")];sections=sections.slice(sections.indexOf(pageTabSection)+1);const namedSections=sections.filter((section=>section.hasAttribute("data-tabname")));let index=0;sections.forEach((section=>{if(indeximport(dep)))]).then((([mod])=>mod.default));if(decorator){await decorator(main)}document.body.classList.add(templateName)}}catch(error){console.error("Auto Blocking failed",error)}}function decorateEmbeddedBlocks(container){container.querySelectorAll("div.section > div").forEach(decorateBlock)}export async function processEmbedFragment(element){const block=div({class:"embed-fragment"});[...element.classList].forEach((className=>{block.classList.add(className)}));const link=element.textContent;if(link){const fragment=await getFragmentFromFile(`${link}.plain.html`);if(fragment){block.innerHTML=fragment;const sections=block.querySelectorAll(".embed-fragment > div");[...sections].forEach((section=>{section.classList.add("section")}));decorateEmbeddedBlocks(block);decorateSections(block);loadBlocks(block)}else{const elementInner=element.innerHTML;block.append(div({class:"section"}));block.querySelector(".section").innerHTML=elementInner}}decorateButtons(block);decorateIcons(block);return block}function loadATPageParams(){const id=window.location.pathname.replaceAll("/","_").replace(/\.html$/,"").substring(1);const skuId=getMetadata("sku");const categoryId=getMetadata("fullcategory").split("|").pop();const thumbnailURL=getMetadata("og:image");const title=getMetadata("og:title");const name=title.indexOf("| Danaher Life Sciences")>-1?title.split("| Danaher Life Sciences")[0]:title;const message=getMetadata("og:description");const pageUrl=getMetadata("og:url");const brand=getMetadata("brand");const page=window.location.pathname.split("/")[3];const tags=getMetadata("article:tag");const articleAuthor=getMetadata("authorname");const articlePostDate=getMetadata("publishdate");const articleReadTime=getMetadata("readingtime");const targetParams={id:id,skuId:skuId,categoryId:categoryId,thumbnailURL:thumbnailURL,name:name,message:message,pageUrl:pageUrl,brand:brand,page:page,tags:tags,articleAuthor:articleAuthor,articlePostDate:articlePostDate,articleReadTime:articleReadTime};return targetParams}function initATJS(path,config){window.targetGlobalSettings=config;window.atPageParams=loadATPageParams();window.targetPageParams=function getTargetPageParams(){return{at_property:"6aeb619e-92d9-f4cf-f209-6d88ff58af6a","entity.id":window.atPageParams?.id,"entity.skuId":window.atPageParams?.skuId,"entity.categoryId":window.atPageParams?.categoryId,"entity.thumbnailURL":window.atPageParams?.thumbnailURL,"entity.name":window.atPageParams?.name,"entity.message":window.atPageParams?.message,"entity.pageUrl":window.atPageParams?.pageUrl,"entity.brand":window.atPageParams?.brand,"entity.page":window.atPageParams?.page,"entity.tags":window.atPageParams?.tags,"entity.articleAuthor":window.atPageParams?.articleAuthor,"entity.articlePostDate":window.atPageParams?.articlePostDate,"entity.articleReadTime":window.atPageParams?.articleReadTime,danaherCompany:localStorage.getItem("danaher_company")?localStorage.getItem("danaher_company"):"",utmCampaign:localStorage.getItem("danaher_utm_campaign")?localStorage.getItem("danaher_utm_campaign"):"",utmSource:localStorage.getItem("danaher_utm_source")?localStorage.getItem("danaher_utm_source"):"",utmMedium:localStorage.getItem("danaher_utm_medium")?localStorage.getItem("danaher_utm_medium"):"",utmContent:localStorage.getItem("danaher_utm_content")?localStorage.getItem("danaher_utm_content"):""}};return new Promise((resolve=>{import(path).then(resolve)}))}function onDecoratedElement(fn){if(document.querySelector('[data-block-status="loaded"],[data-section-status="loaded"]')){fn()}const observer=new MutationObserver((mutations=>{if(mutations.some((m=>m.target.tagName==="BODY"||m.target.dataset.sectionStatus==="loaded"||m.target.dataset.blockStatus==="loaded"))){fn()}}));observer.observe(document.querySelector("main"),{subtree:true,attributes:true,attributeFilter:["data-block-status","data-section-status"]});observer.observe(document.querySelector("body"),{childList:true})}function toCssSelector(selector){return selector.replace(/(\.\S+)?:eq\((\d+)\)/g,((_,clss,i)=>`:nth-child(${Number(i)+1}${clss?` of ${clss})`:""}`))}async function getElementForOffer(offer){const selector=offer.cssSelector||toCssSelector(offer.selector);return document.querySelector(selector)}async function getElementForMetric(metric){const selector=toCssSelector(metric.selector);return document.querySelector(selector)}async function getAndApplyOffers(){const response=await window.adobe.target.getOffers({request:{execute:{pageLoad:{}}}});const{options:options=[],metrics:metrics=[]}=response.execute.pageLoad;onDecoratedElement((()=>{window.adobe.target.applyOffers({response:response});options.forEach((o=>o.content=o.content.filter((c=>!getElementForOffer(c)))));metrics.map(((m,i)=>getElementForMetric(m)?i:-1)).filter((i=>i>=0)).reverse().map((i=>metrics.splice(i,1)))}))}let atjsPromise=Promise.resolve();const urlTarget=window.location.pathname;const regex=/^\/(us\/en\/products\.html)?$/;if(!regex.test(urlTarget)){atjsPromise=initATJS("./at.js",{clientCode:"danaher",serverDomain:"danaher.tt.omtrdc.net",imsOrgId:"08333E7B636A2D4D0A495C34@AdobeOrg",bodyHidingEnabled:false,cookieDomain:window.location.hostname,pageLoadEnabled:false,secureOnly:true,viewsEnabled:false,withWebGLRenderer:false}).catch((e=>{console.error("Error loading at.js",e)}));document.addEventListener("at-library-loaded",(()=>getAndApplyOffers()))}async function loadEager(doc){document.documentElement.lang="en";decorateTemplateAndTheme();await window.hlx.plugins.run("loadEager");const main=doc.querySelector("main");if(main){await decorateTemplates(main);decorateMain(main);await atjsPromise;await new Promise((resolve=>{window.requestAnimationFrame((async()=>{document.body.classList.add("appear");await waitForLCP(LCP_BLOCKS);resolve()}))}))}try{if(window.innerWidth>=900||sessionStorage.getItem("fonts-loaded")){loadFonts()}}catch(e){}}function getParameterByName(parameter,url=window.location.href){const modifiedParameter=parameter.replace(/[[\]]/g,"$&");const paramRegex=new RegExp(`[?&]${modifiedParameter}(=([^&#]*)|&|#|$)`);const results=paramRegex.exec(url);if(!results)return null;if(!results[2])return"";return decodeURIComponent(results[2].replace(/\+/g," "))}function loadUTMprams(){const utmParameters=["utm_campaign","utm_source","utm_medium","utm_content","utm_term","utm_previouspage"];utmParameters.forEach((param=>{const value=getParameterByName(param);if(value!==null){window.localStorage.setItem(`danaher_${param}`,value)}}))}async function loadLazy(doc){const main=doc.querySelector("main");await loadBlocks(main);const{hash:hash}=window.location;const element=hash?doc.getElementById(hash.substring(1)):false;if(hash&&element)element.scrollIntoView();loadFooter(doc.querySelector("footer"));loadCSS(`${window.hlx.codeBasePath}/styles/lazy-styles.css`);loadFonts();window.hlx.plugins.run("loadLazy");sampleRUM("lazy");sampleRUM.observe(main.querySelectorAll("div[data-block-name]"));sampleRUM.observe(main.querySelectorAll("picture > img"));loadUTMprams()}function loadDelayed(){window.setTimeout((()=>{window.hlx.plugins.load("delayed");window.hlx.plugins.run("loadDelayed");return import("./delayed.js")}),4e3);import("./sidekick.js").then((({initSidekick:initSidekick})=>initSidekick()))}async function loadPage(){setFavicon();await window.hlx.plugins.load("eager");await loadEager(document);await window.hlx.plugins.load("lazy");await loadLazy(document);loadDelayed()}function getDLPage(){const page={title:document.querySelector("title").textContent.replace(/[\n\t]/gm,""),language:"en",locale:"US",level:"top",type:"webpage",keywords:"",creationDate:getMetadata("creationdate"),updateDate:getMetadata("updatedate")};const path=window.location.pathname;if(path==="/"||path==="/us/en"||path==="/us/en.html"){page.level="top";page.type="home"}else if(path.includes("/us/en/news")){page.level="top";page.type="news"}else if(path.includes("/us/en/blog")){page.level="middle";page.type="blog"}else if(path.includes("/us/en/solutions")){page.level="middle";page.type="solutions"}else if(path.includes("/us/en/applications")){page.level="middle";page.type="applications"}else if(path.includes("/us/en/products")){if(path.includes("/us/en/products/family")){page.level="bottom";page.type="family"}else if(path.includes("/us/en/products/bundles")){page.level="bottom";page.type="bundles"}else if(path.includes("/us/en/products/sku")){page.level="bottom";page.type="sku"}else if(path.includes("/topics")){page.level="other";page.type="topics"}else{page.level="bottom";page.type="products"}}else if(path.includes("/us/en/library")){page.level="other";page.type="library"}else if(path.includes("/us/en/about-us")){page.level="top";page.type="about-us"}else if(path.includes("/us/en/expert")){page.level="top";page.type="expert"}else if(path.includes("/us/en/search")||path.includes("/us/en/danahersearch")){page.level="top";page.type="search"}else if(path.includes("/us/en/signin")){page.level="top";page.type="signin"}else if(path.includes("/us/en/legal")){page.level="top";page.type="legal"}return page}const urlParams=new URLSearchParams(window.location.search);const useProd=urlParams.get("useProd");if(window.location.host==="lifesciences.danaher.com"||useProd==="true"){window.DanaherConfig={siteID:"ls-us-en",gtmID:"GTM-THXPLCS",munchkinID:"306-EHG-641",marketoDomain:"//306-EHG-641.mktoweb.com",quoteCartPath:"/us/en/quote-cart.html",cartPath:"/us/en/cart.html",addressesPath:"/us/en/addresses.html",shippingPath:"/us/en/shipping.html",paymentPath:"/us/en/payment.html",receiptPath:"/us/en/receipt.html",quoteSubmitPath:"/us/en/submit-quote.html",intershopDomain:"https://shop.lifesciences.danaher.com",intershopPath:"/INTERSHOP/rest/WFS/DANAHERLS-LSIG-Site/-",searchOrg:"danaherproductionrfl96bkr",searchKey:"xxf2f10385-5a54-4a18-bb48-fd8025d6b5d2",workflowProductKey:"xx3d1b8da5-d1e9-4989-bbed-264a248a9e22",workflowResourceKey:"xxf6a8b387-10f2-4660-af5d-6d304d0a789d",productKey:"xxfb161aa6-0fa0-419f-af37-9c6d7784bf76",familyProductKey:"xx1ecd2a4f-8391-4c70-b3c0-2d589bda56b7",familyResourceKey:"xx9dd85afc-64b6-4295-bc5d-eb8285f96d52",categoryProductKey:"xx2a299d60-2cf1-48ab-b9d5-94daeb25f1d6",categoryDetailKey:"xx61910369-c1ab-4df9-8d8a-3092b1323fcc",productRecommendationsKey:"xx107716c0-1ccd-4a61-8717-6ca36b6cdb0e",megaMenuPath:"/content/dam/danaher/system/navigation/megamenu_items_us.json",coveoProductPageTitle:"Product Page",pdfEmbedKey:"4a472c386025439d8a4ce2493557f6e7",host:"lifesciences.danaher.com",scene7host:"https://danaherls.scene7.com"}}else{window.DanaherConfig={siteID:"ls-us-en",gtmID:"GTM-KCBGM2N",munchkinID:"439-KNJ-322",marketoDomain:"//439-KNJ-322.mktoweb.com",quoteCartPath:"/us/en/quote-cart.html",cartPath:"/us/en/cart.html",addressesPath:"/us/en/addresses.html",shippingPath:"/us/en/shipping.html",paymentPath:"/us/en/payment.html",receiptPath:"/us/en/receipt.html",quoteSubmitPath:"/us/en/submit-quote.html",intershopDomain:"https://stage.shop.lifesciences.danaher.com",intershopPath:"/INTERSHOP/rest/WFS/DANAHERLS-LSIG-Site/-",searchOrg:"danahernonproduction1892f3fhz",searchKey:"xx2a2e7271-78c3-4e3b-bac3-2fcbab75323b",workflowProductKey:"xx26ffc727-cc72-4bbd-98e3-34052f296382",workflowResourceKey:"xx14676f1d-cf4a-4a38-94f0-eda56e9920f1",productKey:"xx32da148e-dfd0-4725-a443-c05a7793afea",familyProductKey:"xx4e3989d6-93aa-4140-a227-19da35fcd1cc",familyResourceKey:"xx8274a91e-b29c-4267-8b3a-5022a2698605",categoryProductKey:"xxdf9d160d-f6e5-4c8c-969b-8570d7b81418",categoryDetailKey:"xxf2ea9bfd-bccb-4195-90fd-7757504fdc33",productRecommendationsKey:"xxea4d2c40-26e7-4e98-9377-d8ebe3f435ea",megaMenuPath:"/content/dam/danaher/system/navigation/megamenu_items_us.json",coveoProductPageTitle:"Product Page",pdfEmbedKey:"4a472c386025439d8a4ce2493557f6e7",host:"stage.lifesciences.danaher.com",scene7host:"https://s7d9.scene7.com"}}window.dataLayer=[];window.dataLayer.push({user:{customerID:"",accountType:"guest",marketCode:"",company:"",role:"",city:"",state:"",country:"",postalCode:"",lastVisit:""}});window.dataLayer.push({page:getDLPage()});loadPage(); \ No newline at end of file +import{sampleRUM,loadHeader,loadFooter,decorateButtons,decorateIcons,decorateSections,decorateBlocks,decorateTemplateAndTheme,waitForLCP,loadBlocks,loadCSS,toClassName,getMetadata,createOptimizedPicture,loadBlock,decorateBlock}from"./lib-franklin.js";import{div,img}from"./dom-builder.js";const LCP_BLOCKS=["breadcrumb","product-hero","carousel","columns"];const TEMPLATE_LIST={blog:{templateName:"blog",dependencies:["./schema.js","../blocks/columns/columns.js","../blocks/social-media/social-media.js","../blocks/article-info/article-info.js"]},productdetail:{templateName:"productDetail",dependencies:["./commerce.js","./product-payload-builder.js","./schema.js"]},processstep:"processstep",topic:"topic",library:"library",info:"library"};TEMPLATE_LIST.news=TEMPLATE_LIST.blog;export function getEdgeDeliveryPath(path){return path.replace(/^\/content\/danaher\/ls/,"").replace(/\.html$/,"")}export function moveAttributes(from,to,attributes){if(!attributes){attributes=[...from.attributes].map((({nodeName:nodeName})=>nodeName))}attributes.forEach((attr=>{const value=from.getAttribute(attr);if(value){to.setAttribute(attr,value);from.removeAttribute(attr)}}))}export function moveInstrumentation(from,to){moveAttributes(from,to,[...from.attributes].map((({nodeName:nodeName})=>nodeName)).filter((attr=>attr.startsWith("data-aue-")||attr.startsWith("data-richtext-"))))}export function imageHelper(imageUrl,imageAlt,eager=false){if(imageUrl.indexOf(".scene7.com")>-1){return img({src:`${imageUrl}`,alt:imageAlt,loading:eager?"eager":"lazy",class:"mb-2 h-48 w-full object-cover"})}const cardImage=createOptimizedPicture(imageUrl,imageAlt,eager,[{width:"500"}]);cardImage.querySelector("img").className="mb-2 h-48 w-full object-cover";return cardImage}export function createOptimizedS7Picture(src,alt="",eager=false){if(src.startsWith("/is/image")||src.indexOf(".scene7.com")>-1){const picture=document.createElement("picture");picture.appendChild(img({src:`${src}?$danaher-mobile$`,fetchpriority:"high",alt:alt,loading:eager?"eager":"lazy"}));return picture}return img({src:src,alt:alt,loading:eager?"eager":"lazy"})}export function formatDateUTCSeconds(date,options={}){const dateObj=new Date(0);dateObj.setUTCSeconds(date);return dateObj.toLocaleDateString("en-US",{month:"short",day:"2-digit",year:"numeric",...options})}export function generateUUID(){return Math.floor(1e3+Math.random()*9e3)}let originalOffset=0;export function scrollJumpMenuFixed(pageJumpMenuContainer){if(!originalOffset){const rectPageTabs=pageJumpMenuContainer.getBoundingClientRect();originalOffset=rectPageTabs.top}if(window.scrollY>originalOffset){pageJumpMenuContainer.classList.add(..."w-full fixed mt-[-1px] bg-white shadow-lg inset-x-0 top-[83px] py-2 z-10 [&_.page-jump-menu-wrapper]:md:max-w-7xl [&_ul>li>a]:flex-row [&_ul>li>a]:items-center [&_ul>li>a]:h-full [&_li>a>span.icon-chevron-down]:hidden".split(" "));document.querySelector(".page-jump-menu-container.fixed ul")?.classList.add("shadow-none","rounded-none");document.querySelectorAll(".page-jump-menu-container.fixed ul li")?.forEach((el=>{el?.firstElementChild?.classList.add("rounded-full");el?.firstElementChild?.querySelector("span.icon svg use")?.classList.add("stroke-danaherpurple-500")}));document.querySelector('.page-jump-menu-container.fixed li[aria-selected="true"] a span.icon svg')?.classList.add("stroke-white");pageJumpMenuContainer.classList.remove(..."[&_.page-jump-menu-wrapper]:md:max-w-max [&_ul]:divide-x [&_ul>li>a]:h-40 [&_ul>li>a]:flex-col [&_ul>li>a]:justify-center".split(" "))}else{pageJumpMenuContainer.classList.remove(..."w-full fixed mt-[-1px] bg-white shadow-lg inset-x-0 top-[83px] py-2 z-10 [&_.page-jump-menu-wrapper]:md:max-w-7xl [&_ul>li>a]:flex-row [&_ul>li>a]:items-center [&_ul>li>a]:h-full [&_li>a>span.icon-chevron-down]:hidden".split(" "));document.querySelectorAll(".page-jump-menu-container ul li")?.forEach((el=>{el?.firstElementChild?.classList.remove("rounded-full");el?.firstElementChild?.querySelector("span.icon svg use")?.classList.remove("stroke-danaherpurple-500")}));pageJumpMenuContainer.classList.add(..."[&_.page-jump-menu-wrapper]:md:max-w-max [&_ul]:divide-x [&_ul>li>a]:h-40 [&_ul>li>a]:flex-col [&_ul>li>a]:justify-center".split(" "))}}let pageTabsOriginalOffset=0;export function scrollPageTabFixed(pageTabsContainer){if(!pageTabsOriginalOffset){const rectPageTabs=pageTabsContainer.getBoundingClientRect();pageTabsOriginalOffset=rectPageTabs.top}if(window.scrollY>pageTabsOriginalOffset){pageTabsContainer.classList.add(..."w-full fixed mt-[-1px] bg-white shadow-lg inset-x-0 top-[83px] py-2 z-10 [&_.page-tabs-wrapper]:md:max-w-7xl [&_ul>li>a]:flex-row [&_ul>li>a]:items-center [&_ul>li>a]:h-full [&_li>a>span.icon-chevron-down]:hidden".split(" "));pageTabsContainer.classList.remove(..."[&_.page-tabs-wrapper]:md:max-w-max [&_ul]:divide-x [&_ul>li>a]:h-40 [&_ul>li>a]:flex-col [&_ul>li>a]:justify-center".split(" "))}else{pageTabsContainer.classList.remove(..."w-full fixed mt-[-1px] bg-white shadow-lg inset-x-0 top-[83px] py-2 z-10 [&_.page-tabs-wrapper]:md:max-w-7xl [&_ul>li>a]:flex-row [&_ul>li>a]:items-center [&_ul>li>a]:h-full [&_li>a>span.icon-chevron-down]:hidden".split(" "));pageTabsContainer.classList.add(..."[&_.page-tabs-wrapper]:md:max-w-max [&_ul]:divide-x [&_ul>li>a]:h-40 [&_ul>li>a]:flex-col [&_ul>li>a]:justify-center".split(" "))}}export function makePublicUrl(url){const isProd=window.location.hostname.includes("lifesciences.danaher.com");try{const newURL=new URL(url,window.location.origin);if(isProd){if(newURL.pathname.endsWith(".html")){return newURL.pathname}newURL.pathname+=".html";return newURL.pathname}if(newURL.pathname.endsWith(".html")){newURL.pathname=newURL.pathname.slice(0,-5);return newURL.pathname}return newURL.pathname}catch(error){console.error("Invalid URL:",error);return url}}export function setJsonLd(data,name){const existingScript=document.head.querySelector(`script[data-name="${name}"]`);if(existingScript){existingScript.innerHTML=JSON.stringify(data);return}const script=document.createElement("script");script.type="application/ld+json";script.innerHTML=JSON.stringify(data);script.dataset.name=name;document.head.appendChild(script)}function setFavicon(){const faviconLink=document.querySelector("link[rel*='icon']")||document.createElement("link");faviconLink.type="image/x-icon";faviconLink.rel="shortcut icon";faviconLink.href=`https://${window.location.hostname}/favicon.ico`;document.getElementsByTagName("head")[0].appendChild(faviconLink)}export async function getFragmentFromFile(url){const response=await fetch(url);if(!response.ok){console.error("error loading fragment details",response);return null}const text=await response.text();if(!text){console.error("fragment details empty",url);return null}return text}export function getCookie(cname){let value=decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(cname).replace(/[\\-\\.\\+\\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null;if(value&&(value.substring(0,1)==="{"&&value.substring(value.length-1,value.length)==="}"||value.substring(0,1)==="["&&value.substring(value.length-1,value.length)==="]")){try{value=JSON.parse(value)}catch(e){return value}}return value}export function isOTEnabled(){const otCookie=getCookie("OptanonConsent");if(typeof otCookie==="string"){return otCookie.includes("C0002:1")}return true}export function setCookie(cname,cvalue,expTime=30*1e3*60*60*24,path="/"){const today=new Date;today.setTime(today.getTime()+expTime);const expires="expires=".concat(today.toGMTString());const cookieString=cname.concat("=").concat(cvalue).concat(";").concat(expires).concat(";path=").concat(path);document.cookie=cookieString}async function buildVideo(main){const videoLinks=main.querySelectorAll('a[href*="youtube.com"],a[href*="vimeo.com"],a[href*="vidyard.com"]');if(videoLinks.length>0){const{default:decorateEmbed}=await import("../blocks/embed/embed.js");videoLinks.forEach((link=>{if(link.closest(".embed, .hero")==null){decorateEmbed(link.parentNode)}}))}}async function loadFonts(){await loadCSS(`${window.hlx.codeBasePath}/styles/fonts.css`);try{if(!window.location.hostname.includes("localhost"))sessionStorage.setItem("fonts-loaded","true")}catch(e){}}function loadBreadCrumb(){const header=document.querySelector("header");const breadcrumb=document.createElement("breadcrumb");if(window.location.pathname!=="/")header.after(breadcrumb)}function loadMobileMenu(){const breadcrumb=document.querySelector("breadcrumb");const mobileMunu=document.createElement("mobilemenu");const url=new URL(window.location.href);if(url.pathname.match(/\/us\/en\/products\/(family\/|sku\/|bundles\/)/)||url.pathname.match(/\/us\/en\/solutions\//)){breadcrumb.after(mobileMunu)}}function buildAutoBlocks(main){try{buildVideo(main)}catch(error){console.error("Auto Blocking failed",error)}}export function decorateModals(main){const ctaModalButton=main.querySelector(".show-modal-btn");const content=()=>ctaModalButton.getAttribute("data-dialog-message")?ctaModalButton.getAttribute("dialog-message"):"";ctaModalButton?.addEventListener("click",(async e=>{e.preventDefault();const{default:getModal}=await import("./modal.js");const customModal=await getModal("custom-modal",content,(modal=>{modal.querySelector('p[name="close"]')?.addEventListener("click",(()=>modal.close()))}));customModal.showModal()}))}function decorateTwoColumnSection(main){main.querySelectorAll(".section.container-two-col").forEach((section=>{const defaultContentWrappers=section.querySelectorAll(":scope > .default-content-wrapper");defaultContentWrappers.forEach((contentWrapper=>{[...contentWrapper.children].forEach((child=>{section.appendChild(child)}));let nextElement=contentWrapper.nextSibling;const allBlocks=[];while(nextElement){if(nextElement.className.includes("-wrapper"))allBlocks.push(nextElement);nextElement=nextElement.nextSibling}section.append(...allBlocks);section.removeChild(contentWrapper)}));const newSection=div();let currentDiv=null;[...section.children].forEach((child=>{if(child.tagName==="H1"){newSection.appendChild(div({class:"col-left lg:w-1/3 xl:w-1/4 pt-4"}));currentDiv=div({class:"col-right w-full mt-0 md:mt-4 lg:mt-0 lg:w-2/3 xl:w-3/4 pt-6 pb-0 md:pb-10"})}const childClone=child.cloneNode(true);if(childClone.tagName==="H2"&&childClone.querySelector(":scope > strong")){if(currentDiv?.classList.contains("col-right")){newSection.appendChild(currentDiv)}childClone.className="text-3xl leading-6 pt-6 pb-4 my-0";newSection.appendChild(div({class:"col-left lg:w-1/3 xl:w-1/3 pr-11"},childClone));currentDiv=div({class:"col-right w-full mt-4 lg:mt-0 lg:w-2/3 xl:w-2/3 pt-6 pb-10"})}else if(currentDiv?.classList.contains("col-right")){currentDiv.appendChild(childClone)}}));if(currentDiv){newSection.appendChild(currentDiv)}newSection.classList.add("w-full","flex","flex-wrap","break-normal");section.innerHTML=newSection.outerHTML;section.classList.add("mx-auto","w-full","flex","flex-wrap","mb-5")}))}function updateExternalLinks(main){const REFERERS=[window.location.origin];main.querySelectorAll("a[href]").forEach((a=>{try{const{origin:origin,pathname:pathname,hash:hash}=new URL(a.href,window.location.href);const targetHash=hash&&hash.startsWith("#_");const isPDF=pathname.split(".").pop()==="pdf";if(origin&&origin!==window.location.origin&&!targetHash||isPDF){a.setAttribute("target","_blank");if(!REFERERS.includes(origin))a.setAttribute("rel","noopener")}else if(targetHash){a.setAttribute("target",hash.replace("#",""));a.href=a.href.replace(hash,"")}}catch(e){console.warn(`Invalid link in ${main}: ${a.href}`)}}))}function lazyLoadHiddenPageNavTabs(sections,nameOfFirstSection){const activeHash=window.location.hash;const active=activeHash?activeHash.substring(1,activeHash.length).toLowerCase():nameOfFirstSection;sections.forEach((section=>{const hasBreadCrumb=section.className.includes("breadcrumb-container");if(!hasBreadCrumb&§ion.getAttribute("aria-labelledby")!==active){section.querySelectorAll(".block").forEach((block=>{block.setAttribute("data-block-status","loaded");block.setAttribute("data-block-lazy-load",true);block.parentElement.style.display="none"}));const loadLazyBlocks=lazySection=>{lazySection.querySelectorAll(".block[data-block-lazy-load]").forEach((async block=>{block.removeAttribute("data-block-lazy-load");block.setAttribute("data-block-status","initialized");await loadBlock(block);block.parentElement.style.display=""}));section.setAttribute("data-section-status","loaded")};const observer=new IntersectionObserver((entries=>{if(entries.some((e=>e.isIntersecting))){observer.disconnect();loadLazyBlocks(section)}}));observer.observe(section);setTimeout((()=>{observer.disconnect();loadLazyBlocks(section)}),5e3)}}))}function decoratePageNav(main){const pageTabsBlock=main.querySelector(".page-tabs");if(!pageTabsBlock)return;const pageTabSection=pageTabsBlock.closest("div.section");let sections=[...main.querySelectorAll("div.section")];sections=sections.slice(sections.indexOf(pageTabSection)+1);const namedSections=sections.filter((section=>section.hasAttribute("data-tabname")));let index=0;sections.forEach((section=>{if(indeximport(dep)))]).then((([mod])=>mod.default));if(decorator){await decorator(main)}document.body.classList.add(templateName)}}catch(error){console.error("Auto Blocking failed",error)}}function decorateEmbeddedBlocks(container){container.querySelectorAll("div.section > div").forEach(decorateBlock)}export async function processEmbedFragment(element){const block=div({class:"embed-fragment"});[...element.classList].forEach((className=>{block.classList.add(className)}));const link=element.textContent;if(link){const fragment=await getFragmentFromFile(`${link}.plain.html`);if(fragment){block.innerHTML=fragment;const sections=block.querySelectorAll(".embed-fragment > div");[...sections].forEach((section=>{section.classList.add("section")}));decorateEmbeddedBlocks(block);decorateSections(block);loadBlocks(block)}else{const elementInner=element.innerHTML;block.append(div({class:"section"}));block.querySelector(".section").innerHTML=elementInner}}decorateButtons(block);decorateIcons(block);return block}function loadEvergageScript(){const script=document.createElement("script");if(window.location.host==="lifesciences.danaher.com"){script.src="https://cdn.evgnet.com/beacon/v55685555553mx3rf3h3n3n3i091550196/danaher_ls_prod/scripts/evergage.min.js"}else{script.src="https://cdn.evgnet.com/beacon/v55685555553mx3rf3h3n3n3i091550196/danaher_ls_staging/scripts/evergage.min.js"}script.onload=function onEvergageLoad(){};script.onerror=function onEvergageError(){};document.head.appendChild(script)}loadEvergageScript();function loadATPageParams(){const id=window.location.pathname.replaceAll("/","_").replace(/\.html$/,"").substring(1);const skuId=getMetadata("sku");const categoryId=getMetadata("fullcategory").split("|").pop();const thumbnailURL=getMetadata("og:image");const title=getMetadata("og:title");const name=title.indexOf("| Danaher Life Sciences")>-1?title.split("| Danaher Life Sciences")[0]:title;const message=getMetadata("og:description");const pageUrl=getMetadata("og:url");const brand=getMetadata("brand");const page=window.location.pathname.split("/")[3];const tags=getMetadata("article:tag");const articleAuthor=getMetadata("authorname");const articlePostDate=getMetadata("publishdate");const articleReadTime=getMetadata("readingtime");const targetParams={id:id,skuId:skuId,categoryId:categoryId,thumbnailURL:thumbnailURL,name:name,message:message,pageUrl:pageUrl,brand:brand,page:page,tags:tags,articleAuthor:articleAuthor,articlePostDate:articlePostDate,articleReadTime:articleReadTime};return targetParams}function initATJS(path,config){window.targetGlobalSettings=config;window.atPageParams=loadATPageParams();window.targetPageParams=function getTargetPageParams(){return{at_property:"6aeb619e-92d9-f4cf-f209-6d88ff58af6a","entity.id":window.atPageParams?.id,"entity.skuId":window.atPageParams?.skuId,"entity.categoryId":window.atPageParams?.categoryId,"entity.thumbnailURL":window.atPageParams?.thumbnailURL,"entity.name":window.atPageParams?.name,"entity.message":window.atPageParams?.message,"entity.pageUrl":window.atPageParams?.pageUrl,"entity.brand":window.atPageParams?.brand,"entity.page":window.atPageParams?.page,"entity.tags":window.atPageParams?.tags,"entity.articleAuthor":window.atPageParams?.articleAuthor,"entity.articlePostDate":window.atPageParams?.articlePostDate,"entity.articleReadTime":window.atPageParams?.articleReadTime,danaherCompany:localStorage.getItem("danaher_company")?localStorage.getItem("danaher_company"):"",utmCampaign:localStorage.getItem("danaher_utm_campaign")?localStorage.getItem("danaher_utm_campaign"):"",utmSource:localStorage.getItem("danaher_utm_source")?localStorage.getItem("danaher_utm_source"):"",utmMedium:localStorage.getItem("danaher_utm_medium")?localStorage.getItem("danaher_utm_medium"):"",utmContent:localStorage.getItem("danaher_utm_content")?localStorage.getItem("danaher_utm_content"):""}};return new Promise((resolve=>{import(path).then(resolve)}))}function onDecoratedElement(fn){if(document.querySelector('[data-block-status="loaded"],[data-section-status="loaded"]')){fn()}const observer=new MutationObserver((mutations=>{if(mutations.some((m=>m.target.tagName==="BODY"||m.target.dataset.sectionStatus==="loaded"||m.target.dataset.blockStatus==="loaded"))){fn()}}));observer.observe(document.querySelector("main"),{subtree:true,attributes:true,attributeFilter:["data-block-status","data-section-status"]});observer.observe(document.querySelector("body"),{childList:true})}function toCssSelector(selector){return selector.replace(/(\.\S+)?:eq\((\d+)\)/g,((_,clss,i)=>`:nth-child(${Number(i)+1}${clss?` of ${clss})`:""}`))}async function getElementForOffer(offer){const selector=offer.cssSelector||toCssSelector(offer.selector);return document.querySelector(selector)}async function getElementForMetric(metric){const selector=toCssSelector(metric.selector);return document.querySelector(selector)}async function getAndApplyOffers(){const response=await window.adobe.target.getOffers({request:{execute:{pageLoad:{}}}});const{options:options=[],metrics:metrics=[]}=response.execute.pageLoad;onDecoratedElement((()=>{window.adobe.target.applyOffers({response:response});options.forEach((o=>o.content=o.content.filter((c=>!getElementForOffer(c)))));metrics.map(((m,i)=>getElementForMetric(m)?i:-1)).filter((i=>i>=0)).reverse().map((i=>metrics.splice(i,1)))}))}let atjsPromise=Promise.resolve();const urlTarget=window.location.pathname;const regex=/^\/(us\/en\/products\.html)?$/;if(!regex.test(urlTarget)){atjsPromise=initATJS("./at.js",{clientCode:"danaher",serverDomain:"danaher.tt.omtrdc.net",imsOrgId:"08333E7B636A2D4D0A495C34@AdobeOrg",bodyHidingEnabled:false,cookieDomain:window.location.hostname,pageLoadEnabled:false,secureOnly:true,viewsEnabled:false,withWebGLRenderer:false}).catch((e=>{console.error("Error loading at.js",e)}));document.addEventListener("at-library-loaded",(()=>getAndApplyOffers()))}async function loadEager(doc){document.documentElement.lang="en";decorateTemplateAndTheme();await window.hlx.plugins.run("loadEager");const main=doc.querySelector("main");if(main){await decorateTemplates(main);decorateMain(main);await atjsPromise;await new Promise((resolve=>{window.requestAnimationFrame((async()=>{document.body.classList.add("appear");await waitForLCP(LCP_BLOCKS);resolve()}))}))}try{if(window.innerWidth>=900||sessionStorage.getItem("fonts-loaded")){loadFonts()}}catch(e){}}function getParameterByName(parameter,url=window.location.href){const modifiedParameter=parameter.replace(/[[\]]/g,"$&");const paramRegex=new RegExp(`[?&]${modifiedParameter}(=([^&#]*)|&|#|$)`);const results=paramRegex.exec(url);if(!results)return null;if(!results[2])return"";return decodeURIComponent(results[2].replace(/\+/g," "))}function loadUTMprams(){const utmParameters=["utm_campaign","utm_source","utm_medium","utm_content","utm_term","utm_previouspage"];utmParameters.forEach((param=>{const value=getParameterByName(param);if(value!==null){window.localStorage.setItem(`danaher_${param}`,value)}}))}async function loadLazy(doc){const main=doc.querySelector("main");await loadBlocks(main);const{hash:hash}=window.location;const element=hash?doc.getElementById(hash.substring(1)):false;if(hash&&element)element.scrollIntoView();loadFooter(doc.querySelector("footer"));loadCSS(`${window.hlx.codeBasePath}/styles/lazy-styles.css`);loadFonts();window.hlx.plugins.run("loadLazy");sampleRUM("lazy");sampleRUM.observe(main.querySelectorAll("div[data-block-name]"));sampleRUM.observe(main.querySelectorAll("picture > img"));loadUTMprams()}function loadDelayed(){window.setTimeout((()=>{window.hlx.plugins.load("delayed");window.hlx.plugins.run("loadDelayed");return import("./delayed.js")}),4e3);import("./sidekick.js").then((({initSidekick:initSidekick})=>initSidekick()))}async function loadPage(){setFavicon();await window.hlx.plugins.load("eager");await loadEager(document);await window.hlx.plugins.load("lazy");await loadLazy(document);loadDelayed()}function getDLPage(){const page={title:document.querySelector("title").textContent.replace(/[\n\t]/gm,""),language:"en",locale:"US",level:"top",type:"webpage",keywords:"",creationDate:getMetadata("creationdate"),updateDate:getMetadata("updatedate")};const path=window.location.pathname;if(path==="/"||path==="/us/en"||path==="/us/en.html"){page.level="top";page.type="home"}else if(path.includes("/us/en/news")){page.level="top";page.type="news"}else if(path.includes("/us/en/blog")){page.level="middle";page.type="blog"}else if(path.includes("/us/en/solutions")){page.level="middle";page.type="solutions"}else if(path.includes("/us/en/applications")){page.level="middle";page.type="applications"}else if(path.includes("/us/en/products")){if(path.includes("/us/en/products/family")){page.level="bottom";page.type="family"}else if(path.includes("/us/en/products/bundles")){page.level="bottom";page.type="bundles"}else if(path.includes("/us/en/products/sku")){page.level="bottom";page.type="sku"}else if(path.includes("/topics")){page.level="other";page.type="topics"}else{page.level="bottom";page.type="products"}}else if(path.includes("/us/en/library")){page.level="other";page.type="library"}else if(path.includes("/us/en/about-us")){page.level="top";page.type="about-us"}else if(path.includes("/us/en/expert")){page.level="top";page.type="expert"}else if(path.includes("/us/en/search")||path.includes("/us/en/danahersearch")){page.level="top";page.type="search"}else if(path.includes("/us/en/signin")){page.level="top";page.type="signin"}else if(path.includes("/us/en/legal")){page.level="top";page.type="legal"}return page}const urlParams=new URLSearchParams(window.location.search);const useProd=urlParams.get("useProd");if(window.location.host==="lifesciences.danaher.com"||useProd==="true"){window.DanaherConfig={siteID:"ls-us-en",gtmID:"GTM-THXPLCS",munchkinID:"306-EHG-641",marketoDomain:"//306-EHG-641.mktoweb.com",quoteCartPath:"/us/en/quote-cart.html",cartPath:"/us/en/cart.html",addressesPath:"/us/en/addresses.html",shippingPath:"/us/en/shipping.html",paymentPath:"/us/en/payment.html",receiptPath:"/us/en/receipt.html",quoteSubmitPath:"/us/en/submit-quote.html",intershopDomain:"https://shop.lifesciences.danaher.com",intershopPath:"/INTERSHOP/rest/WFS/DANAHERLS-LSIG-Site/-",searchOrg:"danaherproductionrfl96bkr",searchKey:"xxf2f10385-5a54-4a18-bb48-fd8025d6b5d2",workflowProductKey:"xx3d1b8da5-d1e9-4989-bbed-264a248a9e22",workflowResourceKey:"xxf6a8b387-10f2-4660-af5d-6d304d0a789d",productKey:"xxfb161aa6-0fa0-419f-af37-9c6d7784bf76",familyProductKey:"xx1ecd2a4f-8391-4c70-b3c0-2d589bda56b7",familyResourceKey:"xx9dd85afc-64b6-4295-bc5d-eb8285f96d52",categoryProductKey:"xx2a299d60-2cf1-48ab-b9d5-94daeb25f1d6",categoryDetailKey:"xx61910369-c1ab-4df9-8d8a-3092b1323fcc",productRecommendationsKey:"xx107716c0-1ccd-4a61-8717-6ca36b6cdb0e",megaMenuPath:"/content/dam/danaher/system/navigation/megamenu_items_us.json",coveoProductPageTitle:"Product Page",pdfEmbedKey:"4a472c386025439d8a4ce2493557f6e7",host:"lifesciences.danaher.com",scene7host:"https://danaherls.scene7.com"}}else{window.DanaherConfig={siteID:"ls-us-en",gtmID:"GTM-KCBGM2N",munchkinID:"439-KNJ-322",marketoDomain:"//439-KNJ-322.mktoweb.com",quoteCartPath:"/us/en/quote-cart.html",cartPath:"/us/en/cart.html",addressesPath:"/us/en/addresses.html",shippingPath:"/us/en/shipping.html",paymentPath:"/us/en/payment.html",receiptPath:"/us/en/receipt.html",quoteSubmitPath:"/us/en/submit-quote.html",intershopDomain:"https://stage.shop.lifesciences.danaher.com",intershopPath:"/INTERSHOP/rest/WFS/DANAHERLS-LSIG-Site/-",searchOrg:"danahernonproduction1892f3fhz",searchKey:"xx2a2e7271-78c3-4e3b-bac3-2fcbab75323b",workflowProductKey:"xx26ffc727-cc72-4bbd-98e3-34052f296382",workflowResourceKey:"xx14676f1d-cf4a-4a38-94f0-eda56e9920f1",productKey:"xx32da148e-dfd0-4725-a443-c05a7793afea",familyProductKey:"xx4e3989d6-93aa-4140-a227-19da35fcd1cc",familyResourceKey:"xx8274a91e-b29c-4267-8b3a-5022a2698605",categoryProductKey:"xxdf9d160d-f6e5-4c8c-969b-8570d7b81418",categoryDetailKey:"xxf2ea9bfd-bccb-4195-90fd-7757504fdc33",productRecommendationsKey:"xxea4d2c40-26e7-4e98-9377-d8ebe3f435ea",megaMenuPath:"/content/dam/danaher/system/navigation/megamenu_items_us.json",coveoProductPageTitle:"Product Page",pdfEmbedKey:"4a472c386025439d8a4ce2493557f6e7",host:"stage.lifesciences.danaher.com",scene7host:"https://s7d9.scene7.com"}}window.dataLayer=[];window.dataLayer.push({user:{customerID:"",accountType:"guest",marketCode:"",company:"",role:"",city:"",state:"",country:"",postalCode:"",lastVisit:""}});window.dataLayer.push({page:getDLPage()});loadPage(); \ No newline at end of file diff --git a/styles/styles.css b/styles/styles.css index d6908497..90388e6e 100644 --- a/styles/styles.css +++ b/styles/styles.css @@ -727,7 +727,7 @@ body.appear { width: 100%; } -main .section:not(.stretch, .product-hero-container, .workflow-carousel-container, .carousel-container, .product-card-container, .page-jump-menu-container, .page-tabs-container, .stats-container) { +main .section:not(.stretch, .product-hero-container, .workflow-carousel-container, .carousel-container, .product-card-container, .page-jump-menu-container, .page-tabs-container, .stats-container, .spline-viewer-container) { padding-left: 1.5rem; padding-right: 1.5rem; padding-top: 2rem; @@ -735,12 +735,12 @@ main .section:not(.stretch, .product-hero-container, .workflow-carousel-containe } @media (min-width: 768px) { - main .section:not(.stretch, .product-hero-container, .workflow-carousel-container, .carousel-container, .product-card-container, .page-jump-menu-container, .page-tabs-container, .stats-container) { + main .section:not(.stretch, .product-hero-container, .workflow-carousel-container, .carousel-container, .product-card-container, .page-jump-menu-container, .page-tabs-container, .stats-container, .spline-viewer-container) { padding-top: 3rem; padding-bottom: 3rem; } - main .section > div:not(.carousel-wrapper, .page-jump-menu-wrapper, .page-tabs-wrapper) { + main .section > div:not(.carousel-wrapper, .page-jump-menu-wrapper, .page-tabs-wrapper, .spline-viewer-wrapper) { margin-left: auto; margin-right: auto; max-width: 80rem; @@ -1488,7 +1488,7 @@ main .top-border > div.columns-wrapper:first-child { margin-bottom: 0.5rem; } -.productdetail main .columns.columns-2-cols .picdiv p:not(picture) + p:last-child, +.productdetail main .columns.columns-2-cols .picdiv p:not(picture) + p:last-child, .productdetail main .columns p.embed-vimeo~p { font-size: 0.875rem; line-height: 1.25rem; @@ -1504,6 +1504,10 @@ main .top-border > div.columns-wrapper:first-child { color: rgb(17 24 39 / var(--tw-text-opacity)) !important; } +.container-two-col .col-left h2 strong { + font-weight: 500 !important; +} + .productdetail main .columns p { padding-top: 0.5rem; font-size: 1rem !important; @@ -1937,7 +1941,7 @@ svg symbol path { } .processstep main .default-content-wrapper.section.side-nav-container, - .topic main, + .topic main, .topichub main { margin-left: auto; margin-right: auto; @@ -1949,7 +1953,7 @@ svg symbol path { @media (min-width: 1024px) { .processstep main .default-content-wrapper.section.side-nav-container, - .topic main, + .topic main, .topichub main { grid-template-columns: repeat(12, minmax(0, 1fr)); padding-left: 0px; @@ -1962,16 +1966,16 @@ svg symbol path { margin-bottom: 1.5rem; } -.processstep main .default-content-wrapper.section.side-nav-container > div.side-nav-wrapper, - .topic main .side-nav-container, +.processstep main .default-content-wrapper.section.side-nav-container > div.side-nav-wrapper, + .topic main .side-nav-container, .topichub main .side-nav-container { display: none; padding: 0px; } @media (min-width: 1024px) { - .processstep main .default-content-wrapper.section.side-nav-container > div.side-nav-wrapper, - .topic main .side-nav-container, + .processstep main .default-content-wrapper.section.side-nav-container > div.side-nav-wrapper, + .topic main .side-nav-container, .topichub main .side-nav-container { grid-column: span 3 / span 3; grid-column-start: 1; @@ -2057,6 +2061,20 @@ main .section .talk-to-an-expert-form-wrapper .talk-to-an-expert-form > div ul { overflow-y: scroll; } +.carousel-container .btn-primary-purple { + border-width: 2px; +} + +@media (min-width: 1024px) { + .mini-teasers-container .default-content-wrapper h2 { + padding-top: 2rem; + } + + .columns-container p.link { + padding-top: 2rem; + } +} + .pointer-events-none { pointer-events: none; } @@ -2441,6 +2459,11 @@ main .section .talk-to-an-expert-form-wrapper .talk-to-an-expert-form > div ul { background-color: rgb(117 35 255 / var(--tw-bg-opacity)); } +.bg-danaherpurple-800 { + --tw-bg-opacity: 1; + background-color: rgb(64 0 165 / var(--tw-bg-opacity)); +} + .bg-gray-200 { --tw-bg-opacity: 1; background-color: rgb(229 231 235 / var(--tw-bg-opacity)); @@ -2541,6 +2564,10 @@ main .section .talk-to-an-expert-form-wrapper .talk-to-an-expert-form > div ul { padding-bottom: 1rem; } +.pr-11 { + padding-right: 2.75rem; +} + .pr-3 { padding-right: 0.75rem; } @@ -2573,16 +2600,16 @@ main .section .talk-to-an-expert-form-wrapper .talk-to-an-expert-form > div ul { font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; } -.\!text-base { - font-size: 1rem !important; - line-height: 1.5rem !important; -} - .text-2xl { font-size: 1.5rem; line-height: 2rem; } +.text-3xl { + font-size: 1.875rem; + line-height: 2.25rem; +} + .text-4xl { font-size: 2.25rem; line-height: 2.5rem; @@ -2906,10 +2933,18 @@ main .section.top-border { grid-column-start: 1; } + .xl\:w-1\/3 { + width: 33.333333%; + } + .xl\:w-1\/4 { width: 25%; } + .xl\:w-2\/3 { + width: 66.666667%; + } + .xl\:w-3\/4 { width: 75%; } diff --git a/styles/tailwind.css b/styles/tailwind.css index 2b218325..08c67a8b 100644 --- a/styles/tailwind.css +++ b/styles/tailwind.css @@ -33,24 +33,24 @@ @apply md:!leading-12 !font-medium !text-3xl md:!text-4xl2; } - h2 { + h2 { @apply !leading-9 !font-medium !text-2xl md:!text-3xl; } - h3 { + h3 { @apply !leading-8 !font-medium !text-xl md:!text-2xl; } - h4 { - @apply !leading-7 !font-medium !text-lg; + h4 { + @apply !leading-7 !font-medium !text-lg; } h5 { - @apply leading-7 font-normal text-lg; + @apply leading-7 font-normal text-lg; } h6 { - @apply font-normal text-base; + @apply font-normal text-base; } .eyebrow { @@ -88,11 +88,11 @@ @apply h-full w-full; } - main .section:not(.stretch, .product-hero-container, .workflow-carousel-container, .carousel-container, .product-card-container, .page-jump-menu-container, .page-tabs-container, .stats-container) { + main .section:not(.stretch, .product-hero-container, .workflow-carousel-container, .carousel-container, .product-card-container, .page-jump-menu-container, .page-tabs-container, .stats-container, .spline-viewer-container) { @apply px-6 py-8 md:py-12; } - main .section > div:not(.carousel-wrapper, .page-jump-menu-wrapper, .page-tabs-wrapper) { + main .section > div:not(.carousel-wrapper, .page-jump-menu-wrapper, .page-tabs-wrapper, .spline-viewer-wrapper) { @apply md:max-w-7xl md:mx-auto; } @@ -157,7 +157,7 @@ .container-two-col .col-right p { @apply mb-5; } - + .container-two-col .col-right a:not(.btn, .rounded-full, .carousel-slider, .text-danaherblue-600) { @apply bg-transparent underline underline-offset-4 decoration-danaherpurple-500 decoration-2 ease-in-out duration-150 transition-all; } @@ -181,7 +181,7 @@ main .default-content-wrapper p.button-container>a { @apply bg-transparent no-underline text-lg px-5 py-3 text-danaherpurple-500 border border-danaherpurple-500 leading-5 rounded-full font-medium mt-6 ease-in-out duration-150 transition-all; } - + main .default-content-wrapper p.button-container>a:hover { @apply bg-danaherpurple-500 text-white; } @@ -193,15 +193,15 @@ main .default-content-wrapper ol, main .default-content-wrapper ul { @apply mt-3 leading-7 href-text text-base ml-12 list-outside; } - + main .default-content-wrapper ol>li, main .default-content-wrapper ul>li { @apply mb-1 } - + main .default-content-wrapper ol { @apply list-decimal; } - + main .default-content-wrapper ul { @apply list-disc; } @@ -240,16 +240,16 @@ .processstep main .default-content-wrapper.section.side-nav-container { @apply flex flex-col lg:flex-row mx-auto gap-6; - } - + } + .processstep main .default-content-wrapper.section.side-nav-container div:nth-child(2) { @apply !w-9/12; - } + } .processstep main .default-content-wrapper.section.side-nav-container > div.side-nav-wrapper{ @apply !pl-4 !w-80; } - + .processstep main .default-content-wrapper.section.side-nav-container > div{ @apply !max-w-5xl !mr-0 !ml-0; } @@ -261,12 +261,12 @@ .library main > div { @apply !py-10 sm:!py-8 md:!px-5 empty:hidden; } - + .library main .recent-articles-container { @apply hidden lg:block lg:w-recent-articles bg-danaherpurple-25 space-y-4 !py-28 shrink-0; } - - .appear div.timeline > div:not(:last-child) { + + .appear div.timeline > div:not(:last-child) { .t-line::after { @apply content-[""] left-[38%] md:left-[18%] lg:left-[28%] w-px h-full absolute top-14 bottom-0 bg-danahergray-300; } @@ -283,11 +283,11 @@ .appear mobilemenu > div.mobile-jump-menu select.selected-tab { @apply block w-auto py-2 pl-4 text-base border border-gray-300 rounded text-danaherblue-600 focus:outline-none; } - + .column-wrapper{ @apply max-w-7xl w-full mx-auto; } - + .columns:not(.columns-2-cols) > div div > p:not(.button-container) { @apply text-lg block leading-5; } @@ -295,11 +295,11 @@ .columns.features-card-left > div > div.h-full > .card { @apply flex flex-row pb-6; } - + .columns.features-card-left > div > div.h-full > div.card > .left-content { @apply pr-3; } - + main .top-border > div.columns-wrapper:first-child { @apply !py-0; } @@ -307,11 +307,11 @@ .blog main .article-info-container { @apply mx-auto grid grid-cols-1 lg:grid-cols-12 w-full md:my-0 lg:mt-0 lg:mb-0 lg:pt-2; } - + .blog main .article-info-container > div:nth-child(1) { @apply block lg:col-span-3 lg:col-start-1 lg:row-span-6 pt-4 p-0; } - + .blog main .article-info-container > div:nth-child(2) { @apply lg:col-span-8 lg:col-start-5 space-y-4 mb-2 flex-1; } @@ -319,15 +319,15 @@ .blog main .section.default-content-wrapper > p { @apply mt-3 leading-7 text-base; } - + .blog main .columns h2 { @apply inline-flex font-semibold text-xl text-danahergray-900; } - + .blog main .columns > div > div > p:not(.button-container) { @apply mt-3 leading-7 text-base text-danahergray-700; } - + .blog main > div.tags-list-container > div.tags-list-wrapper div > a { @apply text-center inline-block rounded-full px-4 py-1 font-semibold text-danaherpurple-500 bg-danaherpurple-50; } @@ -347,36 +347,41 @@ .productdetail main .columns p.embed-vimeo { @apply my-2; } - - .productdetail main .columns.columns-2-cols .picdiv p:not(picture) + p:last-child, + + .productdetail main .columns.columns-2-cols .picdiv p:not(picture) + p:last-child, .productdetail main .columns p.embed-vimeo~p { @apply text-sm leading-5 text-gray-300; } - + .productdetail main .columns p > strong{ @apply !font-medium !text-lg !leading-5 !text-gray-900; } - + + + .container-two-col .col-left h2 strong { + @apply !font-medium; + } + .productdetail main .columns p { @apply pt-2 !text-base text-danahergray-700; } - + .productdetail main .columns.columns-2-cols .h-full { @apply text-base text-danahergray-700 py-2; } - + .productdetail main .columns.columns-2-cols .icon svg { @apply stroke-white stroke-0; } - + .productdetail main .columns.columns-3-cols > li { @apply text-center mb-3; } - + .productdetail main .default-content-wrapper > p { @apply w-3/4; } - + .productdetail main .default-content-wrapper > h2:only-child { @apply text-center; } @@ -455,9 +460,9 @@ } .product-hero .vertical-gallery-container > div > div:not(:nth-child(1)) { - @apply w-full lg:w-20 flex flex-row lg:flex-col lg:order-first gap-2 overflow-auto bg-transparent scroll-pl-6 snap-x [&>picture]:w-max - [&>*.view-more]:w-[75px] [&>*.view-more]:h-[75px] [&>*.view-more]:cursor-pointer - [&>*>img]:w-[75px] [&>*>img]:h-[75px] [&>*>img]:cursor-pointer + @apply w-full lg:w-20 flex flex-row lg:flex-col lg:order-first gap-2 overflow-auto bg-transparent scroll-pl-6 snap-x [&>picture]:w-max + [&>*.view-more]:w-[75px] [&>*.view-more]:h-[75px] [&>*.view-more]:cursor-pointer + [&>*>img]:w-[75px] [&>*>img]:h-[75px] [&>*>img]:cursor-pointer [&>*.active>img]:opacity-80 [&>*.active>img]:border-2 [&>*.active>img]:border-danaherpurple-500; } @@ -500,7 +505,7 @@ .page-jump-menu-container li[aria-selected="false"] > a, .page-tabs-container li[aria-selected="false"] > a { @apply bg-white; } - + .page-jump-menu-container li[aria-selected="true"] > a, .page-tabs-container li[aria-selected="true"] > a { @apply text-white bg-danaherpurple-500; } @@ -508,7 +513,7 @@ .page-jump-menu-container li[aria-selected="true"] svg, .page-tabs-container li[aria-selected="true"] svg { @apply stroke-white; } - + .page-jump-menu-container.fixed li > a, .page-tabs-container.fixed li > a { @apply rounded-full; } @@ -530,9 +535,9 @@ .page-jump-menu-container, .page-tabs-container { @apply hidden md:block -mt-20 px-0 md:px-4 lg:px-0 [&_.page-jump-menu-wrapper]:flex [&_.page-tabs-wrapper]:flex [&_.page-jump-menu-wrapper]:mx-auto [&_.page-tabs-wrapper]:mx-auto [&_.page-jump-menu-wrapper]:md:max-w-max [&_.page-tabs-wrapper]:md:max-w-max [&_.page-jump-menu-wrapper]:pt-4 [&_.page-jump-menu-wrapper]:pb-0 [&_.page-tabs-wrapper]:pt-4 [&_.page-tabs-wrapper]:pb-0 [&_ul>li>a]:h-40 [&_ul>li>a]:flex-col [&_ul>li>a]:justify-center ; } - + .processstep main .default-content-wrapper.section.side-nav-container, - .topic main, + .topic main, .topichub main { @apply grid px-4 lg:px-0 max-w-7xl mx-auto lg:grid-cols-12; } @@ -541,12 +546,12 @@ @apply col-span-12 mb-6; } - .processstep main .default-content-wrapper.section.side-nav-container > div.side-nav-wrapper, - .topic main .side-nav-container, + .processstep main .default-content-wrapper.section.side-nav-container > div.side-nav-wrapper, + .topic main .side-nav-container, .topichub main .side-nav-container { @apply hidden lg:block lg:col-span-3 lg:col-start-1 lg:row-span-6 lg:pt-4 p-0; } - + .processstep main .default-content-wrapper.section.side-nav-container > div, .topichub main .section.topic-list-container { @apply lg:col-span-8 lg:col-start-5 space-y-4 mb-2 flex-1; @@ -577,15 +582,27 @@ @apply overflow-y-scroll; } + .carousel-container .btn-primary-purple{ + @apply border-2; + } + + .mini-teasers-container .default-content-wrapper h2 { + @apply lg:pt-8; + } + + .columns-container p.link { + @apply lg:pt-8; + } + } @layer utilities { .external-links::after { @apply w-3 h-3 inline-block ml-1 bg-contain bg-no-repeat bg-center content-['']; - + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' viewBox='0 0 18 18'%3E%3Cpath fill-rule='evenodd' d='M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z'/%3E%3Cpath fill-rule='evenodd' d='M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z'/%3E%3C/svg%3E"); } - + main .section.top-border { @apply border-t border-solid border-black m-auto max-w-7xl mt-10; } diff --git a/tailwind.config.js b/tailwind.config.js index 85e0f664..402ab047 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -86,6 +86,7 @@ module.exports = { 'bottom-border-right', 'bg-color-right', 'top-border', + 'bg-danaherpurple-800' ], theme: { extend: { diff --git a/tools/actions/convert/test/fixtures/addtionalstyle-test-converted.html b/tools/actions/convert/test/fixtures/addtionalstyle-test-converted.html new file mode 100644 index 00000000..40a3cfea --- /dev/null +++ b/tools/actions/convert/test/fixtures/addtionalstyle-test-converted.html @@ -0,0 +1,93 @@ + + +
+
+
+ +
+
+
+
+
+

Fast Driving Result

+
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse sit amet dapibus nisl, in commodo arcu. Praesent id justo est. Sed vehicula cursus dolor vel dictum. Maecenas bibendum velit eu lectus posuere, vitae consectetur ante luctus. Ut ut porta neque. Sed commodo dui lectus, a mattis ex dapibus a.
+
+
+ +
+
+
+
+

Innovative Technologies to Accelerate Identification of High-Quality Clones

+

View Event

+
+
+
+

Browse Catalog

+
+
+
+ Danaher Corporation +
+
+

Laboratory Automation

+

Increase workflow reproducibility and standardization with cutting edge tools

+

Discover Solutions

+
+
+
+
:dam-User:
+
+

Talk to an expert

+

Our experts apply technology and proven solutions, working with you to design and implement integrated workflow solutions.

+

+
+
+
+
:dam-Mail:
+
+

Sign up for our newsletter

+

We’re always thinking ahead. Learn how we ensure that you can do the same.

+

+
+
+
+ +
+
+
+ + \ No newline at end of file diff --git a/tools/actions/convert/test/fixtures/addtionalstyle-test.html b/tools/actions/convert/test/fixtures/addtionalstyle-test.html new file mode 100644 index 00000000..5c6ce03c --- /dev/null +++ b/tools/actions/convert/test/fixtures/addtionalstyle-test.html @@ -0,0 +1,924 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + weseewayhome + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ + + + + + + +
+
+ + + + +
+ +
+ + + + +
+ + + +
+ +
+ +
+ +
+
+
+
+
+ + + + + + + + + +
+ + +
+ +
+
+
+
+ + +
+
+
+ + + + + + +
+ + + + + + + + +
+ + +
+
+
+
+
+ + + +
+
+ + + + +
+ +
+ + +

Browse Catalog

+ + + +
+
+ + + + + + + + +
+ + +
+ +
+ + +
+
+ + + + + +
+ + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tools/importer/transformers/cardList.js b/tools/importer/transformers/cardList.js index f3e72895..e888086c 100644 --- a/tools/importer/transformers/cardList.js +++ b/tools/importer/transformers/cardList.js @@ -1,5 +1,13 @@ /* global WebImporter */ const URLS_TO_BLOCK_MAP = [ + { + url: '/we-see-a-way.html', + blockName: 'Card List (wsaw)', + }, + { + url: '/we-see-a-way/solutions/', + blockName: 'Card List (wsaw)', + }, { url: '/blog.html', blockName: 'Card List (blog)', @@ -33,7 +41,8 @@ const URLS_TO_BLOCK_MAP = [ const createCardList = (main, document) => { const url = document.querySelector('[property="og:url"]')?.content; if (url) { - const blockName = URLS_TO_BLOCK_MAP.find((item) => url.endsWith(item.url))?.blockName; + // eslint-disable-next-line max-len + const blockName = URLS_TO_BLOCK_MAP.find((item) => url.endsWith(item.url) || url.includes(item.url))?.blockName; if (blockName) { const block = [[blockName], ['']]; WebImporter.DOMUtils.remove(main, ['h2', 'p']); diff --git a/tools/importer/transformers/embedScript.js b/tools/importer/transformers/embedScript.js index 518ee75a..438c5f50 100644 --- a/tools/importer/transformers/embedScript.js +++ b/tools/importer/transformers/embedScript.js @@ -51,6 +51,10 @@ const embedScript = (main, document) => { const scriptEls = main.querySelectorAll('div.script'); if (scriptEls.length > 0) { scriptEls.forEach((scriptEl) => { + if (scriptEl.querySelector('div#add-section')?.id === 'add-section') { + scriptEl.innerHTML = ''; + scriptEl.append(document.createElement('hr')); + } const iFrame = scriptEl.querySelector('iframe'); if (iFrame) { const anc = document.createElement('a'); diff --git a/tools/importer/transformers/fullLayoutSection.js b/tools/importer/transformers/fullLayoutSection.js index 70ab19a9..401ffd4c 100644 --- a/tools/importer/transformers/fullLayoutSection.js +++ b/tools/importer/transformers/fullLayoutSection.js @@ -3,7 +3,13 @@ const createFullLayoutSection = (main, document) => { let styleIndex = 0; main.querySelectorAll('fulllayout').forEach((e, i, arr) => { const div = e.querySelector('div'); - const style = div.getAttribute('class'); + let style = div.getAttribute('class'); + const idArray = div.getAttribute('id')?.split(':'); + let value; + if (idArray && idArray.at(0) === 'additionalstyles') { + value = idArray.at(1); + style = `${style},${value}`; + } if (style) { if (styleIndex === 0 && e.parentNode.previousElementSibling) e.prepend(document.createElement('hr')); const cells = [['Section Metadata'], ['style', style]]; diff --git a/tools/importer/transformers/index.js b/tools/importer/transformers/index.js index bf246b46..1858acca 100644 --- a/tools/importer/transformers/index.js +++ b/tools/importer/transformers/index.js @@ -46,6 +46,8 @@ import stats from './stats.js'; import workflowCarousel from './workflowCarousel.js'; import embedScript from './embedScript.js'; import callToActionText from './callToActionText.js'; +import productNotFound from './product-not-found.js'; +import splineViewer from './spline-viewer.js'; // eslint-disable-next-line import/prefer-default-export export const transformers = [ @@ -91,6 +93,8 @@ export const transformers = [ workflowCarousel, embedScript, callToActionText, + productNotFound, + splineViewer, ]; export const asyncTransformers = [ diff --git a/tools/importer/transformers/metadata.js b/tools/importer/transformers/metadata.js index dae7e0bc..6eab857b 100644 --- a/tools/importer/transformers/metadata.js +++ b/tools/importer/transformers/metadata.js @@ -129,6 +129,11 @@ const createMetadata = (main, document, html, params, urlStr) => { meta.topics = topic.content; } + const solutions = document.querySelector('[name="solutions"]'); + if (solutions && solutions.content) { + meta.solutions = solutions.content; + } + const workflow = document.querySelector('[name="workflow"]'); if (workflow && workflow.content) { meta.workflows = workflow.content; diff --git a/tools/importer/transformers/miniTeaser.js b/tools/importer/transformers/miniTeaser.js index a96d14f4..efb2cc2b 100644 --- a/tools/importer/transformers/miniTeaser.js +++ b/tools/importer/transformers/miniTeaser.js @@ -72,6 +72,7 @@ const createMiniTeaser = (main, document) => { if (websiteLinks.length > 0) { websiteLinks.forEach((links) => { const border = links.getAttribute('role'); + const labelText = links.getAttribute('aria-label'); const blockName = border ? `Mini Teasers (${border})` : 'Mini Teasers'; const cards = []; teaser(links, cards, document); @@ -80,7 +81,8 @@ const createMiniTeaser = (main, document) => { ]; if (cards.length > 0) { const block = WebImporter.DOMUtils.createTable(cells, document); - links.append(block); + if (labelText === 'section') links.append(block, document.createElement('hr')); + else links.append(block); } }); } diff --git a/tools/importer/transformers/product-not-found.js b/tools/importer/transformers/product-not-found.js new file mode 100644 index 00000000..bdd83833 --- /dev/null +++ b/tools/importer/transformers/product-not-found.js @@ -0,0 +1,10 @@ +/* global WebImporter */ +const productNotFound = (main, document) => { + const notFoundEl = main.querySelector('div#product-not-found'); + if (notFoundEl) { + const block = [['Product not found'], ['']]; + const table = WebImporter.DOMUtils.createTable(block, document); + notFoundEl.replaceWith(table); + } +}; +export default productNotFound; diff --git a/tools/importer/transformers/spline-viewer.js b/tools/importer/transformers/spline-viewer.js new file mode 100644 index 00000000..b879ea77 --- /dev/null +++ b/tools/importer/transformers/spline-viewer.js @@ -0,0 +1,10 @@ +/* global WebImporter */ +const splineViewer = (main, document) => { + const splineViewerEl = main.querySelector('div#spline-viewer'); + if (splineViewerEl) { + const block = [['Spline Viewer'], ['']]; + const table = WebImporter.DOMUtils.createTable(block, document); + splineViewerEl.replaceWith(table); + } +}; +export default splineViewer;