diff --git a/assets/.gitkeep b/assets/.gitkeep deleted file mode 100644 index 72e8ffc..0000000 --- a/assets/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -* diff --git a/config/AppAsset.php b/config/AppAsset.php new file mode 100644 index 0000000..2546969 --- /dev/null +++ b/config/AppAsset.php @@ -0,0 +1,29 @@ + + * @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', + ); +} diff --git a/config/assets.php b/config/assets.php deleted file mode 100644 index ee0d610..0000000 --- a/config/assets.php +++ /dev/null @@ -1,18 +0,0 @@ - array( - 'basePath' => '@wwwroot', - 'baseUrl' => '@www', - 'css' => array( - 'css/site.css', - ), - 'js' => array( - - ), - 'depends' => array( - 'yii', - 'yii/bootstrap/responsive', - ), - ), -); diff --git a/config/web.php b/config/web.php index 10e8856..d576599 100644 --- a/config/web.php +++ b/config/web.php @@ -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( diff --git a/views/layouts/main.php b/views/layouts/main.php index 77f7b8d..726ad41 100644 --- a/views/layouts/main.php +++ b/views/layouts/main.php @@ -7,7 +7,7 @@ use yii\widgets\Breadcrumbs; * @var $this \yii\base\View * @var $content string */ -$this->registerAssetBundle('app'); +app\config\AppAsset::register($this); ?> beginPage(); ?>