NAME
Mojolicious::Plugin::Iconify - Iconify helpers.
SYNOPSIS
# Mojolicious
$self->plugin('Iconify');
# Mojolicious::Lite
plugin 'Iconify';
DESCRIPTION
Mojolicious::Plugin::Iconify is a Mojolicious plugin to add Iconify support in your Mojolicious application.
HELPERS
Mojolicious::Plugin::Iconify implements the following helpers.
iconify_js
%= iconify_js
%= iconify_js 'https://example.org/assets/js/iconify.min.js'
%= iconify_js '/assets/js/iconify.min.js'
Generate script
tag for include Iconify script file in your template.
icon
%= icon 'logos:perl'
%= icon 'logos:perl', size => 32
%= icon 'logos:perl', width => 32, height => 32
%= icon 'logos:perl', rotate => 90
%= icon 'logos:perl', flip_horizontal => 1
%= icon 'logos:perl', flip => 'vertical'
Generate span
tag with Iconify atributes.
size
: the icon size (eg.16
,32px
or1em
)-
This is an alias for
width
andheight
attributes. width
,height
: the icon width and height (eg.16
,32px
or1em
)rotate
: rotate the icon (supported values are:90
,180
270
degrees)flip
: flip the icon inhorizontal
and/orvertical
positionflip_horizontal
: flip the icon in horizontal position-
This is an alias for
flip => "horizontal"
. flip_vertical
: flip the icon in vertical position-
This is an alias for
flip => "vertical"
. inline
: set the layout to inline (below baseline alignment)block
: set the layout to block (no vertical alignment)
METHODS
Mojolicious::Plugin::TagHelpers inherits all methods from Mojolicious::Plugin and implements the following new ones.
register
$plugin->register(Mojolicious->new);
Register helpers in Mojolicious application.