Blame view

frontend/views/layouts/main.php 7.25 KB
4ca21c3e   Alexey Boroda   first commit
1
  <?php
987739f1   Alexey Boroda   -Simple spoiler
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
34
35
36
37
38
39
40
41
42
43
44
45
46
      /**
       * @var Category[]    $brands_menu
       * @var \yii\web\View $this
       * @var string        $content
       * @var Page[]        $top_menu
       * @var Page[]        $main_menu
       */
      
      use common\models\Page;
      use common\modules\product\models\Category;
      use frontend\assets\AppAsset;
      use yii\helpers\Html;
      use yii\helpers\Url;
      use yii\widgets\Breadcrumbs;
      
      $top_menu = Page::find()
                      ->where([
                          'in_top_menu' => true,
                      ])
                      ->orderBy([
                          'sort_order' => SORT_ASC,
                      ])
                      ->all();
      
      $main_menu = Page::find()
                       ->where([
                           'in_menu' => true,
                       ])
                       ->orderBy([
                           'sort_order' => SORT_ASC,
                       ])
                       ->all();
      
      $this->registerMetaTag([
          'name'    => 'robots',
          'content' => 'noindex,nofollow',
      ]);
      
      AppAsset::register($this);
      
      $brands = Category::find()
                        ->where([
                            'parent_id' => 0,
                        ])
                        ->all();
4ca21c3e   Alexey Boroda   first commit
47
48
49
  ?>
  
  <?php $this->beginPage(); ?>
987739f1   Alexey Boroda   -Simple spoiler
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
      <!DOCTYPE HTML>
      <html lang="<?= Yii::$app->language ?>">
      <head>
          <meta charset="<?= Yii::$app->charset ?>">
          <meta http-equiv="X-UA-Compatible" content="IE=edge">
          <meta name="viewport" content="width=device-width, initial-scale=1">
          <?= Html::csrfMetaTags(); ?>
          <title><?= Html::encode($this->title); ?></title>
          <?php $this->head(); ?>
      </head>
      <body>
      <?php $this->beginBody(); ?>
      <nav class="navbar nav1">
          <ul class="nav navbar-nav">
              <li><a href="<?php echo Url::to('/new-collections'); ?>">Новые коллекции</a></li>
              <li><a href="<?php echo Url::to('/article'); ?>">События</a></li>
              <li><a href="<?php echo Url::to('/blog'); ?>">Блог</a></li>
              <?php foreach($top_menu as $page) { ?>
                  <li><a href="<?php echo Url::to([
                          'site/page',
                          'id' => $page->id,
                      ]); ?>"><?php echo $page->title; ?></a></li>
b224f0ae   Alexey Boroda   Changes:
72
              <?php } ?>
4ca21c3e   Alexey Boroda   first commit
73
          </ul>
987739f1   Alexey Boroda   -Simple spoiler
74
75
76
77
      </nav>
      <header>
          <div class="container">
              <a href="<?php echo Url::home(); ?>" class="main"></a>
4ca21c3e   Alexey Boroda   first commit
78
          </div>
987739f1   Alexey Boroda   -Simple spoiler
79
80
      </header>
      <section class="menu">
eaaa9251   Eugeny Galkovskiy   123
81
          <div class="hidden-md hidden-lg oldsite_down">
71dd93d4   Eugeny Galkovskiy   123
82
              <a href="http://baccara.com.ua/" target="_blank">Старая версия сайта</a>
eaaa9251   Eugeny Galkovskiy   123
83
          </div>
d96f5324   Eugeny Galkovskiy   123
84
          <div class="hidden-md hidden-lg hidemenu">
17b59e0c   Eugeny Galkovskiy   123
85
86
              <a href="#"></a>
          </div>
987739f1   Alexey Boroda   -Simple spoiler
87
          <div class="container">
4ca21c3e   Alexey Boroda   first commit
88
              <ul>
