-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: storybook cookie cleanup & maintenance
* chore: remove google-analytics/-fonts * chore: get rid of broken circle-ci badge * feat: add Inter font family assets to storybook * feat: add cookie-banner
- Loading branch information
Showing
9 changed files
with
41 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,26 @@ | ||
<script>document.title = "UI Kit";</script>; | ||
<script> | ||
document.title = "UI Kit"; window.STORYBOOK_GA_ID = "UA-38285631-31"; | ||
function injectScript(url, attributes = {}, onLoad) { | ||
var tag = document.createElement('script'); | ||
tag.type = 'text/javascript'; | ||
tag.src = url; | ||
Object.keys(attributes).forEach((key) => { | ||
tag.setAttribute(key, attributes[key]); | ||
}); | ||
|
||
if (onLoad) tag.onload = onLoad; | ||
document.head.appendChild(tag); | ||
}; | ||
|
||
// Inject the cookie consent scripts only if the page is served on a `*.commercetools.com` domain. | ||
if (window && window.location.host.includes('.commercetools.com')) { | ||
injectScript( | ||
'https://cdn.cookielaw.org/consent/b104027d-4d10-4b75-9675-9ffef11562a8/OtAutoBlock.js' | ||
); | ||
injectScript( | ||
'https://cdn.cookielaw.org/scripttemplates/otSDKStub.js', | ||
{ 'data-domain-script': 'b104027d-4d10-4b75-9675-9ffef11562a8' }, | ||
'function OptanonWrapper() {};' | ||
); | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
@font-face { | ||
font-family: Inter; | ||
font-style: normal; | ||
font-weight: 100 900; | ||
font-display: swap; | ||
src: url("InterVariable.woff2") format("woff2"); | ||
} | ||
@font-face { | ||
font-family: Inter; | ||
font-style: italic; | ||
font-weight: 100 900; | ||
font-display: swap; | ||
src: url("InterVariable-Italic.woff2") format("woff2"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters