diff --git a/head.html b/head.html index cd02fd34..0e998767 100644 --- a/head.html +++ b/head.html @@ -13,6 +13,7 @@ + diff --git a/scripts/custom-scripts.js b/scripts/custom-scripts.js new file mode 100644 index 00000000..656b9009 --- /dev/null +++ b/scripts/custom-scripts.js @@ -0,0 +1,21 @@ +import { getBrandingConfig } from "./site-config.js"; +import { EventNames } from "./events.js"; +import showToast from "./toast-message.js"; + +initLegalNotice(); + +async function initLegalNotice() { + const config = await getBrandingConfig(); + document.addEventListener(EventNames.SESSION_STARTED, function() { + showLegalNotice(config); + }); +} + +function showLegalNotice(config) { + const legalDefault = `NOTICE: Adobe records and uses your e-mail address for tracking purposes.`; + const legalToast = config?.legalMessage || legalDefault; + const legalDuration = 10000; + const toastType = "info"; + + showToast(legalToast, legalDuration, toastType, false); +} \ No newline at end of file diff --git a/styles/gmo-styles.css b/styles/gmo-styles.css index 2ba5ce00..44fe5826 100644 --- a/styles/gmo-styles.css +++ b/styles/gmo-styles.css @@ -22,5 +22,11 @@ header:empty { } header nav .nav-brand .adp-logo img { - min-height: 42px; - } \ No newline at end of file + + min-height: 42px; +} + +.adp-toast { + text-transform: none; +} +