1.2.4 • Published 8 days ago

@visual-framework/embl-notifications v1.2.4

Weekly downloads
173
License
Apache 2.0
Repository
-
Last release
8 days ago

EMBL Notifications component

npm version

Fetches notifications from the EMBL contentHub URL of https://www.embl.org/api/v1/notifications?_format=json&source=contenthub and will display them, if a matching URL is found.

About

Utility component for the EMBL site to serve as a backup for cases of major outages. Use vf-banner instead of this component for normal notifications.

Usage

This will also check a backup URL for cases of major outages.

Possible features not currently planned:

  • Only show if a wrapping element has data-vf-js-embl-notifications
  • Also load messages from EBI's existing announcement JS at https://ebi.emblstatic.net/announcements.js
  • Use the vf-banner precompiled njk template to render output
  • Test for better support on non-VF 2.0 sites

Install

This repository is distributed with npm. After installing npm, you can install embl-notifications with this command.

$ yarn add --dev @visual-framework/embl-notifications

Sass/CSS

Add this to your ./components/vf-component-rollup/scripts.js:

import { emblNotifications } from 'embl-notifications/embl-notifications';
// if you use embl-content-hub-loader, it will automatically invoke emblNotifications
// emblNotifications(); // invoke embl notifications

You can masquerade as another page or URL for adhoc use cases or testing:

// emblNotifications(currentHost = 'www.embl.org', currentPath = 'my/test/path`);
emblNotifications('www.embl.org','/')

Help

1.2.4

8 days ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.3

2 years ago

1.2.0

2 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

4 years ago

1.0.0-beta.0

4 years ago

1.0.0-alpha.2

4 years ago

1.0.0-alpha.1

4 years ago

1.0.0-alpha.0

4 years ago