zolotarev/yii2-semantic-ui

Semantic UI extension for Yii2

Installs: 2

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 36

Type:yii2-extension

0.2.12 2015-06-17 00:37 UTC

This package is not auto-updated.

Last update: 2024-05-15 06:41:18 UTC


README

Semantic UI extension for Yii2

Installation

Composer

The preferred way to install this extension is through Composer.

Either run

php composer.phar require zelenin/yii2-semantic-ui "*"

or add

"zelenin/yii2-semantic-ui": "*"

to the require section of your composer.json

Usage

Add SemanticUICSSAsset to AppAsset:

<?php

namespace backend\assets;

use yii\web\AssetBundle;

class AppAsset extends AssetBundle
{
    public $basePath = '@webroot';
    public $baseUrl = '@web';
    public $css = [];
    public $js = [];
    public $depends = [
        'yii\web\YiiAsset',
        'yii\web\JqueryAsset',
        'Zelenin\yii\SemanticUI\assets\SemanticUICSSAsset'
    ];
}

Use Semantic UI widgets and elements. Standard Yii2 widgets also adopted.

You may replace yii2 standard widgets. Write in bootstrap.php:

Yii::$container->set(\yii\grid\GridView::className(), \Zelenin\yii\SemanticUI\widgets\GridView::className());
Yii::$container->set(\yii\widgets\ActiveForm::className(), \Zelenin\yii\SemanticUI\widgets\ActiveForm::className());
Yii::$container->set(\yii\bootstrap\ActiveForm::className(), \Zelenin\yii\SemanticUI\widgets\ActiveForm::className());
Yii::$container->set(\yii\widgets\Breadcrumbs::className(), \Zelenin\yii\SemanticUI\collections\Breadcrumb::className());
Yii::$container->set(\yii\grid\CheckboxColumn::className(), \Zelenin\yii\SemanticUI\widgets\CheckboxColumn::className());

Be very careful with it.

Demo

Demo site

Work in progress

I need your feedback! I need your pull requests!

Author

Aleksandr Zelenin, e-mail: aleksandr@zelenin.me