Mojolicious::Plugin::FontAwesome4 - Mojolicious + http://fortawesome.github.io/Font-Awesome/
4.2004
Mojolicious::Plugin::FontAwesome4 is used a Mojolicious plugin to simpler include http://fortawesome.github.io/Font-Awesome/ CSS and font files into your project.
This is done with the help of Mojolicious::Plugin::AssetPack.
use Mojolicious::Lite; plugin 'FontAwesome4'; get '/' => 'index'; app->start;
<!DOCTYPE html> <html lang="en"> <head> %= asset "font-awesome4.css" </head> <body> %= fa "user", "class" => "fa-4x" </body> </html>
Insert a FontAwesome icons. Example:
# this... <%= fa "bars", class => "fa-4x", id => "abc" %> # turns into... <i class="fa fa-bars fa-4x" id="abc"></i>
$path = Mojolicious::Plugin::FontAwesome4->asset_path($type); $path = $self->asset_path($type);
Returns the base path to the assets bundled with this module.
Set $type to "sass" if you want a return value that is suitable for the SASS_PATH environment variable.
$type
SASS_PATH
$app->plugin("FontAwesome4");
See "SYNOPSIS".
FontAwesome is created by Dave Gandy.
FontAwesome is licensed under SIL OFL 1.1.
Mojolicious::Plugin::FontAwesome4 is licensed under Artistic License version 2.0 and so is this code.
Jan Henning Thorsen - jhthorsen@cpan.org
jhthorsen@cpan.org
To install Mojolicious::Plugin::FontAwesome4, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::FontAwesome4
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::FontAwesome4
For more information on module installation, please visit the detailed CPAN module installation guide.