message_banner
Displays a very simple message banner to website visitors. It can be shown at the top of all pages, or only at the top of non-admin pages.
When a visitor accesses your site, a simple JavaScript file checks their local storage to see when they last closed the banner against the time the Message Banner config form was last saved. If the config was saved more recently than the visitor closed the message last, then the banner shows to them.
A visitor can dismiss the banner by using the "Dismiss message" button. It's all semantic HTML so should be fully-accessible, and appears after the skip link on your website.
The banner can be customised by changing the background colour, and it offers an API to add your own colours without hacking it, so you can change per your brand. It's easily templated, too.
Which branch should I use?
- 8.x-1.4 is suited to Drupal 8/9 but will receive no further updates.
- 2.0.0 has the same features as 8.x-1.4, plus Drupal 10 support. It will receive no further updates.
- 3.0.0+ introduces Drupal 11 compatibility, plus several new features that have been in the issue queue for far too long!