OPTIMIZATION

This commit is contained in:
Krivchikov Dmitry 2015-07-06 21:04:17 +03:00
parent 85386ce4b8
commit 5099494ba3
2 changed files with 16 additions and 13 deletions

View File

@ -8,7 +8,7 @@ class IndexController extends Controller
*/ */
static function actionIndex() static function actionIndex()
{ {
self::addScript('/js/jquery-2.1.0.min.js'); // self::addScript('/js/jquery-2.1.0.min.js');
self::addScript('/js/jquery-ui-1.10.4.custom.min.js'); self::addScript('/js/jquery-ui-1.10.4.custom.min.js');
self::addScript('/js/bootstrap.min.js'); self::addScript('/js/bootstrap.min.js');
self::addScript('/js/leaflet-0.7.3.js'); self::addScript('/js/leaflet-0.7.3.js');
@ -29,7 +29,7 @@ class IndexController extends Controller
self::addScript('/js/suggest.js?ver=' . App::getConfig('version')); self::addScript('/js/suggest.js?ver=' . App::getConfig('version'));
self::addScript('/js/navigation.js?ver=' . App::getConfig('version')); self::addScript('/js/navigation.js?ver=' . App::getConfig('version'));
self::addStyle('/css/style.css?ver=' . App::getConfig('version')); // self::addStyle('/css/style.css?ver=' . App::getConfig('version'));
self::addStyle('/css/leaflet-0.7.3.css'); self::addStyle('/css/leaflet-0.7.3.css');
self::addStyle('/css/bootstrap.min.css'); self::addStyle('/css/bootstrap.min.css');
self::addStyle('/css/bootstrap-theme.min.css'); self::addStyle('/css/bootstrap-theme.min.css');

View File

@ -7,17 +7,8 @@
<head> <head>
<title><?= App::getConfig('title') ?></title> <title><?= App::getConfig('title') ?></title>
<?php if ($styles): ?> <script src="/js/jquery-2.1.0.min.js" type="text/javascript"></script>
<?php foreach ($styles as $style): ?> <link href="/css/style.css?ver=<?=App::getConfig('version')?>" media="all" rel="stylesheet" type="text/css" />
<link href="<?= $style ?>" media="all" rel="stylesheet" type="text/css" />
<?php endforeach; ?>
<?php endif; ?>
<?php if ($scripts): ?>
<?php foreach ($scripts as $script): ?>
<script src="<?= $script ?>" type="text/javascript"></script>
<?php endforeach; ?>
<?php endif; ?>
<?php if (isset($data['og']) && $data['og']): ?> <?php if (isset($data['og']) && $data['og']): ?>
<meta property="og:title" content="<?= $data['og']['title'] ?>" /> <meta property="og:title" content="<?= $data['og']['title'] ?>" />
@ -52,4 +43,16 @@
<?= self::renderPartial('metrika.php', array(), true) ?> <?= self::renderPartial('metrika.php', array(), true) ?>
<?= self::renderPartial('ganalytics.php', array(), true) ?> <?= self::renderPartial('ganalytics.php', array(), true) ?>
</body> </body>
<?php if ($scripts): ?>
<?php foreach ($scripts as $script): ?>
<script src="<?= $script ?>" type="text/javascript"></script>
<?php endforeach; ?>
<?php endif; ?>
<?php if ($styles): ?>
<?php foreach ($styles as $style): ?>
<link href="<?= $style ?>" media="all" rel="stylesheet" type="text/css" />
<?php endforeach; ?>
<?php endif; ?>
</html> </html>