diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-05-27 10:07:59 -0400 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-05-27 10:07:59 -0400 |
commit | 73944ae3687525eb7fafa0a0de2b919b51974542 (patch) | |
tree | 40f4fad495cd5ca4e10810686090b5ccc87f999c /app/helpers.php | |
parent | 93783274a438204a31865c848913088af96f0377 (diff) |
Improve assets loading (add helpers)
Diffstat (limited to 'app/helpers.php')
-rw-r--r-- | app/helpers.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/helpers.php b/app/helpers.php index 2dcb38e8..d22a4869 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -2,6 +2,16 @@ namespace Helper; +function js($filename) +{ + return '<script type="text/javascript" src="'.$filename.'?'.filemtime($filename).'"></script>'; +} + +function css($filename) +{ + return '<link rel="stylesheet" href="'.$filename.'?'.filemtime($filename).'" media="screen">'; +} + function template($name, array $args = array()) { $tpl = new \Core\Template; |