Blame view

frontend/views/site/index.php 15.3 KB
06692811   Eugeny Galkovskiy   first commit
1
  <?php
cb2b0211   alex   only ru block
2
  
16a2d769   Alexey Boroda   -Main page SEO
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  /**
   * @var $this    yii\web\View
   * @var $slider  \common\models\Slider
   * @var $objects \common\models\Objectkb
   * @var $alias   \artbox\core\models\Alias
   */
  
  use common\models\Settings;
  use frontend\assets\MapAsset;
  use yii\web\View;
  use yii\helpers\Url;
  
  MapAsset::register($this);
  $settings = Settings::getInstance();
  $this->title = 'KB Energy';
  $currentLang = \artbox\core\models\Language::getCurrent();
  
  $coordinates = [];
  $coordinates[ 'lat' ] = empty($settings->lat) ? 0 : $settings->lat;
  $coordinates[ 'lon' ] = empty($settings->lon) ? 0 : $settings->lon;
753bf7d9   Volodymyr   ua redirect
23
24
25
26
27
28
  if ($currentLang->url==='ru') {
      $cookies=Yii::$app->request->cookies;
      if ($cookies->getValue('langCode', (isset($_COOKIE['langCode']))? $_COOKIE['langCode']: 'ua')==='ua') {
          Yii::$app->response->redirect('/ua');
      }
  }
16a2d769   Alexey Boroda   -Main page SEO
29
  $js = <<< JS
753bf7d9   Volodymyr   ua redirect
30
31
32
  $('.header-lang a').click(function (){
      document.cookie = "langCode=" + $(this).text() + "; path=/;";
  });
21452189   Timur Kastemirov   feedback calculat...
33
34
  window.lat = {$coordinates['lat']};
  window.lon = {$coordinates['lon']};
4a32dd4e   Eugeny Galkovskiy   main page
35
  JS;
16a2d769   Alexey Boroda   -Main page SEO
36
37
  
  $this->registerJs($js, View::POS_END);
06692811   Eugeny Galkovskiy   first commit
38
39
  ?>
  
87debd40   Eugeny Galkovskiy   our objects
40
  <div id="main-page">
16a2d769   Alexey Boroda   -Main page SEO
41
42
43
44
45
46
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
72
73
74
75
76
77
    <section class="no-mb main-slider">
        
        <?php
        $slideItems = [];
        foreach ($slider->slides as $slide) {
            if (isset($slide->lang->image)) {
                $slideItems[] = $slide->lang->image->getImg();
            }
        }
        echo \common\models\Carousel::widget(
            [
                'items' => $slideItems,
            ]
        );
        ?>
      <div class="box-simple">
        <a
          href="#"
          class="btn button1 icon_phone modaled init-button-consultation press-consultation"
          data-title="<?= \Yii::t('app', 'green_get') ?> <?= \Yii::t('app', 'green_get2') ?>"
          data-toggle="modal"
          data-target="#feedback-modal"
        >
            <?= \Yii::t('app', 'green_get') ?> <span><?= \Yii::t('app', 'green_get2') ?></span>
        </a>
      </div>
      <!-- тут место для слайдера -->
    </section>
    
    <section class="links-ses-for-wr">
      <div class="container">
        <div class="row">
          <div class="col-xs-12 col-sm-12 col-md-6 lsf-left">
            <p><?= \Yii::t('app', 'index_ses_for') ?> <a href="<?= Url::toRoute("site/legal") ?>"><?= \Yii::t(
                        'app',
                        'index_ses_leg'
                    ) ?></a></p>
94fc00a8   Eugeny Galkovskiy   main page + carou...
78
          </div>
16a2d769   Alexey Boroda   -Main page SEO
79
80
81
82
83
          <div class="col-xs-12 col-sm-12 col-md-6 lsf-right">
            <p><?= \Yii::t('app', 'index_ses_for') ?> <a href="<?= Url::toRoute("site/individual") ?>"><?= \Yii::t(
                        'app',
                        'index_ses_fiz'
                    ) ?></a></p>
c22b230d   Eugeny Galkovskiy   main
84
          </div>
16a2d769   Alexey Boroda   -Main page SEO
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
        </div>
      </div>
    </section>
    
    <section class="blue-fon why-us-wr no-mg">
      <div class="container">
        <div class="heading text-center">
          <h1 class="h2 big-text"><?= $alias ? $alias->getH1() : Yii::t('app', 'index_why_us') ?></h1>
        </div>
        <div class="why-us container">
          <div class="col-md-12 row">
            <div class="col-xs-12 col-sm-4">
              <div class="box-simple">
                <div class="icon">
                  <img src="/img/icon_1.png">
                </div>
                <div class="h3"><?= \Yii::t('app', 'index_title1') ?></div>
                <p><?= \Yii::t('app', 'index_subtitle1') ?></p>
                <img src="/img/line.png" class="line_why hidden-xs hidden-sm">
