NAME
Mojolicious::Plugin::MoreHTMLHelpers - Some general helpers
VERSION
version 0.01
SYNOPSIS
In your startup
:
sub startup {
my $self = shift;
# do some Mojolicious stuff
$self->plugin( 'MoreHTMLHelpers' );
# more Mojolicious stuff
}
In your template:
<span style="color: <% textcolor('#135713') %>">Any text</span>
HELPERS
This plugin adds a helper method to your web application:
textcolor
This method requires at least one parameter: The color the text color is based on. The text color should have a contrast to the background color. In web apps where the user can define its own color set, it's necessary to calculate the textcolor on the fly. This is what this helper is for.
<span style="background-color: #135713; color: <% textcolor('#135713') %>">Any text</span>
METHODS
register
Called when registering the plugin. On creation, the plugin accepts a hashref to configure the plugin.
# load plugin, alerts are dismissable by default
$self->plugin( 'MoreHTMLHelpers' );
AUTHOR
Renee Baecker <reneeb@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2015 by Renee Baecker.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 100:
=back without =over