Blame view

frontend/views/site/index.php 13.2 KB
c7b6386e   Alex Savenko   conflict
1
  
6ba3c88a   Alex Savenko   all
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
  <?php
      use artbox\catalog\models\Brand;
      use artbox\catalog\models\Category;
      use artbox\catalog\models\Product;
      use artbox\core\components\SeoComponent;
      use artbox\core\helpers\ImageHelper;
      use artbox\weblog\models\Article;
      use yii\bootstrap\Html;
      use yii\helpers\Url;
      use yii\web\View;
      
      /**
       * @var View         $this
       * @var Category[]   $categories
       * @var Product[]    $topItems
       * @var Product[]    $newItems
       * @var Product[]    $saleItems
       * @var int          $brandCount
       * @var int          $productCount
       * @var Brand[]      $brands
       * @var SeoComponent $seo
       * @var Article[]    $articles
       */
      $this->title = 'My Yii Application';
      $seo = Yii::$app->get('seo');
  ?>
  <section class="category-carousel-box">
    <!-- *** HOMEPAGE CAROUSEL ***
  _________________________________________________________ -->
    <div class="container">
      
      <div class="row">
38a9a9a6   Виталий   q
34
35
        <div class="hidden-xs hidden-sm col-md-3">
            <!-- если нет вложенности в меню то добавлять родительським li класс ".no-child-menu" -->
6ba3c88a   Alex Savenko   all
36
37
38
39
40
41
42
43
44
45
            <?php
                echo $this->render(
                    '@frontend/views/layouts/_category_menu',
                    [
                        'isHome' => true,
                    ]
                );
            ?>
        </div>
        
38a9a9a6   Виталий   q
46
        <div class="col-xs-12 col-sm-12 col-md-9">
6ba3c88a   Alex Savenko   all
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
          <div class="home-carousel" style="min-height:384px;">
            
            <div class="dark-mask"></div>
            
            <div class="homepage owl-carousel">
              <div class="item">
                <div class="row">
                  <div class="col-sm-5">
                  </div>
                  <div class="col-sm-7">
                  </div>
                </div>
              </div>
            </div>
            <!-- /.project owl-slider -->
          </div>
        </div>
      </div>
    </div>
    <!-- *** HOMEPAGE CAROUSEL END *** -->
  </section>
  
  
  <section>
    <div class="container">
4644d2f1   Eugeny Galkovskiy   new edits main page
72
        <div class="col-xs-12 col-sm-12 col-md-12">
38a9a9a6   Виталий   q
73
            <?php
6ba3c88a   Alex Savenko   all
74
75
            if (!empty($newItems)) {
                ?>
38a9a9a6   Виталий   q
76
77
78
79
80
81
82
                <div class="heading text-center">
                    <h2><?php echo \Yii::t('app', 'Новинки'); ?></h2>
                </div>
  
                <div class="product-carousel">
                    <div class="homepage owl-carousel">
                        <?php
6ba3c88a   Alex Savenko   all
83
84
85
                        $newItemsArrays = array_chunk($newItems, 4);
                        foreach ($newItemsArrays as $newItemsArray) {
                            ?>
38a9a9a6   Виталий   q
86
87
88
89
90
91
92
93
94
95
96
97
                            <div class="products">
                                <?php
                                foreach ($newItemsArray as $product) {
                                    echo $this->render(
                                        '_slider_product',
                                        [
                                            'product' => $product,
                                        ]
                                    );
                                }
                                ?>
                            </div>
6ba3c88a   Alex Savenko   all
98
99
                            <?php
                        }
38a9a9a6   Виталий   q
100
101
                        ?>
                    </div>
6ba3c88a   Alex Savenko   all
102
                </div>
6ba3c88a   Alex Savenko   all
103
104
                <?php
            }
