Blame view

frontend/views/site/index.php 4.76 KB
298bc0f4   Alexey Boroda   first commit
1
2
3
4
  <?php
  
  /* @var $this yii\web\View
   * @var \common\models\slider\Slide[] $slides;
6fc26f8f   Anastasia   - slider
5
   * @var \common\models\blog\Article[]   $articles
298bc0f4   Alexey Boroda   first commit
6
7
8
9
   */
      
      use artbox\core\helpers\ImageHelper;
      use artbox\core\helpers\Url;
555c4968   alex   Изменил фото и на...
10
      use frontend\widgets\ParthnersList;
298bc0f4   Alexey Boroda   first commit
11
12
13
14
15
      
      $this->title = 'My Yii Application';
  ?>
  
  <?php if (!empty($slides)){?>
802e54ea   Виталий   mob slider show +...
16
  <section style="margin-bottom: 0" class="">
298bc0f4   Alexey Boroda   first commit
17
18
19
    <!-- *** HOMEPAGE CAROUSEL ***
  _________________________________________________________ -->
    
5a99e080   Виталий   fix css
20
21
    <div class="home-carousel">
  
298bc0f4   Alexey Boroda   first commit
22
23
24
      <div class="dark-mask"></div>
      
      <div class="container">
ac4eea2e   Anastasia   - frontend events
25
        <div class="homepage owl-carousel" >
5f694714   Anastasia   - events
26
         
4368a120   Anastasia   - slider
27
          <?php foreach ($slides as $key => $slide){?>
5f694714   Anastasia   - events
28
          
a27dffad   Anastasia   - delete tab in a...
29
          <div class="item" data-bg="<?=($slide->background !== null) ? $slide->background->getUrl() : ''?>">
298bc0f4   Alexey Boroda   first commit
30
            <div class="row">
7150a05d   alex   Кнопка "Подробнее...
31
              <div class="col-sm-5 ">
298bc0f4   Alexey Boroda   first commit
32
                <h1><?=$slide->title?></h1>
ac4eea2e   Anastasia   - frontend events
33
                  <p><?=$slide->description?></p>
af7d735c   Виталий   slider home fix
34
                  <p style="margin-top:25px;"> </p>
6589c2f0   alex   Слайдер
35
36
37
38
39
                <p class="text-right">
                  <a href="<?= $slide->link ?>" class="btn btn-template-transparent-primary "><?= \Yii::t(
                        'app',
                        'More'
                    ) ?></a></p>
298bc0f4   Alexey Boroda   first commit
40
                </div>
63edaa40   Anastasia   - blog
41
              <?php if ($slide->language->image !== null){?>
6589c2f0   alex   Слайдер
42
                <div class="col-sm-7">
298bc0f4   Alexey Boroda   first commit
43
44
45
                <a href="<?=$slide->link?>"><?=ImageHelper::set($slide->language->image->getPath())
                                                          ->cropResize(650, 380)
                                                          ->quality(84)
5c89963f   Виталий   qwerty
46
47
48
                                                          ->renderImage([
                                                             'class' => 'img-responsive'
                                                          ])?></a>
298bc0f4   Alexey Boroda   first commit
49
              </div>
63edaa40   Anastasia   - blog
50
              <?php }?>
298bc0f4   Alexey Boroda   first commit
51
52
            </div>
          </div>
5f694714   Anastasia   - events
53
          
298bc0f4   Alexey Boroda   first commit
54
          <?php }?>
5f694714   Anastasia   - events
55
          </div>
298bc0f4   Alexey Boroda   first commit
56
57
58
59
60
61
62
        <!-- /.project owl-slider -->
      </div>
    </div>
    
    <!-- *** HOMEPAGE CAROUSEL END *** -->
  </section>
  <?php }?>
2acc1d15   alex   Поменял новости с...
63
64
65
  <?php if (!empty($articles)){?>
      <section class="bar background-white no-mb">
          <div class="container">
298bc0f4   Alexey Boroda   first commit
66
  
2acc1d15   alex   Поменял новости с...
67
68
69
70
              <div class="col-md-12">
                  <div class="heading text-center">
                      <h2><?=\Yii::t('app', 'News')?></h2>
                  </div>
1e265381   Виталий   commented blocks
71
  
1e265381   Виталий   commented blocks
72
  
2acc1d15   alex   Поменял новости с...
73
74
                  <!-- *** BLOG HOMEPAGE ***
  		  _________________________________________________________ -->
298bc0f4   Alexey Boroda   first commit
75
  
2acc1d15   alex   Поменял новости с...
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
                  <div class="row articles-flex">
  					<?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->getPath())
  											->cropResize(255, 191)
  											->quality(84)
  											->renderImage(
  												[
  													'alt' => $article->image->lang ? ( $article->image->lang->title || $article->title ) : $article->title,
  												]
  											)?>
                                      </div>
                                      <div class="bg"></div>
                                      <div class="text">
                                          <p class="buttons">
                                              <a href="<?=Url::to(['alias' => $article->alias])?>" class="btn btn-template-transparent-primary"><i class="fa fa-link"></i><?=\Yii::t('app', 'Читать далее')?></a>
                                          </p>
                                      </div>
                                  </div>
                                  <div class="content">
                                      <h4><a href="<?=Url::to(['alias' => $article->alias])?>"><?=$article->title?></a></h4>
                                      <p class="intro"><?=$article->body_preview?></p>
                                      <p class="read-more"><a href="<?=Url::to([ 'alias' => $article->alias])?>" class="btn btn-template-main"><?=\Yii::t('app', 'Читать далее')?></a>
                                      </p>
                                  </div>
                              </div>
                              <!-- /.box-image-text -->
  
                          </div>
  					<?php }?>
                  </div>
                  <!-- /.row -->
  
                  <!-- *** BLOG HOMEPAGE END *** -->
  
              </div>
  
          </div>
          <!-- /.container -->
      </section>
298bc0f4   Alexey Boroda   first commit
119
  
2acc1d15   alex   Поменял новости с...
120
121
  <?php }?>
  <!-- /.bar -->
298bc0f4   Alexey Boroda   first commit
122
  
75743b61   alex   Косметические правки
123
  <section class="bar background-white no-mb">
298bc0f4   Alexey Boroda   first commit
124
125
126
127
    <div class="container">
      <div class="row">
        <div class="col-md-12">
          <div class="heading text-center">
555c4968   alex   Изменил фото и на...
128
            <h2><?=\Yii::t('app','Our parthners');?></h2>
298bc0f4   Alexey Boroda   first commit
129
          </div>
555c4968   alex   Изменил фото и на...
130
131
  
  	      <?=ParthnersList::widget(); ?>
298bc0f4   Alexey Boroda   first commit
132
133
134
135
136
137
          <!-- /.owl-carousel -->
        </div>
      
      </div>
    </div>
  </section>
555c4968   alex   Изменил фото и на...