4a32dd4e   Eugeny Galkovskiy   main page
104
              </div>
16a2d769   Alexey Boroda   -Main page SEO
105
106
107
108
109
110
111
112
113
            </div>
            <div class="col-xs-12 col-sm-4">
              <div class="box-simple">
                <div class="icon">
                  <img src="/img/icon_2.png">
                </div>
                <div class="h3"><?= \Yii::t('app', 'index_title2') ?></div>
                <p><?= \Yii::t('app', 'index_subtitle2') ?></p>
                <img src="/img/line.png" class="line_why hidden-xs hidden-sm">
06692811   Eugeny Galkovskiy   first commit
114
              </div>
16a2d769   Alexey Boroda   -Main page SEO
115
116
117
118
119
120
121
122
123
124
            </div>
            <div class="col-xs-12 col-sm-4">
              <div class="box-simple">
                <div class="icon">
                  <img src="/img/icon_3.png">
                </div>
                <div class="h3"><?= \Yii::t('app', 'index_title3') ?></div>
                <p><?= \Yii::t('app', 'index_subtitle3') ?></p>
              </div>
            </div>
06692811   Eugeny Galkovskiy   first commit
125
          </div>
16a2d769   Alexey Boroda   -Main page SEO
126
127
128
129
          <div class="col-xs-12 col-sm-4 col-md-offset-2 col-sm-offset-2">
            <div class="box-simple">
              <div class="icon">
                <img src="/img/icon_4.png">
06692811   Eugeny Galkovskiy   first commit
130
              </div>
16a2d769   Alexey Boroda   -Main page SEO
131
132
133
134
135
136
137
138
              <div class="h3"><?= \Yii::t('app', 'index_title4') ?></div>
              <p><?= \Yii::t('app', 'index_subtitle4') ?></p>
            </div>
          </div>
          <div class="col-xs-12 col-sm-4">
            <div class="box-simple">
              <div class="icon">
                <img src="/img/icon_5.png">
4a32dd4e   Eugeny Galkovskiy   main page
139
              </div>
16a2d769   Alexey Boroda   -Main page SEO
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
              <div class="h3"><?= \Yii::t('app', 'index_title5') ?></div>
              <p><?= \Yii::t('app', 'index_subtitle5') ?></p>
            </div>
          </div>
          <div class="col-md-12 col-xs-12">
            <div class="row">
              <div class="box-simple">
                <a href="#" class="btn button1 icon_car modaled init-button-consultation press-specialist" data-title="<?= \Yii::t(
                    'app',
                    'index_data1'
                ) ?>" data-toggle="modal" data-target="#feedback-modal"><?= \Yii::t('app', 'index_modal1') ?>
                  <span><?= \Yii::t('app', 'index_modal2') ?></span></a>
                <a href="#" class="btn button1 icon_calc modaled init-button-consultation press-calculate" data-toggle="modal" data-target="#calculate-modal"><?= \Yii::t(
                        'app',
                        'index_modal3'
                    ) ?> <span><?= \Yii::t('app', 'index_modal4') ?></span></a>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>
    
    <section class="bar background-white objects-main-wr">
      <div class="container">
        <div class="col-md-12">
          <div class="heading text-center">
            <h2 class="h2"><?= \Yii::t('app', 'index_objects') ?></h2>
          </div>
          <div class="row portfolio">
              <?php
              foreach ($objects as $object) {
                  ?>
                <div class="col-sm-6">
                  <div class="box-image">
                    <div class="image">
                      <div class="image_link_wr">
                        <a href="<?= \yii\helpers\Url::toRoute(
                            [
                                'object/view',
                                'alias' => $object->lang->alias,
                            ]
                        ) ?>" class="image_link">
                            <?= $object->image->getImg([]) ?>
                        </a>
87debd40   Eugeny Galkovskiy   our objects
185
                      </div>
16a2d769   Alexey Boroda   -Main page SEO
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
                      <div class="img-title">
                        <table>
                          <tr>
                            <td class="buts text-left">
                              <a href="<?= \yii\helpers\Url::toRoute(
                                  [
                                      'object/view',
                                      'alias' => $object->lang->alias,
                                  ]
                              ) ?>" class="sqre_btn blue_arrow" alt="<?= $object->lang->object_name ?>"></a>
                              <a href="#" class="btn sqre_btn yellow_calc modaled init-button-сalculate press-consultation" data-title="<?= \Yii::t(
                                  'app',
                                  'modal1'
                              ) ?>" data-toggle="modal" data-target="#feedback-modal">
                                <div class="phone_hint"><?= \Yii::t('app', 'get_consult') ?></div>
                              </a>
                            </td>
                            <td class="i-title" valign="center">
                              <p class="pr_title2">
                                <a href="<?= \yii\helpers\Url::toRoute(
                                    [
                                        'object/view',
                                        'alias' => $object->lang->alias,
                                    ]
                                ) ?>">
                                    <?= $object->lang->object_name ?>
                                </a>
                              </p>
                            </td>
                          </tr>
                        </table>
