mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
Load scripts async
This commit is contained in:
parent
d9a8f0f043
commit
13c6631e80
1 changed files with 14 additions and 8 deletions
|
@ -11,7 +11,10 @@
|
||||||
|
|
||||||
if (["white", "g10", "g80", "g90", "g100"].includes(theme)) {
|
if (["white", "g10", "g80", "g90", "g100"].includes(theme)) {
|
||||||
document.documentElement.setAttribute("theme", theme);
|
document.documentElement.setAttribute("theme", theme);
|
||||||
document.documentElement.style.setProperty("color-scheme", ["white", "g10"].includes(theme) ? "light" : "dark");
|
document.documentElement.style.setProperty(
|
||||||
|
"color-scheme",
|
||||||
|
["white", "g10"].includes(theme) ? "light" : "dark"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
</script>
|
</script>
|
||||||
|
@ -20,32 +23,35 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
window._ibmAnalytics = {
|
window._ibmAnalytics = {
|
||||||
settings: {
|
settings: {
|
||||||
name: 'CarbonSvelte',
|
name: "CarbonSvelte",
|
||||||
isSpa: true,
|
isSpa: true,
|
||||||
tealiumProfileName: 'ibm-web-app',
|
tealiumProfileName: "ibm-web-app",
|
||||||
},
|
},
|
||||||
onLoad: [['ibmStats.pageview', []]],
|
onLoad: [["ibmStats.pageview", []]],
|
||||||
};
|
};
|
||||||
digitalData = {
|
digitalData = {
|
||||||
page: {
|
page: {
|
||||||
pageInfo: {
|
pageInfo: {
|
||||||
ibm: {
|
ibm: {
|
||||||
siteId: 'IBM_' + _ibmAnalytics.settings.name,
|
siteId: "IBM_" + _ibmAnalytics.settings.name,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
category: {
|
category: {
|
||||||
primaryCategory: 'PC100',
|
primaryCategory: "PC100",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script
|
||||||
type="module"
|
type="module"
|
||||||
src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/footer.min.js"></script>
|
async
|
||||||
|
src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/footer.min.js"
|
||||||
|
></script>
|
||||||
<script
|
<script
|
||||||
src="//1.www.s81c.com/common/stats/ibm-common.js"
|
src="//1.www.s81c.com/common/stats/ibm-common.js"
|
||||||
type="text/javascript"
|
type="text/javascript"
|
||||||
async="async"></script>
|
async
|
||||||
|
></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script type="module" src="/src/index.js"></script>
|
<script type="module" src="/src/index.js"></script>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue