NAME
Mojolicious::Plugin::LinkedContent - manage linked css and js
SYNOPSIS
Somewhere in template:
% require_js
'myscript.js'
;
And in <HEAD> of your layout:
% include_js;
DESCRIPTION
Helps to manage scripts and styles included in document.
INTERFACE
HELPERS
- require_js
-
Add one or more js files to load queue.
- require_css
-
Add one or more css files to load queue.
- register
-
Render the plugin. Internal
- include_js =item include_css
-
Render queue to template
ITEMS
CONFIGURATION AND ENVIRONMENT
Mojolicious::Plugin::LinkedContent can recieve parameters when loaded from Mojolicious like this:
$self
->plugin(
'linked_content'
,
'js_base'
=>
'/jsdir'
,
'css_base'
=>
'/cssdir'
);
If no basedirs provided, '/js' and '/css' used by default
AUTHOR
Yaroslav Korshak <ykorshak@gmail.com>
CREDITS
Oliver Günther
LICENCE AND COPYRIGHT
Copyright (C) 2010 - 2013, Yaroslav Korshak
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.