87debd40   Eugeny Galkovskiy   our objects
217
                      </div>
16a2d769   Alexey Boroda   -Main page SEO
218
                    </div>
87debd40   Eugeny Galkovskiy   our objects
219
                  </div>
16a2d769   Alexey Boroda   -Main page SEO
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
                </div>
                  <?php
              }
              ?>
          </div>
          <div class="row">
            <div class="col-md-12 col-xs-12" style="text-align:center;margin-top: 20px;margin-bottom: -35px;">
              <a href='<?= Url::toRoute("object/index") ?>' class="button1 more-projects"><?= Yii::t(
                      'app',
                      'sect2_6'
                  ) ?></a>
            </div>
          </div>
        </div>
      </div>
    </section>
    
    
    <section class="blue-fon no-mg economy-wr">
      <div class="container">
        <div class="heading text-center">
          <h2 class="h2 big-text"><?= \Yii::t('app', 'index_economy1') ?> <br/><?= \Yii::t('app', 'index_economy2') ?>
          </h2>
        </div>
        <div class="row">
          <div class="col-xs-12 col-sm-4">
            <div class="box-simple">
              <div class="icon">
                <img src="/img/icon_sentence.png">
06692811   Eugeny Galkovskiy   first commit
249
              </div>
16a2d769   Alexey Boroda   -Main page SEO
250
251
252
              <div class="h3"><?= \Yii::t('app', 'index_economy3') ?></div>
              <p><?= \Yii::t('app', 'index_economy4') ?></p>
            </div>
06692811   Eugeny Galkovskiy   first commit
253
          </div>
16a2d769   Alexey Boroda   -Main page SEO
254
255
256
257
          <div class="col-xs-12 col-sm-4">
            <div class="box-simple">
              <div class="icon">
                <img src="/img/icon_agreement.png">
4a32dd4e   Eugeny Galkovskiy   main page
258
              </div>
16a2d769   Alexey Boroda   -Main page SEO
259
260
261
262
263
264
265
266
              <div class="h3"><?= \Yii::t('app', 'index_economy5') ?></div>
              <p><?= \Yii::t('app', 'index_economy6') ?></p>
            </div>
          </div>
          <div class="col-xs-12 col-sm-4">
            <div class="box-simple">
              <div class="icon">
                <img src="/img/icon_installation.png">
d4b1055a   Eugeny Galkovskiy   main page
267
              </div>
16a2d769   Alexey Boroda   -Main page SEO
268
269
270
271
272
273
274
275
              <div class="h3"><?= \Yii::t('app', 'index_economy7') ?></div>
              <p><?= \Yii::t('app', 'index_economy8') ?></p>
            </div>
          </div>
          <div class="col-xs-12 col-sm-4">
            <div class="box-simple">
              <div class="icon">
                <img src="/img/icon_tarrif.png">
06692811   Eugeny Galkovskiy   first commit
276
              </div>
16a2d769   Alexey Boroda   -Main page SEO
277
278
279
              <div class="h3"><?= \Yii::t('app', 'index_economy13') ?></div>
              <p><?= \Yii::t('app', 'index_economy14') ?></p>
            </div>
06692811   Eugeny Galkovskiy   first commit
280
          </div>
16a2d769   Alexey Boroda   -Main page SEO
281
282
283
284
          <div class="col-xs-12 col-sm-4">
            <div class="box-simple">
              <div class="icon">
                <img src="/img/icon_service.png">
58d8192e   Eugeny Galkovskiy   translates
285
              </div>
16a2d769   Alexey Boroda   -Main page SEO
286
287
288
              <div class="h3"><?= \Yii::t('app', 'index_economy11') ?></div>
              <p><?= \Yii::t('app', 'index_economy12') ?></p>
            </div>
58d8192e   Eugeny Galkovskiy   translates
289
          </div>
16a2d769   Alexey Boroda   -Main page SEO
290
291
292
293
          <div class="col-xs-12 col-sm-4">
            <div class="box-simple">
              <div class="icon">
                <img src="/img/icon_recomendation.png">
4e5fbc6a   alex   Раскомментил блок...
294
              </div>
