rmrevin/yii2-socicon Asset Bundle for Yii2 with Socicon

fontassetbundlesocialsociconicons

Yii 2 Socicon Asset Bundle

License Latest Stable Version Latest Unstable Version Total Downloads

Code Status

Scrutinizer Code Quality Code Coverage Travis CI Build Status Dependency Status

Installation

Add in composer.json:

{
    "require": {
        "rmrevin/yii2-socicon": "~1.1"
    }
}

Usage

In view

<?
// ...

rmrevin\yii\socicon\AssetBundle::register($this);

or as dependency in your asset bundle

<?
// ...

class AppAsset extends AssetBundle
{
    // ...

    public $depends = [
        // ...
        '\rmrevin\yii\socicon\AssetBundle'
    ];
}

Helper


use rmrevin\yii\socicon\SI;

echo SI::icon('twitter');
// <i class="socicon socicon-twitter"></i>
echo SI::icon('twitter', ['class' => 'big', 'data-role' => 'social-button']);
// <i class="big socicon socicon-twitter" data-role="social-button"></i>
echo Html::submitButton(Yii::t('app', '{check} Tweet', ['check' => SI::icon('twitter')]));
// <button type="submit"><i class="socicon socicon-twitter"></i> Tweet</button>

// autocomplete in IDE
echo SI::icon(SI::_TWITTER);
echo SI::icon(SI::_DISQUS);

Another prefix

SI::$cssPrefix = 'si';

echo SI::icon('twitter');
// <i class="si si-twitter"></i>

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

Comments



1.1.0 is the latest of 2 releases



MIT license
Stats
6 github stars & 2 github forks
0 downloads in the last day
0 downloads in the last 30 days
273 total downloads