Skip to content

Commit

Permalink
Assets 32164 (#18)
Browse files Browse the repository at this point in the history
* refactor notification code

- new branch
- small change to immutable(?) head.html

* remove log statement
  • Loading branch information
mdickson-adbe authored Dec 4, 2023
1 parent d79685f commit c00e126
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions head.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<link rel="stylesheet" href="/scripts/libs/flatpickr/flatpickr.min.css">
<!-- End of Generated code -->
<script src="/scripts/scripts.js" type="module"></script>
<script src="/scripts/custom-scripts.js" type="module"></script>
<link rel="stylesheet" href="/styles/styles.css"/>
<link rel="stylesheet" href="/styles/gmo-styles.css"/>
<link rel="icon" href="data:,">
21 changes: 21 additions & 0 deletions scripts/custom-scripts.js
Original file line number Diff line number Diff line change
@@ -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);
}
4 changes: 4 additions & 0 deletions styles/gmo-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@ header:empty {

header nav .nav-brand .adp-logo img {
min-height: 42px;
}

.adp-toast {
text-transform: none;
}

0 comments on commit c00e126

Please sign in to comment.