12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- /**
- * @var $this \yii\web\View
- * @var $gallery \app\models\front\Gallery
- */
- use yii\helpers\Html;
- ?>
- <?php if($gallery instanceof \app\models\front\Gallery && count($gallery->getBehavior('galleryBehavior')->getImages())>0 ):?>
- <div class="gallery-wrapper" id="gallery-<?=$gallery->id?>">
- <div class="gallery-view splide">
- <div class="splide__track">
- <ul class="splide__list">
- <?php
- foreach($gallery->getBehavior('galleryBehavior')->getImages() as $image):/** @var $image \app\forks\galleryManager\GalleryImage */ ?>
- <li class="splide__slide">
- <?php if(!is_null($image->name) && $image->name!=""):?>
- <span class="image-capture"><?=$image->name?></span>
- <?php endif;?>
- <img src="<?=$image->getUrl('medium')?>" alt="<?=$image->name?>" loading="lazy" data-original="<?=$image->getUrl('large')?>">
- </li>
- <?php endforeach;?>
- </ul>
- </div>
- </div>
- <div class="gallery splide" style="padding-bottom: 18px; margin-bottom: 0px;">
- <div class="splide__track">
- <ul class="splide__list">
- <?php
- foreach($gallery->getBehavior('galleryBehavior')->getImages() as $image):/** @var $image \app\forks\galleryManager\GalleryImage */?>
- <li class="splide__slide">
- <img src="<?=$image->getUrl('small')?>" alt="<?=$image->name?>" loading="lazy">
- </li>
- <?php endforeach;?>
- </ul>
- </div>
- </div>
- <div class="image-title"><?=$gallery->name?></div>
- </div>
- <?php endif;?>
|