Unverified Commit 30251a11 authored by Ken Hawkins's avatar Ken Hawkins Committed by GitHub
Browse files

enhancement: banner-black-bar (#1735)

Support inserting embl-notifications after EBI black bar.
parent a41f6b3e
Pipeline #221745 passed with stages
in 10 minutes and 20 seconds
### 1.2.0
* Support inserting after EBI black bar.
### 1.1.1
* Remove use of long deprecated `vf-banner--phase` variant and replace with `vf-banner--alert vf-banner--info`.
......
......@@ -66,13 +66,19 @@ function emblNotificationsInject(message) {
if (target.length > 0) {
target[0].parentNode.insertBefore(output, target[0].nextSibling);
} else {
// if no vf-header, show at vf-body
// @thought: we might instead make this show as "top"
let target = document.getElementsByClassName("vf-body");
// if no vf-header, perhaps there's a masthead-black-bar?
let target = document.getElementsByClassName("masthead-black-bar");
if (target.length > 0) {
// output.classList.add('vf-u-grid--reset');
target[0].prepend(output);
} // if still no success, we soft fail
target[0].parentNode.insertBefore(output, target[0].nextSibling);
} else {
// if no vf-header, show at vf-body
// @thought: we might instead make this show as "top"
let target = document.getElementsByClassName("vf-body");
if (target.length > 0) {
// output.classList.add('vf-u-grid--reset');
target[0].prepend(output);
} // if still no success, we soft fail
}
}
} else if (message.field_notification_position == "top") {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment