From 49b00707d39e20cd317ac0dbfd77ae60095c649b Mon Sep 17 00:00:00 2001 From: Karnovsky A Date: Mon, 16 May 2016 13:43:39 +0300 Subject: [PATCH] ArtboxImage lightbox --- common/config/main.php | 4 ++-- frontend/views/catalog/product.php | 7 ++++++- frontend/web/css/lightbox.css | 206 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/lightbox.js | 453 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 667 insertions(+), 3 deletions(-) create mode 100644 frontend/web/css/lightbox.css create mode 100644 frontend/web/js/lightbox.js diff --git a/common/config/main.php b/common/config/main.php index f2deb13..9692f7e 100755 --- a/common/config/main.php +++ b/common/config/main.php @@ -122,8 +122,8 @@ return [ ], 'large' => [ 'resize' => [ - 'width' => 600, - 'height' => 600, + 'width' => 1200, + 'height' => 800, 'master' => null ], ], diff --git a/frontend/views/catalog/product.php b/frontend/views/catalog/product.php index 32d656e..144e120 100755 --- a/frontend/views/catalog/product.php +++ b/frontend/views/catalog/product.php @@ -2,6 +2,9 @@ use common\components\artboximage\ArtboxImageHelper; +$this->registerCssFile(Yii::getAlias('@web/css/lightbox.css')); +$this->registerJsFile(Yii::getAlias('@web/js/lightbox.js')); + /** @var $this \yii\web\View */ /** @var $dataProvider \yii\data\ActiveDataProvider */ $this->title = $product->name; @@ -19,7 +22,9 @@ $this->params['breadcrumbs'][] = $product->name .' #'. $product->variant->sku; image)) :?> <?= $product->name?> - image->imageUrl ? ArtboxImageHelper::getImage($product->image->imageUrl, 'product') : ''?> + + image->imageUrl, 'product')?> +