承接 san27079/yii2-bootstrap-lightbox 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

san27079/yii2-bootstrap-lightbox

最新稳定版本:0.1

Composer 安装命令:

composer require san27079/yii2-bootstrap-lightbox

包简介

Bootstrap light box plugin

README 文档

README

Bootstrap light box plugin

Based on A lightbox gallery plugin for Bootstrap https://github.com/ashleydw/lightbox

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist san27079/yii2-bootstrap-lightbox "*"

or add

"san27079/yii2-bootstrap-lightbox": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

  • create gallery
<?php echo LightBoxWidget::widget([
        'data' => [
            ['src' => 'https://unsplash.it/1200/768.jpg?image=251', 'thumb' => 'https://unsplash.it/600.jpg?image=251', 'title' => 'Test Gallery',   'width' => 320],
            ['src' => 'https://unsplash.it/1200/768.jpg?image=251', 'thumb' => 'https://unsplash.it/600.jpg?image=251', 'title' => 'Test Gallery',   'width' => 320],
            ['src' => 'https://unsplash.it/1200/768.jpg?image=251', 'thumb' => 'https://unsplash.it/600.jpg?image=251', 'title' => 'Test Gallery',   'width' => 320],
            ['src' => 'https://unsplash.it/1200/768.jpg?image=251', 'thumb' => 'https://unsplash.it/600.jpg?image=251', 'title' => 'Test Gallery'],
            ['src' => 'https://unsplash.it/1200/768.jpg?image=251', 'thumb' => 'https://unsplash.it/600.jpg?image=251', 'title' => 'Test Gallery'],
            ['src' => 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'thumb' => 'https://unsplash.it/600.jpg?image=251', 'title' => 'Test Gallery'],
            ['src' => 'https://unsplash.it/1200/768.jpg?image=251', 'thumb' => 'https://unsplash.it/600.jpg?image=251', 'title' => 'Test Gallery'],
        ],
        'options' => [
            'row_class' => 'row custom_row',
            'column_class' => 'col-3',
        ]
    ]); ?>
  • create one item
<?php echo LightBoxWidget::widget([
    'data' => [
        'src' => 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
        'thumb' => 'https://unsplash.it/600.jpg?image=251',
        'title' => 'Test Video',
        'width' => 1280,
        'height' => 720
    ],
    'options' => [
        'src_class' => 'row custom_row',
        'thumb_class' => 'col-3',
    ]
]); ?>

Params

options - array of params for customization plugin, it contains:

  • src_class - class of source

  • thumb_class - class of thumbnail,

params for gallery:

  • row_class - gallery wrapper class,
  • column_class - class for item or column

plugin_options - associative array of params for js plugin init for example:

alwaysShowClose, width / height, showArrows etc.

统计信息

  • 总下载量: 211
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-05-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固