2017 © Pedro Peláez
 

yii2-extension yii2-light-slider-widget

Renders a JQuery LightSlider widget and Integrate with lightGallery for yii2.

image

dominus77/yii2-light-slider-widget

Renders a JQuery LightSlider widget and Integrate with lightGallery for yii2.

  • Wednesday, May 2, 2018
  • by dominus77
  • Repository
  • 1 Watchers
  • 1 Stars
  • 28 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 100 % Grown

The README.md

JQuery LightSlider Widget

Latest Stable Version License build Scrutinizer Code Quality codecov Total Downloads SymfonyInsight, (*1)

Renders a JQuery LightSlider widget and Integrate with lightGallery for Yii2., (*2)

Installation

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

Either run, (*4)

php composer.phar require dominus77/yii2-light-slider-widget

or add, (*5)

"dominus77/yii2-light-slider-widget": "^1.0"

to the require section of your composer.json file., (*6)

Usage

Once the extension is installed, simply use it in your code by :, (*7)

<?= \dominus77\lightslider\Slider::widget([
    'items' => ['Slide 1', 'Slide 2', 'Slide 3', 'Slide 4', 'Slide 5', 'Slide 6', 'Slide 7'],
    'clientOptions' => [
        // settings: http://sachinchoolur.github.io/lightslider/settings.html
        'item' => 3,
        'autoWidth' => false,
        'slideMove' => 1, // slidemove will be 1 if loop is true
        'slideMargin' => 10,
        //...        
    ],
    'listOptions' => [], // Set <ul> options
    'itemsOptions' => [], // Set options <li> all
]) ?>

Integrate with lightGallery

<?= \dominus77\lightslider\Slider::widget([
    'id' => 'myGalleryID',
    'items' => [
        [
            'item' => \yii\helpers\Html::img(\Yii::getAlias('@web/uploads/img/image1.jpg')),
            'options' => [
                'data-thumb' => \Yii::getAlias('@web/uploads/img/thumb/image1.jpg'),
                'data-src' => \Yii::getAlias('@web/uploads/img/largeImage1.jpg'),
                //...
            ]
        ],
        [
            'item' => \yii\helpers\Html::img(\Yii::getAlias('@web/uploads/img/image2.jpg')),
            'options' => [
                'data' => [
                    'thumb' => \Yii::getAlias('@web/uploads/img/thumb/image2.jpg'),
                    'src' => \Yii::getAlias('@web/uploads/img/largeImage2.jpg'),
                ],
                //...
            ]
        ],
        //...
    ],
    'clientOptions' => [            
        'gallery' => true,
        'item' => 1,
        'loop' => true,
        'thumbItem' => 9,
        'slideMargin' => 0,
        'enableDrag' => false,
        'currentPagerPosition' => 'left',
        'onSliderLoad' => new \yii\web\JsExpression("
            function(el) {
                el.lightGallery({
                    // options: http://sachinchoolur.github.io/lightGallery/docs/api.html
                    selector: '#myGalleryID .lslide'
                });
            }
        "),
        //...        
    ],
    //...
]) ?>

Tests

vendor/bin/phpunit

More Information

Please, check the JQuery LightSlider and lightGallery, (*8)

License

The MIT License (MIT). Please see License File for more information., (*9)

Sensio Labs

SymfonyInsight, (*10)

The Versions

02/05 2018

dev-master

9999999-dev

Renders a JQuery LightSlider widget and Integrate with lightGallery for yii2.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar dominus77

extension yii2 jquery widget dominus77 lightslider lightgallery

02/05 2018

1.0.5

1.0.5.0

Renders a JQuery LightSlider widget and Integrate with lightGallery for yii2.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar dominus77

extension yii2 jquery widget dominus77 lightslider lightgallery

01/05 2018

1.0.4

1.0.4.0

Renders a JQuery LightSlider widget for yii2.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar dominus77

extension yii2 jquery widget dominus77 lightslider lightgallery

01/05 2018

1.0.3

1.0.3.0

Renders a JQuery LightSlider widget for yii2.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar dominus77

extension yii2 jquery widget dominus77 lightslider lightgallery

01/05 2018

1.0.2

1.0.2.0

Renders a JQuery LightSlider widget for yii2.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar dominus77

extension yii2 jquery widget dominus77 lightslider lightgallery

01/05 2018

1.0.1

1.0.1.0

Renders a JQuery LightSlider widget for yii2.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar dominus77

extension yii2 jquery widget dominus77 lightslider

30/04 2018

1.0.0

1.0.0.0

Renders a JQuery LightSlider widget for yii2.

  Sources   Download

MIT

The Requires

 

by Avatar dominus77

extension yii2 jquery widget dominus77 lightslider