Remark Asset Bundle
Backend UI for Yii2 Framework, based on Remark
This package contains an Asset Bundle for Yii 2.0 Framework which registers the required JS and CSS files for the Remark theme.
I've taken inspiration from AdminLTE Yii2 Extension
This extension is still work in progress
The preferred way to install this extension is through composer.
To install Remark Asset run:
php composer.phar require d4rkstar/yii2-remark-asset "2.0.x-dev"
You've to unzip the contents of your remark theme inside the @webroot/remark folder. Check Aliases.
You should have a folder structure like this:
Once the extension is installed, you can have a preview by reconfiguring the path mappings of the view component:
Edit your config/web.php and add:
'components' => [ 'view' => [ 'theme' => [ 'pathMap' => [ '@app/views' => '@vendor/d4rkstar/yii2-remark-asset/views' ], ], ], ],
Then change these in your configuration:
'components' => [ 'assetManager' => [ 'bundles' => [ 'd4rkstar\web\RemarkAsset' => [ 'skin' => 'orange', ], 'yii\web\JqueryAsset' => [ 'sourcePath' => null, 'js' => [ '//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', ] ], ], ], ],
To speedup asset creation you may eventually you may use symlinking:
'components' => [ 'assetManager' => [ 'linkAssets' => true, // create symlinks 'bundles' => [ ... ], ], ],
You may add custom css / js for specific controller/action using the "addons" attribute.
'components' => [ 'assetManager' => [ 'linkAssets' => true, // create symlinks 'bundles' => [ 'd4rkstar\web\RemarkAsset' => [ // 'skin' => 'orange', 'addons'=>[ // SiteController, actionLogin 'site/login'=>[ 'css'=>[ 'base/assets/examples/css/pages/login-v3.css' ], 'js'=>[ 'global/js/components/material.js' ] ] ] ], ], ], ],
This asset bundle provides sample files for layout and view (see folder
examples/), they are not meant to be customized directly in the
Therefore it is recommended to copy the views into your application and adjust them to your needs.