MCPcopy Index your code
hub / github.com/audreyfeldroy/messagebar

github.com/audreyfeldroy/messagebar @0.2.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.2.1 ↗ · + Follow
1 symbols 1 edges 2 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

jQuery MessageBar Build Status devDependencies

A top bar for notification messages. Dismiss it by clicking the x. Works with Django, but that's optional.

  • Free software: MIT License (http://audreyr.mit-license.org/)

Screenshot and Demo

Here is a screenshot of MessageBar being used on https://www.djangopackages.com:

Screenshot of MessageBar

To see a live demo of several MessageBars in action, see http://audreyr.github.io/messagebar/demo/.

  • They correspond to Bootstrap's default, primary, success, info, warning, and danger styles.
  • The default MessageBars are purposely plain. It's your job to change the CSS colors and font to match your site, of course.

To run the demo locally:

bash npm install grunt

Usage

  1. Include jQuery:

```html

```

  1. Include plugin's code:

```html

```

  1. Put your plugin HTML on your web page:

```html

    This is a notification. You can click it away if you want.
    <button type="button" class="close" data-dismiss="message">&times;</button>

```

  1. Call the plugin:

javascript $(".messagebar").messageBar({ slide: false });

(Note: slide: true hasn't been implemented yet. See https://github.com/audreyr/messagebar/issues/1 for more info. If you feel like implementing that feature, go for it and send a pull request!)

Setting Up jQuery MessageBar with Django Messages

jQuery MessageBar can easily be connected to Django's messages framework, allowing your web application to display notifications as top bars that can be clicked away.

This is similar to the notification bars used in many popular web applications, such as StackOverflow.

  1. Add this to your base template:

```html {% for message in messages %}

    {{ message }}
    <button type="button" class="close" data-dismiss="message">&times;</button>

{% endfor %} ```

  1. Change the names of the classes in messagebar.css to match Django's built-in message levels of:

  2. debug

  3. info
  4. success
  5. warning
  6. error

See https://docs.djangoproject.com/en/dev/ref/contrib/messages/#message-tags for more info.

Core symbols most depended-on inside this repo

MessageBar
called by 0
src/jquery.messagebar.js

Shape

Function 1

Languages

TypeScript100%

Modules by API surface

src/jquery.messagebar.js1 symbols

For agents

$ claude mcp add messagebar \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact