Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

china ICP changes #1371

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion blocks/footer/footer.css
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,11 @@
margin: 0;
}

.footer-bottom .row-6 p:last-of-type {
.footer-bottom .row-6 .footer-copyright-text {
margin-top: 40px;
position: absolute;
max-width: 400px;
top: 10px;
left: 15px;
}
}
Expand All @@ -338,6 +340,11 @@
.footer.block {
width: 1170px;
}

.footer-bottom .row-6 .footer-copyright-text {
max-width: 100%;
top: auto;
}
}

@media (max-width: 992px) {
Expand Down
18 changes: 12 additions & 6 deletions blocks/footer/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,11 @@ export default async function decorate(block) {

const resp = await fetch(`${footerPath}.plain.html`, window.location.pathname.endsWith('/footer') ? { cache: 'reload' } : {});
const html = await resp.text();
const footer = document.createElement('div');
const footer = div();
footer.innerHTML = html;

const footerWrap = document.createElement('div');
const footerBottom = document.createElement('div');
footerWrap.classList.add('footer-wrap');
footerBottom.classList.add('footer-bottom');
const footerWrap = div({ class: 'footer-wrap' });
const footerBottom = div({ class: 'footer-bottom' });
block.appendChild(footerWrap);
block.appendChild(footerBottom);

Expand All @@ -226,9 +224,17 @@ export default async function decorate(block) {
}

if (idx === 5) {
const copyrightTextEn = p({ class: 'en OneLinkHide footer-copyright-text' }, `©${new Date().getFullYear()} Molecular Devices, LLC. All rights reserved.`);
const copyrightTextZh = p({ class: 'zh OneLinkShow_zh1 footer-copyright-text' },
`©${new Date().getFullYear()} Molecular Devices, LLC. 保留所有权利`,
a({ href: 'https://beian.miit.gov.cn/', style: 'margin-left: 4px;' }, ' 沪ICP备05056171号-2'),
a({ href: 'http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=%E6%B2%AA%E5%85%AC%E7%BD%91%E5%AE%89%E5%A4%87%2031010502001469%E5%8F%B7', style: 'margin-left: 4px;' }, ' 沪公网安备 31010502001469号'),
);
const imgWrapper = row.getElementsByTagName('p')[0];
const danaherUrl = 'https://www.danaher.com/?utm_source=MLD_web&utm_medium=referral&utm_content=trustmarkfooter';
decorateImageWithLink(imgWrapper, danaherUrl, 'Danaher');
row.appendChild(copyrightTextEn);
row.appendChild(copyrightTextZh);
}
});

Expand All @@ -237,7 +243,7 @@ export default async function decorate(block) {

block.append(footer);
block.querySelectorAll('a').forEach(decorateExternalLink);
await decorateIcons(block);
decorateIcons(block);

/*
Creating the Newsletter has high TBT due to a high number of external scripts it brings.
Expand Down
Loading