987739f1   Alexey Boroda   -Simple spoiler
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
                  <li><a href="#">Бренды</a>
                      <div class="dropd_menu">
                          <div class="inline_dropb">
                              <?php foreach($brands as $brand) { ?>
                                  <div class="idp_el"><a href="<?php
                                          echo Url::to([
                                              'category/index',
                                              'id' => $brand->category_id,
                                          ])
                                      ?>"><?php echo $brand->name; ?></a></div>
                              <?php } ?>
                          </div>
                          <div style="clear:both;"></div>
                      </div>
                  </li>
                  <li><a href="<?php echo Url::to([
                          'catalog/category',
                          'category' => 'brendy-oboev',
                      ]); ?>">Обои</a></li>
                  <li><a href="<?= Url::to([
                          'catalog/category',
                          'category' => 'brendy-tekstilya',
                      ]) ?>">Текстиль</a></li>
                  <?php foreach($main_menu as $page) { ?>
                      <li><a href="<?php echo Url::to([
                              'site/page',
                              'id' => $page->id,
                          ]); ?>"><?php echo $page->title; ?></a></li>
                  <?php } ?>
4ca21c3e   Alexey Boroda   first commit
118
119
              </ul>
          </div>
987739f1   Alexey Boroda   -Simple spoiler
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
      </section>
      <div class="container cont">
          <div class="col-md-12">
              <?php
                  echo Breadcrumbs::widget([
                      'tag'                => 'div',
                      'options'            => [
                          'class' => 'nav_up',
                      ],
                      'itemTemplate'       => '{link} - ',
                      'activeItemTemplate' => '<span>{link}</span>',
                      'links'              => isset( $this->params[ 'breadcrumbs' ] ) ? $this->params[ 'breadcrumbs' ] : [],
                  ]);
              ?>
              
              <?= $content ?>
4ca21c3e   Alexey Boroda   first commit
136
          </div>
987739f1   Alexey Boroda   -Simple spoiler
137
138
139
140
141
142
143
      </div>
      <footer>
          <div class="container">
              <div class="col-md-3 fleft">
                  <p>© 2006 - 2015 Шоу-рум “BACCARA HOME”</p>
              </div>
              <div class="col-md-3 fcenter col-xs-6">
4ca21c3e   Alexey Boroda   first commit
144
                  <ul>
987739f1   Alexey Boroda   -Simple spoiler
145
146
147
148
149
150
151
152
153
154
155
156
                      <li><a href="<?php echo Url::to([
                              'site/page',
                              'id' => 2,
                          ]); ?>">О нас</a></li>
                      <li><a href="<?php echo Url::to('/new-collections'); ?>">Новые коллекции</a>
                      </li>
                      <li><a href="<?php echo Url::to('/article'); ?>">События</a></li>
                      <li><a href="<?php echo Url::to('/blog'); ?>">Блог</a></li>
                      <li><a href="<?php echo Url::to([
                              'site/page',
                              'id' => 9,
                          ]); ?>">Контакты</a></li>
4ca21c3e   Alexey Boroda   first commit
157
158
                  </ul>
              </div>
987739f1   Alexey Boroda   -Simple spoiler
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
              <div class="col-md-3">
              </div>
              <div class="col-md-3 fright col-xs-6">
                  <div class="socbuts">
                      <ul>
                          <li><a href="https://www.facebook.com/baccaraRoom/?fref=ts" target="_blank"><img src="/images/icon_fb.png"></a>
                          </li>
                          <li>
                              <a href="https://www.instagram.com/baccarahome/" target="_blank"><img src="/images/icon_inst.png"></a>
                          </li>
                          <li>
                              <a href="https://www.youtube.com/channel/UCr6GslF0IhlOwr7XlLsQAbw" target="_blank"><img src="/images/icon_yt.png"></a>
                          </li>
                          <li>
                              <a href="https://www.pinterest.com/baccarahome/?etslf=36773&eq=baccara%20home" target="_blank"><img src="/images/icon_pin.png"></a>
                          </li>
                      </ul>
                  </div>
                  <div class="hours">Часы работы<br/>
                      пн–пт: 10:00 – 19:30<br/>
                      сб: 11:00 – 18:00
                  </div>
                  <div class="aw_logo">
                      <a href="#" target="_blank">Создание сайтов</a>
46c05e6c   Eugeny Galkovskiy   123
183
                  </div>
987739f1   Alexey Boroda   -Simple spoiler
184
              </div>
4ca21c3e   Alexey Boroda   first commit
185
          </div>
987739f1   Alexey Boroda   -Simple spoiler
186
187
188
189
      </footer>
      <?php $this->endBody(); ?>
      </body>
      </html>
4ca21c3e   Alexey Boroda   first commit
190
  <?php $this->endPage(); ?>