2017 © Pedro Peláez
 

yii2-extension yii2-remark-asset

Backend theme for Yii2 Framework

image

d4rkstar/yii2-remark-asset

Backend theme for Yii2 Framework

  • Tuesday, November 17, 2015
  • by d4rkstar
  • Repository
  • 1 Watchers
  • 0 Stars
  • 69 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 8 % Grown

The README.md

Remark Asset Bundle

Backend UI for Yii2 Framework, based on Remark, (*1)

This package contains an Asset Bundle for Yii 2.0 Framework which registers the required JS and CSS files for the Remark theme., (*2)

I've taken inspiration from AdminLTE Yii2 Extension, (*3)

This extension is still work in progress, (*4)

Installation

The preferred way to install this extension is through composer., (*5)

To install Remark Asset run:, (*6)

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., (*7)

You should have a folder structure like this:, (*8)

  • app/
    • web/
    • remark/
      • base/
      • global/
      • iconbar/
      • mmenu/
      • topbar/

Quick Start

Once the extension is installed, you can have a preview by reconfiguring the path mappings of the view component:, (*9)

For Yii 2 Application Template or Basic Application Template, (*10)

Edit your config/web.php and add:, (*11)

'components' => [
    'view' => [
         'theme' => [
             'pathMap' => [
                '@app/views' => '@vendor/d4rkstar/yii2-remark-asset/views'
             ],
         ],
    ],
],

Then change these in your configuration:, (*12)

'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:, (*13)

'components' => [
    'assetManager' => [
        'linkAssets' => true, // create symlinks
        'bundles' => [
            ...
         ],
    ],
],

You may add custom css / js for specific controller/action using the "addons" attribute., (*14)

'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 vendor/ folder., (*15)

Therefore it is recommended to copy the views into your application and adjust them to your needs., (*16)

The Versions

17/11 2015

dev-master

9999999-dev

Backend theme for Yii2 Framework

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 remark