4644d2f1   Eugeny Galkovskiy   new edits main page
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
  //          if (!empty($saleItems)) {
  //              ?>
  <!--              <div class="heading text-center">-->
  <!--                  <h2>--><?php //echo \Yii::t('app', 'Акции'); ?><!--</h2>-->
  <!--              </div>-->
  <!--              <div class="product-carousel">-->
  <!--                  <div class="homepage owl-carousel">-->
  <!--                      --><?php
  //                      $newItemsArrays = array_chunk($saleItems, 4);
  //                      foreach ($newItemsArrays as $newItemsArray) {
  //                          ?>
  <!--                          <div class="products">-->
  <!--                              --><?php
  //                              foreach ($newItemsArray as $product) {
  //                                  echo $this->render(
  //                                      '_slider_product',
  //                                      [
  //                                          'product' => $product,
  //                                      ]
  //                                  );
  //                              }
  //                              ?>
  <!--                          </div>-->
  <!--                          --><?php
  //                      }
  //                      ?>
  <!--                  </div>-->
  <!--              </div>-->
  <!--              --><?php
  //          }
  //          if (!empty($topItems)) {
  //              ?>
  <!--              <div class="heading text-center">-->
  <!--                  <h2>--><?php //echo \Yii::t('app', 'Топ'); ?><!--</h2>-->
  <!--              </div>-->
  <!--              <div class="product-carousel">-->
  <!--                  <div class="homepage owl-carousel">-->
  <!--                      --><?php
  //                      $newItemsArrays = array_chunk($topItems, 4);
  //                      foreach ($newItemsArrays as $newItemsArray) {
  //                          ?>
  <!--                          <div class="products">-->
  <!--                              --><?php
  //                              foreach ($newItemsArray as $product) {
  //                                  echo $this->render(
  //                                      '_slider_product',
  //                                      [
  //                                          'product' => $product,
  //                                      ]
  //                                  );
  //                              }
  //                              ?>
  <!--                          </div>-->
  <!--                          --><?php
  //                      }
  //                      ?>
  <!--                  </div>-->
  <!--              </div>-->
  <!--              --><?php
  //          }
38a9a9a6   Виталий   q
165
166
            ?>
        </div>
6ba3c88a   Alex Savenko   all
167
168
169
    </div>
  </section>
  
0cd46e52   Eugeny Galkovskiy   new edits main page
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
  <section class="bar color-white no-mb background-iso">
      <div class="container">
          <div class="row flex-centered">
              <div class="col-md-6 text-center">
                  <div class="clients-text-bl">
                      <div>
                          <span>более</span>
                          <span class="num">1000</span>
                      </div>
                      <div>
                          <span>клиентов</span>
                      </div>
                  </div>
              </div>
              <div class="col-md-3 text-center">
                  <div>
                      <img src="../img/ico-iso-9001.png" alt="">
                      <p class="iso-text">Сертифікат управління якістю</p>
                  </div>
              </div>
              <div class="col-md-3 text-center">
                  <div>
                      <img src="../img/ico-iso-27001.png" alt="">
                      <p class="iso-text">Сертифікат безпеки</p>
                  </div>
              </div>
6ba3c88a   Alex Savenko   all
196
          </div>
6ba3c88a   Alex Savenko   all
197
      </div>
6ba3c88a   Alex Savenko   all
198
  </section>
0cd46e52   Eugeny Galkovskiy   new edits main page
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
  
  <!--<section class="bar color-white no-mb">-->
  <!--  <div class="container">-->
  <!--    <div class="row showcase">-->
  <!--      <div class="col-md-4 col-sm-6">-->
  <!--        <div class="item">-->
  <!--          <div class="icon"><i class="fa fa-cubes"></i>-->
  <!--          </div>-->
  <!--          <h4><span class="counter">--><?php //echo $productCount; ?><!--</span><br>-->
  <!--            -->
  <!--            Позиций товаров</h4>-->
  <!--        </div>-->
  <!--      </div>-->
  <!--      <div class="col-md-4 col-sm-6">-->
  <!--        <div class="item">-->
  <!--          <div class="icon"><i class="fa fa-tags"></i>-->
  <!--          </div>-->
  <!--          <h4><span class="counter">--><?php //echo $brandCount; ?><!--</span><br>-->
  <!--            -->
  <!--            Брендов</h4>-->
  <!--        </div>-->
  <!--      </div>-->
  <!--      <div class="col-md-4 col-sm-6">-->
  <!--        <div class="item">-->
  <!--          <div class="icon"><i class="fa fa-copy"></i>-->
  <!--          </div>-->
  <!--          <h4><span class="counter">12</span> ... <span class="counter">36</span><br>-->
  <!--            -->
  <!--            Месяцев Гарантия </h4>-->
  <!--        </div>-->
  <!--      </div>-->
  <!--    </div>-->
  <!--    <!-- /.row -->
  <!--  </div>-->
  <!--  <!-- /.container -->
  <!--</section>-->
  
  
