Improve assets loading (add helpers)
This commit is contained in:
@@ -39,4 +39,4 @@
|
|||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<script type="text/javascript" src="assets/js/board.js"></script>
|
<?= Helper\js('assets/js/board.js') ?>
|
||||||
|
|||||||
@@ -6,12 +6,12 @@
|
|||||||
<meta name="viewport" content="width=device-width">
|
<meta name="viewport" content="width=device-width">
|
||||||
<meta name="mobile-web-app-capable" content="yes">
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
|
|
||||||
<script src="assets/js/jquery-1.11.1.min.js"></script>
|
<?= Helper\js('assets/js/jquery-1.11.1.min.js') ?>
|
||||||
<script src="assets/js/jquery-ui-1.10.4.custom.min.js"></script>
|
<?= Helper\js('assets/js/jquery-ui-1.10.4.custom.min.js') ?>
|
||||||
<script src="assets/js/jquery.ui.touch-punch.min.js"></script>
|
<?= Helper\js('assets/js/jquery.ui.touch-punch.min.js') ?>
|
||||||
|
|
||||||
<link rel="stylesheet" href="assets/css/app.css" media="screen">
|
<?= Helper\css('assets/css/app.css') ?>
|
||||||
<link rel="stylesheet" href="assets/css/font-awesome.min.css" media="screen">
|
<?= Helper\css('assets/css/font-awesome.min.css') ?>
|
||||||
|
|
||||||
<link rel="icon" type="image/png" href="assets/img/favicon.png">
|
<link rel="icon" type="image/png" href="assets/img/favicon.png">
|
||||||
<link rel="apple-touch-icon" href="assets/img/touch-icon-iphone.png">
|
<link rel="apple-touch-icon" href="assets/img/touch-icon-iphone.png">
|
||||||
|
|||||||
@@ -14,4 +14,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<script type="text/javascript" src="assets/js/task.js"></script>
|
|
||||||
|
<?= Helper\js('assets/js/task.js') ?>
|
||||||
|
|||||||
@@ -2,6 +2,16 @@
|
|||||||
|
|
||||||
namespace Helper;
|
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())
|
function template($name, array $args = array())
|
||||||
{
|
{
|
||||||
$tpl = new \Core\Template;
|
$tpl = new \Core\Template;
|
||||||
|
|||||||
Reference in New Issue
Block a user