Subversion Repositories Integrator Subversion

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 espaco 1
# jquery-notific8
2
 
3
Notific8 is a notification plug-in inspired by the notifications introduced in Windows 8 with some web ready restyling and customizations. Notific8 has built in themes and is easy to create new themes for. The plug-in was born from a want for a simply designed yet modern and stylish notification system. The plug-in is also designed to scale based on the page's font-size setting (it was designed for the default of 100%/16px as the default).
4
 
5
## Demo page
6
 
7
An interactive demo page can be found here http://willsteinmetz.net/jquery/notific8
8
 
9
## Features
10
 
11
* Notifications slide in and out from the upper right corner of the page
12
* Configurable life span of the notification
13
* Option to display a heading
14
* Theme options (see CSS for built in themes)
15
* Ability to make the notification sticky
16
* Ability to set up custom settings for reuse without having to type them over and over
17
* Ability to set which corner the notifications are shown in
18
* Ability to set the z-index
19
    * Can be set via config/configure or the zindex function
20
 
21
## Usage
22
 
23
    // basic
24
    $.notific8('My notification message goes here.');
25
    // with a life set
26
    $.notific8('My notification message has a life span.', {life: 5000});
27
    // with a heading
28
    $.notific8('My notification has a heading line.', {heading: 'Notification Heading'});
29
    // with a theme
30
    $.notific8('My notification has a theme.', {theme: 'amethyst'});
31
    // make the notification sticky
32
    $.notific8('My notification is sticky.', {sticky: true});
33
    // change whether to notification is at the top or bottom
34
    $.notific8('My notification is at the bottom.', {horizontalEdge: 'bottom'});
35
    // change whether to notification is on the left or right
36
    $.notific8('My notification is on the left.', {verticalEdge: 'left'});
37
    // set the z-index
38
    $.notific8('My notification has a z-index of 1500.', {zindex: 1500});
39
    // all options set
40
    $.notific8('My notification with all options.', {
41
      life: 5000,
42
      heading: 'Notification Heading',
43
      theme: 'amethyst',
44
      sticky: true,
45
      horizontalEdge: 'bottom',
46
      verticalEdge: 'left',
47
      zindex: 1500
48
    });
49
 
50
    // set up your own default settings to save time and typing later
51
    // NOTE this is not required
52
    $.notific8('configure', {
53
      life: 5000,
54
      theme: 'ruby',
55
      sticky: true,
56
      horizontalEdge: 'bottom',
57
      verticalEdge: 'left',
58
      zindex: 1500
59
    });
60
 
61
    // set the zindex
62
    $.notific8('zindex', 1500);
63
 
64
 
65
## Options
66
 
67
* life: number of milliseconds that the notification will be visible (default: 10000)
68
* heading: short heading for the notification
69
* theme: string for the theme (default: 'teal')
70
    * Custom themes should be named .jquery-notific8-notification.[theme name] in your stylesheet - see note below about custom themes
71
* sticky: boolean for whether or not the notification should stick
72
    * If sticky is set to true, life will be ignored if it is also set
73
* horizontalEdge: string value for top or bottom of the page (default: 'top')
74
    * only accepts values 'top' and 'bottom'
75
* verticalEdge: string value for left or right of the page (default: 'right')
76
    * only accepts values 'left' and 'right'
77
* zindex: integer value for the z-index (default: 1100)
78
    * this must be set before calling notific8 to create a notification via either config/configure or zindex
79
 
80
All of these settings are available to be configured. The configure function is used if you have specific settings such as theme and life that you want every notification to share. By configuring these settings, they become the new defaults and you don't have to type them for every notification. The configure function can be called multiple times.
81
 
82
## Custom themes
83
As of notific8 version 0.9.0, the plug-in's CSS is coded in SASS (SCSS format) and Compass. To create a custom theme, open the jquery.notific8.scss file, copy and paste the template line, uncomment your pasted line, and replace the variables with your own values. Be sure to recompile your SASS file to CSS to use the new theme. The goal is to only make updates to the _notific8.scss file so that updates will not wipe out your custom themes.
84
 
85
If you are using SASS for the rest of your project, you can include the _notific8.scss file in your project's main SCSS file to create your custom themes in there.
86
 
87
## Browser support
88
 
89
Currently supported and testing:
90
* Chrome
91
* Firefox
92
* Safari (Mac only)
93
* IE 9+
94
 
95
Future support and testing
96
* Opera (will start after their transition to webkit)
97
 
98
### Browser version support
99
 
100
As a rule of thumb, only the most recent plus one version older of a browser is supported unless marked otherwise. While it may work in IE8, notific8 will not be tested or officially supported in legacy browsers such as versions of IE older than 9.
101
 
102
## Future plans
103
 
104
* Ability to set an icon for the notification