16a2d769   Alexey Boroda   -Main page SEO
295
296
297
298
299
300
301
302
303
304
              <div class="h3"><?= \Yii::t('app', 'index_economy9') ?></div>
              <p><?= \Yii::t('app', 'index_economy10') ?></p>
            </div>
          </div>
          <div class="col-md-12 col-xs-12" style="text-align:center;margin-bottom:40px;">
            <a href="#" class="btn button1 icon_stat modaled init-button-order press-order" data-title="<?= \Yii::t(
                'app',
                'modalstation'
            ) ?>" data-toggle="modal" data-target="#feedback-modal"><?= \Yii::t('app', 'index_economy15') ?>
              <span><?= \Yii::t('app', 'index_economy16') ?></span></a>
4e5fbc6a   alex   Раскомментил блок...
305
          </div>
16a2d769   Alexey Boroda   -Main page SEO
306
307
        </div>
      </div>
4e5fbc6a   alex   Раскомментил блок...
308
    </section>
16a2d769   Alexey Boroda   -Main page SEO
309
310
311
312
313
314
315
316
317
318
319
320
321
    <section class="bar background-white no-mg">
      <div class="container">
        <div class="heading text-center">
          <h2><?= \Yii::t('app', 'index_medias1') ?></h2>
        </div>
        <div class="about row">
          <div class="col-md-8 col-sm-12 col-xs-12 smi_left">
            <div class="video">
              <iframe width="100%" height="100%" src="https://www.youtube.com/embed/4XJ_UHggzto" frameborder="0" allowfullscreen=""></iframe>
            </div>
            <div class="text lead quote">
                <?= \Yii::t('app', 'index_medias2') ?>
            </div>
06692811   Eugeny Galkovskiy   first commit
322
          </div>
16a2d769   Alexey Boroda   -Main page SEO
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
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
          <div class="col-md-4 col-sm-12 col-xs-12 smi_right">
            <div class="post video">
              <iframe width="100%" height="100%" src="https://www.youtube.com/embed/NCNqrRzXpTw" frameborder="0" allowfullscreen=""></iframe>
            </div>
            <div class="post" style="background-image: url('/img/post_cover_2.jpg');">
              <a
                rel="nofollow"
                href="http://censor.net.ua/resonance/322240/kak_ya_stal_nezavisimym_ot_veernyh_otklyucheniyi_pervaya_domashnyaya_elektrostantsiya_v_kievskoyi_oblasti"
                target="_blank"
              >
                <div class="title"><?= \Yii::t('app', 'index_medias3') ?></div>
                <div class="blue_arrow"></div>
              </a>
            </div>
            <div class="post" style="background-image: url('/img/post_cover_3.jpg');">
              <a
                rel="nofollow"
                href="https://ecotechnica.com.ua/stati/2927-kakie-solnechnye-elektrostantsii-perspektivnee-kryshnye-ili-nazemnye.html"
                target="_blank"
              >
                <div class="title"><?= \Yii::t('app', 'index_medias4') ?></div>
                <div class="blue_arrow"></div>
              </a>
            </div>
          
          </div>
        </div>
        <div class="col-md-12 col-xs-12" style="text-align:center;margin-top: 20px;margin-bottom: -35px;">
          <a
            href="<?= Url::toRoute(['object/index']) ?>"
            class="button1 more-projects"
          >
              <?= \Yii::t('app', 'more_about_ours') ?>
          </a>
        </div>
      </div>
    </section>
    
    <section class="bar background-gray no-mb partners-wr">
      <div class="container">
        <div class="row">
          <div class="col-md-12">
            <div class="heading text-center">
              <h2><?= \Yii::t('app', 'object_partners') ?></h2>
            </div>
            
            <ul class="owl-carousel customers">
              <li class="item">
                <a href="#" target="_blank"><img src="/img/customer-1.png" alt="" class="img-responsive"></a>
              </li>
              <li class="item">
                <a href="#" target="_blank"><img src="/img/customer-2.png" alt="" class="img-responsive"></a>
              </li>
              <li class="item">
                <a href="#" target="_blank"><img src="/img/customer-3.png" alt="" class="img-responsive"></a>
              </li>
              <li class="item">
                <a href="#" target="_blank"><img src="/img/customer-4.png" alt="" class="img-responsive"></a>
              </li>
              <li class="item">
                <a href="#" target="_blank"><img src="/img/customer-5.png" alt="" class="img-responsive"></a>
              </li>
              <li class="item">
                <a href="#" target="_blank"><img src="/img/customer-6.png" alt="" class="img-responsive"></a>
              </li>
            </ul>
            <!-- /.owl-carousel -->
          </div>
        
        </div>
      </div>
    </section>
      <?php if ($alias) { ?>
        <section class="section-text">
          <div class="container">
            <div class="row">
              <div class="col-xs-12">
                <div class="home-text-wr">
                    <?= $alias->getText() ?>
                </div>
              </div>
            </div>
          </div>
        </section>
      <?php } ?>
    
    <section class="no-mg">
      <div id="map">
      
      </div>
    </section>
  </div>