Blame view

frontend/views/layouts/main.php 2.08 KB
54f2fc2b   Alexey Boroda   first commit
1
  <?php
fc4126a3   Alexey Boroda   -Some chages
2
3
4
5
6
7
8
      
      /* @var $this \yii\web\View */
      
      /* @var $content string */
      
      use frontend\assets\MaterializeAsset;
      use yii\helpers\Html;
39ba64e5   Alexey Boroda   -Some style added
9
      use yii\helpers\Url;
fc4126a3   Alexey Boroda   -Some chages
10
11
12
13
14
15
16
17
18
19
20
21
22
      use yii\web\View;
      use yii\widgets\Breadcrumbs;
      use frontend\assets\AppAsset;
      use common\widgets\Alert;
      
      AppAsset::register($this);
      MaterializeAsset::register($this);
      
      $js = <<< JS
  $(".button-collapse").sideNav();
  JS;
      
      $this->registerJs($js, View::POS_READY);
54f2fc2b   Alexey Boroda   first commit
23
  
54f2fc2b   Alexey Boroda   first commit
24
25
26
27
  ?>
  <?php $this->beginPage() ?>
  <!DOCTYPE html>
  <html lang="<?= Yii::$app->language ?>">
fc4126a3   Alexey Boroda   -Some chages
28
    <head>
54f2fc2b   Alexey Boroda   first commit
29
30
31
      <meta charset="<?= Yii::$app->charset ?>">
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <meta name="viewport" content="width=device-width, initial-scale=1">
39ba64e5   Alexey Boroda   -Some style added
32
      <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
fc4126a3   Alexey Boroda   -Some chages
33
        <?= Html::csrfMetaTags() ?>
54f2fc2b   Alexey Boroda   first commit
34
      <title><?= Html::encode($this->title) ?></title>
fc4126a3   Alexey Boroda   -Some chages
35
36
37
38
39
40
        <?php $this->head() ?>
    </head>
    <body>
        <?php $this->beginBody() ?>
      
      <div class="wrap">
39ba64e5   Alexey Boroda   -Some style added
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
          
          <?php
              if (!\Yii::$app->getUser()->isGuest) {
                  ?>
                <ul id="slide-out" class="side-nav">
                  
                  <li><a href="<?= Url::to([ 'site/index' ]) ?>"><i class="material-icons">home</i>Home</a></li>
                  <li><a data-method="POST" href="<?= Url::to(
                          [ 'site/logout' ]
                      ) ?>"><i class="material-icons">exit_to_app</i>Logout</a>
                  </li>
                
                </ul>
                <a href="#" data-activates="slide-out" class="button-collapse waves-effect waves-light btn"><i class="material-icons left">menu</i>Menu</a>
                  <?php
              }
          ?>
fc4126a3   Alexey Boroda   -Some chages
58
59
        
        <div class="container">
39ba64e5   Alexey Boroda   -Some style added
60
            
fc4126a3   Alexey Boroda   -Some chages
61
62
63
            <?= Alert::widget() ?>
            <?= $content ?>
        </div>
54f2fc2b   Alexey Boroda   first commit
64
      </div>
fc4126a3   Alexey Boroda   -Some chages
65
66
67
68
69
70
71
72
73
      
      <footer class="footer">
        <div class="container">
          <p class="pull-left">&copy; Calls - ArtWeb <?= date('Y') ?></p>
        </div>
      </footer>
        
        <?php $this->endBody() ?>
    </body>
54f2fc2b   Alexey Boroda   first commit
74
75
  </html>
  <?php $this->endPage() ?>