6ba3c88a   Alex Savenko   all
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
  <!-- /.bar -->
  <?php
      if (!empty($brands)) {
          ?>
        <section class="bar background-gray no-mb">
          <div class="container">
            <div class="row">
              <div class="col-md-12">
                <div class="heading text-center">
                  <h2><?php echo \Yii::t('app', 'Бренды'); ?></h2>
                </div>
    
                <ul class="owl-carousel customers brand-carousel">
                    <?php
                        foreach ($brands as $brand) {
                            echo Html::tag(
                                'div',
                                Html::img(
                                    ImageHelper::set($brand->image->getPath())
                                               ->setWidth(150)
                                               ->render(),
                                    [
                                        'class' => 'img-responsive',
                                    ]
                                ),
                                [
                                    'class' => 'item',
                                ]
                            );
                        }
                    ?>
                </ul>
                <!-- /.owl-carousel -->
              </div>
            
            </div>
          </div>
        </section>
          <?php
      }
  ?>
  <section class="bar background-white no-mb">
    <div class="container">
      
      <div class="col-md-12">
        <div class="heading text-center">
4644d2f1   Eugeny Galkovskiy   new edits main page
283
          <h2>Статьи</h2>
6ba3c88a   Alex Savenko   all
284
285
        </div>
    
4644d2f1   Eugeny Galkovskiy   new edits main page
286
287
        <p class="lead">Облачные технологии — одна из самых динамично развивающихся сфер IT. Узнать информацию про cloud computing будет полезно для тех, кто активно интересуется технологическими новинками.
            <a href="/blog/index">Почитайте наш блог!</a>
6ba3c88a   Alex Savenko   all
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
        </p>
        
        <!-- *** BLOG HOMEPAGE ***
  _________________________________________________________ -->
        
        <div class="row">
            
            <?php foreach ($articles as $article) { ?>
              <div class="col-md-3 col-sm-6">
                <div class="box-image-text blog">
                  <div class="top">
                    <div class="image">
                        <?= ImageHelper::set(
                            $article->image ? $article->image->getPath() : '@frontend/web/img/no-image.png'
                        )
                                       ->cropResize(255, 192)
                                       ->renderImage(
                                           [
                                               'class' => 'img-responsive',
                                               'alt'   => $article->lang->title,
                                           ]
                                       ) ?>
                    </div>
                    <div class="bg"></div>
                    <div class="text">
                      <p class="buttons">
                        <a href="<?= Url::to(
                            [
                                'blog/article',
                                'id' => $article->id,
                            ]
                        ) ?>" class="btn btn-template-transparent-primary"><i class="fa fa-link"></i> <?php echo \Yii::t(
                                'app',
                                'Read more'
                            ); ?></a>
                      </p>
                    </div>
                  </div>
                  <div class="content">
                    <h4><a href="<?= Url::to(
                            [
                                'blog/article',
                                'id' => $article->id,
                            ]
                        ) ?>"><?= $article->lang->title; ?></a></h4>
                      <?php if ( !empty($article->category) ) { ?>
                    <p class="author-category"><a href="<?= Url::to(
                            [
                                'blog/category',
                                'id' => $article->category->id,
                            ]
                        ) ?>"><?= $article->category->lang->title ?></a>
                        <?php } ?>
                    </p>
                    <p class="intro"><?= $article->lang->body_preview; ?></p>
                    <p class="read-more">
                      <a href="<?= Url::to(
                          [
                              'blog/article',
                              'id' => $article->id,
                          ]
                      ) ?>" class="btn btn-template-main"><?php echo \Yii::t('app', 'Continue reading'); ?></a>
                    </p>
                  </div>
                </div>
                <!-- /.box-image-text -->
              </div>
            <?php } ?>
        
        </div>
        <!-- /.row -->
        
        <!-- *** BLOG HOMEPAGE END *** -->
      
      </div>
    
    </div>
    <!-- /.container -->
  </section>
  <!-- /.bar -->
  
  
  <section class="bar background-white no-mb">
    <div class="container">
      <div class="col-md-12">
          <?php echo $seo->text; ?>
      </div>
    </div>
  </section>