Giter VIP home page Giter VIP logo

yii2-adminlte's Introduction

AdminLTE Extension for Yii 2


AdminLTE Asset Bundle for Yii2 Framework

Latest Stable Version License Total Downloads Monthly Downloads

This is the AdminLTE extension for Yii framework 2.0. It encapsulates AdminLTE distribution assets and thus makes using AdminLTE in Yii applications extremely easy.


DEMONSTRATION


INSTALLATION

The preferred install way is through Composer:

composer require yidas/yii2-adminlte

Or you could also edit composer.json with adding package in require section then run composer update.

"yidas/yii2-adminlte": "~2.1.0"

CONFIGURATION

Register or depend Asset into your application:

yidas\adminlte\AdminlteAsset

For eaxmple, to register AdminLTE assets in view :

\yidas\adminlte\AdminlteAsset::register($this);

Or as dependency in your app asset bundle :

namespace app\assets;
use yii\web\AssetBundle;
class AppAsset extends AssetBundle
{
    public $basePath = '@webroot';
    public $baseUrl = '@web';
    public $css = [
        'css/site.css',
    ];
    public $js = [
    ];
    public $depends = [
        'yidas\adminlte\AdminlteAsset'
    ];
}

CUSTOMIZATION

Skin

Configurate asset in config file:

'components' => [
    'assetManager' => [
        'bundles' => [
            'yidas\adminlte\AdminlteAsset' => [
                'skin' => 'skin-black',
            ],
        ],
    ],
],

USAGE

Version Control

Update dependent packages

composer update yidas/yii2-adminlte

Update newest AdminLTE version

composer update almasaeed2010/AdminLTE

Specify a AdminLTE version

composer require almasaeed2010/AdminLTE 2.4.0

PLUGINS

This package provides asset bundles of AdminLTE plugins:

iCheck

Register or depend Asset into your application:

yidas\yii2\adminlte\plugins\iCheckAsset

You could additionally register AdminLTE iCheck assets in view:

\yidas\yii2\adminlte\plugins\iCheckAsset::register($this);

Skin

'components' => [
    'assetManager' => [
        'bundles' => [
            'yidas\yii2\adminlte\plugins\iCheckAsset' => [
                'skin' => 'flat/aero',
            ],
        ],
    ],
],

TEMPLATES

Once the extension is installed, you can have a preview by reconfiguring the path mappings of the view component in config:

    'components' => [
        'view' => [
            'theme' => [
                'pathMap' => [
                   '@app/views' => '@vendor/yidas/yii2-adminlte/templates/example'
                ],
            ],
        ],
    ],

Support both Yii 2 Advanced Application Template or Basic Application Template.

Example Templates

There are several implemented examples of AdminLTE layout for startup.

'@app/views' => '@vendor/yidas/yii2-adminlte/templates/simple'
'@app/views' => '@vendor/yidas/yii2-adminlte/templates/simple_zh-TW'

yii2-adminlte's People

Contributors

yidas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.