NAME
Mojolicious::Plugin::Notifications::HTML - Event Notifications using HTML
SYNOPSIS
# Register the engine
plugin Notifications => {
HTML => 1
};
# In the template
%= notifications 'html'
DESCRIPTION
This plugin is a simple notification engine for HTML.
If it does not suit your needs, you can easily write your own engine.
METHODS
Mojolicious::Plugin::Notifications::HTML inherits all methods from Mojolicious::Plugin and implements the following new one.
register
plugin Notifications => {
HTML => 1
};
Called when registering the main plugin. No parameters are necessary.
HELPERS
notify
See the base notify helper.
notifications
$c->notify(warn => 'wrong');
$c->notify(success => 'right');
%= notifications 'html';
# <div class="notify notify-warn">wrong</div>
# <div class="notify notify-success">right</div>
Will render each notification as text in a <div />
element with the class notify
and the class notify-$type
, where $type
is the notification type you passed.
AVAILABILITY
https://github.com/Akron/Mojolicious-Plugin-Notifications
COPYRIGHT AND LICENSE
Copyright (C) 2014, Nils Diewald.
This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.