Asset feature refactoring (WIP)
This commit is contained in:
parent
45731b4eb8
commit
b6232130c1
@ -1 +0,0 @@
|
||||
*
|
29
config/AppAsset.php
Normal file
29
config/AppAsset.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* @link http://www.yiiframework.com/
|
||||
* @copyright Copyright (c) 2008 Yii Software LLC
|
||||
* @license http://www.yiiframework.com/license/
|
||||
*/
|
||||
|
||||
namespace app\config;
|
||||
|
||||
use yii\web\AssetBundle;
|
||||
|
||||
/**
|
||||
* @author Qiang Xue <qiang.xue@gmail.com>
|
||||
* @since 2.0
|
||||
*/
|
||||
class AppAsset extends AssetBundle
|
||||
{
|
||||
public $basePath = '@wwwroot';
|
||||
public $baseUrl = '@www';
|
||||
public $css = array(
|
||||
'css/site.css',
|
||||
);
|
||||
public $js = array(
|
||||
);
|
||||
public $depends = array(
|
||||
'yii\web\YiiAsset',
|
||||
'yii\bootstrap\ResponsiveAsset',
|
||||
);
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'app' => array(
|
||||
'basePath' => '@wwwroot',
|
||||
'baseUrl' => '@www',
|
||||
'css' => array(
|
||||
'css/site.css',
|
||||
),
|
||||
'js' => array(
|
||||
|
||||
),
|
||||
'depends' => array(
|
||||
'yii',
|
||||
'yii/bootstrap/responsive',
|
||||
),
|
||||
),
|
||||
);
|
@ -18,9 +18,6 @@ return array(
|
||||
'class' => 'yii\web\User',
|
||||
'identityClass' => 'app\models\User',
|
||||
),
|
||||
'assetManager' => array(
|
||||
'bundles' => require(__DIR__ . '/assets.php'),
|
||||
),
|
||||
'log' => array(
|
||||
'traceLevel' => YII_DEBUG ? 3 : 0,
|
||||
'targets' => array(
|
||||
|
@ -7,7 +7,7 @@ use yii\widgets\Breadcrumbs;
|
||||
* @var $this \yii\base\View
|
||||
* @var $content string
|
||||
*/
|
||||
$this->registerAssetBundle('app');
|
||||
app\config\AppAsset::register($this);
|
||||
?>
|
||||
<?php $this->beginPage(); ?>
|
||||
<!DOCTYPE html>
|
||||
|
Loading…
Reference in New Issue
Block a user