Giter Site home page Giter Site logo

yii2-swiper's Introduction

Yii2-swiper Coverage 100% License MIT

Yii2 widget for Swiper slider. See more here: https://github.com/nolimits4web/Swiper/.

You can find examples in demos folder.

Also you can read documentation.

Installation

You can get this extension through Composer.

Either run in terminal

$ php composer.phar require "romka-chev/yii2-swiper" "*"

or add

"romka-chev/yii2-swiper" : "*"

to the require section of your application's composer.json file.

###Usage

 
<?php
/**
 * @var \yii\web\View $this
 */
use romkaChev\yii2\swiper\Swiper;

echo Swiper::widget( [
  'items'         => [
    [ 'background' => 'http://lorempixel.com/600/600/nature/1' ],
    [ 'background' => 'http://lorempixel.com/600/600/nature/2' ],
    [ 'background' => 'http://lorempixel.com/600/600/nature/3' ],
    [ 'background' => 'http://lorempixel.com/600/600/nature/4' ],
    [ 'background' => 'http://lorempixel.com/600/600/nature/5' ]
  ],
  'behaviours'    => [
    'pagination'
  ],
  'pluginOptions' => [
    'grabCursor'     => true,
    'centeredSlides' => true,
    'slidesPerView'  => 'auto',
    'effect'         => 'coverflow',
    'coverflow'      => [
        'rotate'       => 50,
        'stretch'      => 0,
        'depth'        => 100,
        'modifier'     => 1,
        'slideShadows' => true
    ]
  ]
] );
 

Issues

If some problems occurred, you can create issue.

Thank you for attention.

yii2-swiper's People

Contributors

romka-chev avatar zelenin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

yii2-swiper's Issues

error when display slide from array items

cannot display slide from array items
ex.
items[] =[
'Slide 1',
'Slide 2',
'Slide 3',
'Slide 4',
];

echo Swiper::widget( [
'items' =>items[], //error this line
'behaviours' => [
Swiper::BEHAVIOUR_PAGINATION
],
'pluginOptions' => [
Swiper::OPTION_PAGINATION_CLICKABLE => true
]
] );

Update to new bower swiper libraries

The newest bower swiper plugin (> v4.5.0) does not create or have a dist folder so the plugin will crash. Please implement some new handling here.

Not working on PHP 7.

This extension does not work under PHP7 and so on on yii2 2.0.13 and higher versions due to the use of word Object. It must be changed, object was deprecated.

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.