diff --git a/content/websites/patterns/banner-data-protection/banner-data-protection.html b/content/websites/patterns/banner-data-protection/banner-data-protection.html index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..7365872a01e3971fad1d094fc5f2944239e6a9d3 100644 --- a/content/websites/patterns/banner-data-protection/banner-data-protection.html +++ b/content/websites/patterns/banner-data-protection/banner-data-protection.html @@ -0,0 +1,3 @@ +<div id="data-protection-message-configuration" +data-message="Your message and links here." +data-service-id="myService" data-data-protection-version="0.1"></div> diff --git a/content/websites/patterns/banner-data-protection/banner-data-protection.js b/content/websites/patterns/banner-data-protection/banner-data-protection.js deleted file mode 100644 index 0608be997a47206bbbdc6e317c727f7104991300..0000000000000000000000000000000000000000 --- a/content/websites/patterns/banner-data-protection/banner-data-protection.js +++ /dev/null @@ -1 +0,0 @@ -// Comning soon diff --git a/content/websites/patterns/banner-data-protection/layout.html b/content/websites/patterns/banner-data-protection/layout.html index 1ee8cf1fb7bcdc1388f1acc222b69e3155910922..b9425c1458bb9394ac2691a45c3636857f1d7f00 100644 --- a/content/websites/patterns/banner-data-protection/layout.html +++ b/content/websites/patterns/banner-data-protection/layout.html @@ -28,9 +28,7 @@ You’ll just need to add a div#data-protection-message-configuration with your parameters and the banner will be built accordingly: ``` - <div id="data-protection-message-configuration" - data-message="Your message and links here." - data-service-id="myService" data-data-protection-version="0.1"></div> + {{> banner-data-protection}} ``` See further guidance at <a href="https://www.ebi.ac.uk/style-lab/websites/patterns/banner-data-protection.html">https://www.ebi.ac.uk/style-lab/websites/patterns/banner-data-protection.html</a> @@ -41,14 +39,18 @@ #### If you're not using the EBI Visual Framework: - This banner code will be automatically invoked for users of the EBI Visual Framework, sites still using compliance can add this JS code (still in development): + This banner code will be automatically invoked for users of the EBI Visual Framework, sites still using Compliance theme (or other frameworks) can add this JS code: ``` - console.warn('âš ï¸ This code is still under development, do not use in production. e-mail khawkins@ebi.ac.uk for guidance.'); + var localFrameworkVersion = '1.1'; // 1.1 or 1.2 or compliance or other + // if you select compliance or other we will add some helpful + // CSS styling, but you may need to add some CSS yourself var newDataProtectionNotificationBanner = document.createElement('script'); - newDataProtectionNotificationBanner.src = 'https://dev.ebi.emblstatic.net/web_guidelines/EBI-Framework/v1.3/js/ebi-global-includes/script/5_ebiFrameworkNotificationBanner.js'; + newDataProtectionNotificationBanner.src = 'https://dev.ebi.emblstatic.net/web_guidelines/EBI-Framework/v1.3/js/ebi-global-includes/script/5_ebiFrameworkNotificationBanner.js?legacyRequest='+localFrameworkVersion; document.head.appendChild(newDataProtectionNotificationBanner); - setTimeout(ebiFrameworkRunDataProtectionBanner, 1200); + newDataProtectionNotificationBanner.onload = function() { + ebiFrameworkRunDataProtectionBanner(); // invoke the banner + }; ``` ### How it works @@ -64,7 +66,6 @@ Let us know! <a href="mailto:khawkins@ebi.ac.uk">khawkins@ebi.ac.uk</a> or [post to the GitHub issue](https://github.com/ebiwd/EBI-Framework/issues/137). - {{> banner-data-protection}} {{/markdown}} </div>