NAME
Mojolicious::Plugin::FontAwesome4 - Mojolicious + http://fortawesome.github.io/Font-Awesome/
VERSION
4.5000
DESCRIPTION
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.
SYNOPSIS
Mojolicious::Lite
use Mojolicious::Lite;
plugin 'FontAwesome4';
get '/' => 'index';
app->start;
Template
<!DOCTYPE html>
<html lang="en">
<head>
%= asset "font-awesome4.css"
</head>
<body>
%= fa "user", "class" => "fa-4x"
</body>
</html>
HELPERS
fa
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>
METHODS
asset_path
$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.
register
$app->plugin("FontAwesome4");
See "SYNOPSIS".
CREDITS
FontAwesome is created by Dave Gandy.
LICENSE
FontAwesome is licensed under SIL OFL 1.1.
Mojolicious::Plugin::FontAwesome4 is licensed under Artistic License version 2.0 and so is this code.
AUTHOR
Jan Henning Thorsen - jhthorsen@cpan.org