Commit f321812b1c75707435eae45da43ce389e5775fa5
1 parent
3f503297
Галерея, стили
Showing
1 changed file
with
23 additions
and
18 deletions
Show diff stats
frontend/views/site/gallery.php
@@ -16,25 +16,30 @@ | @@ -16,25 +16,30 @@ | ||
16 | <div id="content"> | 16 | <div id="content"> |
17 | <div class="container"> | 17 | <div class="container"> |
18 | <div class="row"> | 18 | <div class="row"> |
19 | - <div class="my-gallery" itemscope itemtype="http://schema.org/ImageGallery"> | ||
20 | - <?php foreach ($images as $image) { | ||
21 | - if (file_exists(\Yii::getAlias('@storage/' . $image->id . '_' . $image->fileHash . '.' . $image->extension))) { | ||
22 | - ?> | ||
23 | - <figure class="reviews_gallery"> | ||
24 | - <a href="<?= $image->getUrl() ?>" itemprop="contentUrl" data-size="<?= getimagesize( | ||
25 | - $image->getPath() | ||
26 | - )[ 0 ] . 'x' . getimagesize( | ||
27 | - $image->getPath() | ||
28 | - )[ 1 ] ?>"> | ||
29 | - <img src="<?= ImageHelper::set($image->getPath()) | ||
30 | - ->cropResize(500, 325) | ||
31 | - ->render() ?>" itemprop="thumbnail" alt=""/> | ||
32 | - </a> | ||
33 | - </figure> | ||
34 | - <?php | 19 | + <div class="col-md-12"> |
20 | + <div class="heading"> | ||
21 | + <h2>Галерея</h2> | ||
22 | + </div> | ||
23 | + <div class="my-gallery" itemscope itemtype="http://schema.org/ImageGallery"> | ||
24 | + <?php foreach ($images as $image) { | ||
25 | + if (file_exists(\Yii::getAlias('@storage/' . $image->id . '_' . $image->fileHash . '.' . $image->extension))) { | ||
26 | + ?> | ||
27 | + <figure class="reviews_gallery"> | ||
28 | + <a href="<?= $image->getUrl() ?>" itemprop="contentUrl" data-size="<?= getimagesize( | ||
29 | + $image->getPath() | ||
30 | + )[ 0 ] . 'x' . getimagesize( | ||
31 | + $image->getPath() | ||
32 | + )[ 1 ] ?>"> | ||
33 | + <img src="<?= ImageHelper::set($image->getPath()) | ||
34 | + ->cropResize(500, 325) | ||
35 | + ->render() ?>" itemprop="thumbnail" alt=""/> | ||
36 | + </a> | ||
37 | + </figure> | ||
38 | + <?php | ||
39 | + } | ||
35 | } | 40 | } |
36 | - } | ||
37 | - ?> | 41 | + ?> |
42 | + </div> | ||
38 | </div> | 43 | </div> |
39 | </div> | 44 | </div> |
40 | </div> | 45 | </div> |