Veröffentlichungszeit: Mittwoch, 6. Februar 2019 (vor 4 Jahren)
Erstellt von: Семенов Александр Сергеевич
Kategorie: Werkzeuge
Aktuelle Version:
01.01.1970, 03:00:00 (vor 53 Jahren)
Packagist: skeeks/yii2-widget-nanogallery
: https://github.com/skeeks-semenov/yii2-widget-nanogallery
:
Typ: Компонент
Image gallery for jQuery
nanoGALLERY is a touch enabled and fully responsive image gallery with justified, cascading and grid layout. It supports self hosted images and pulling in Flickr, Google Photos and Google+ photo albums.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist skeeks/yii2-widget-nanogallery "^0.0.1"
or add
"skeeks/yii2-widget-nanogallery": "^0.0.1"
How to use
<?= \skeeks\yii2\nanogalleryWidget\NanogalleryWidget::widget([
'items' => [
[
'src' => 'https://images.wallpaperscraft.ru/image/leopard_hischnik_morda_oskal_agressiya_58086_1280x720.jpg',
'preview_src' => 'https://images.wallpaperscraft.ru/image/leopard_hischnik_morda_oskal_agressiya_58086_1280x720.jpg',
'title' => 'title',
'description' => 'description',
],
[
'src' => 'https://s1.1zoom.ru/b5050/261/348938-sepik_2048x1152.jpg',
'preview_src' => 'https://s1.1zoom.ru/b5050/261/348938-sepik_2048x1152.jpg',
'title' => 'title',
'description' => 'description',
],
[
'src' => 'https://s1.1zoom.ru/big3/297/Canada_Mountains_Scenery_488936.jpg',
'preview_src' => 'https://s1.1zoom.ru/big3/297/Canada_Mountains_Scenery_488936.jpg',
'title' => 'title',
'description' => 'description',
]
],
'clientOptions' => [
'thumbnailHeight' => 500
//all options see http://nanogallery.brisbois.fr/
],
]); ?>
How to use for SkeekS CMS
<?
$tree = \skeeks\cms\models\CmsTree::findOne(10);
$images = $tree->images;
$items = \yii\helpers\ArrayHelper::map($images, "id", function (\skeeks\cms\models\StorageFile $model) {
return [
'src' => $model->src,
'preview_src' => \Yii::$app->imaging->thumbnailUrlOnRequest($model->src,
new \skeeks\cms\components\imaging\filters\Thumbnail([
'h' => 350,
'w' => 0,
])
),
'description' => $model->name,
'title' => $model->name,
];
});
?>
<?= \skeeks\yii2\nanogalleryWidget\NanogalleryWidget::widget([
'items' => $items,
'clientOptions' => [
'thumbnailHeight' => 200
//all options see http://nanogallery.brisbois.fr/
],
]); ?>
Video
Links
SkeekS CMS (Yii2) — fast, simple, effective!
skeeks.com | cms.skeeks.com
CHANGELOG
0.0.1
- First release
dev-master — 01.01.1970, 03:00:00 (vor 53 Jahren)
1.0.0 — 01.01.1970, 03:00:00 (vor 53 Jahren)
0.0.2 — 01.01.1970, 03:00:00 (vor 53 Jahren)
0.0.1.1 — 01.01.1970, 03:00:00 (vor 53 Jahren)
0.0.1 — 01.01.1970, 03:00:00 (vor 53 Jahren)
Стандартная установка:
Добавьте composer.json файл вашего проекта:
"skeeks/yii2-widget-nanogallery": "*"
Запустите обновление зависимостей
Alle Kommentare (0)