Commit 716f52bf4fa8a78f72af00318c4ca7921bb15d62
1 parent
7ae1fe78
Commit
Showing
2 changed files
with
32 additions
and
32 deletions
Show diff stats
frontend/views/layouts/main.php
1 | 1 | <?php |
2 | - | |
2 | + | |
3 | 3 | /* @var $this \yii\web\View */ |
4 | 4 | /* @var $content string */ |
5 | - | |
5 | + | |
6 | 6 | use common\modules\comment\models\CommentProject; |
7 | 7 | use yii\helpers\Html; |
8 | 8 | use yii\helpers\Url; |
9 | 9 | use yii\widgets\Menu; |
10 | 10 | use frontend\assets\AppAsset; |
11 | - | |
11 | + | |
12 | 12 | AppAsset::register($this); |
13 | 13 | ?> |
14 | 14 | |
... | ... | @@ -19,12 +19,12 @@ |
19 | 19 | <html lang="<?= Yii::$app->language ?>"> |
20 | 20 | |
21 | 21 | <head> |
22 | - | |
23 | - | |
22 | + | |
23 | + | |
24 | 24 | <meta charset="<?= Yii::$app->charset ?>"> |
25 | - | |
25 | + | |
26 | 26 | <?= Html::csrfMetaTags() ?> |
27 | - | |
27 | + | |
28 | 28 | <title><?= Html::encode($this->title) ?></title> |
29 | 29 | <?php $this->head() ?> |
30 | 30 | |
... | ... | @@ -50,27 +50,27 @@ |
50 | 50 | <div class="header-cabinet-wr"> |
51 | 51 | <?php |
52 | 52 | if(Yii::$app->user->isGuest): ?> |
53 | - <div class="header-cabinet-foto"> | |
54 | - | |
55 | - </div> | |
53 | + <div class="header-cabinet-foto"></div> | |
56 | 54 | <div class="header-cabinet-profile not-login">Профиль</div> |
57 | 55 | <div> |
58 | - <?= Html::a('Вход', [ '/site/login' ], [ 'class' => 'loginLinkModal' ]) ?> | |
59 | - <?= Html::a('Регистрация', [ '/site/registration' ]) ?> | |
56 | + <?= Html::a('Вход', [ '/site/login' ], [ 'class' => 'loginLinkModal header-cabinet-link' ]) ?> | |
57 | + <?= Html::a('Регистрация', [ '/site/registration' ], ['class' => 'header-cabinet-link']) ?> | |
60 | 58 | </div> |
61 | - | |
59 | + | |
62 | 60 | <?php else : ?> |
63 | - <div class="header-cabinet-foto"> | |
64 | - <?php | |
65 | - if(!empty( \Yii::$app->user->identity->userInfo->image )) { | |
66 | - echo Html::img(Yii::$app->user->identity->minImg(Yii::$app->user->identity->userInfo->image, 48, 48)); | |
67 | - } | |
68 | - ?> | |
69 | - </div> | |
61 | + <a href="<?php echo \Yii::$app->user->identity->getLink(); ?>"> | |
62 | + <div class="header-cabinet-foto"> | |
63 | + <?php | |
64 | + if(!empty( \Yii::$app->user->identity->userInfo->image )) { | |
65 | + echo Html::a(Html::img(Yii::$app->user->identity->minImg(Yii::$app->user->identity->userInfo->image, 48, 48)), \Yii::$app->user->identity->getLink()); | |
66 | + } | |
67 | + ?> | |
68 | + </div> | |
69 | + </a> | |
70 | 70 | <div class="header-cabinet-profile">Профиль</div> |
71 | - <?= Html::a(Yii::$app->user->identity->email, [ '/accounts' ]) ?> | |
71 | + <?= Html::a(Yii::$app->user->identity->email, [ '/accounts' ], ['class' => 'header-cabinet-link']) ?> | |
72 | 72 | <?php endif; ?> |
73 | - | |
73 | + | |
74 | 74 | </div> |
75 | 75 | </div> |
76 | 76 | </div> |
... | ... | @@ -140,7 +140,7 @@ |
140 | 140 | </div> |
141 | 141 | </li> |
142 | 142 | </ul> |
143 | - | |
143 | + | |
144 | 144 | <div class="search-main-menu"> |
145 | 145 | <form action="<?= Url::to([ 'search/common' ]) ?>" method="get"> |
146 | 146 | <input value="" name="query" type="text"/> |
... | ... | @@ -169,15 +169,15 @@ |
169 | 169 | 'items' => [ |
170 | 170 | [ |
171 | 171 | 'url' => [ '/projects' ], |
172 | - 'template' => '<a href="{url}" class="main-menu-icons-home">'.((!empty(\Yii::$app->user->identity->commentProjectsActive))?('<span>' . count(\Yii::$app->user->identity->commentProjectsActive) . '</span>'):('')).'</a>', | |
172 | + 'template' => '<a href="{url}" class="main-menu-icons-home">' . ( ( !empty( \Yii::$app->user->identity->commentProjectsActive ) ) ? ( '<span>' . count(\Yii::$app->user->identity->commentProjectsActive) . '</span>' ) : ( '' ) ) . '</a>', | |
173 | 173 | ], |
174 | 174 | [ |
175 | 175 | 'url' => [ 'chat/list' ], |
176 | - 'template' => '<a href="{url}" class="main-menu-icons-edit">'.((!empty(\Yii::$app->user->identity->newMessagesCount))?('<span>' . \Yii::$app->user->identity->newMessagesCount . '</span>'):('')).'</a>', | |
176 | + 'template' => '<a href="{url}" class="main-menu-icons-edit">' . ( ( !empty( \Yii::$app->user->identity->newMessagesCount ) ) ? ( '<span>' . \Yii::$app->user->identity->newMessagesCount . '</span>' ) : ( '' ) ) . '</a>', | |
177 | 177 | ], |
178 | 178 | [ |
179 | 179 | 'url' => [ '/bookmarks' ], |
180 | - 'template' => '<a href="{url}" class="main-menu-icons-copy">'.((!empty(\Yii::$app->user->identity->bookmarks))?('<span>' . count(\Yii::$app->user->identity->bookmarks) . '</span>'):('')).'</a>', | |
180 | + 'template' => '<a href="{url}" class="main-menu-icons-copy">' . ( ( !empty( \Yii::$app->user->identity->bookmarks ) ) ? ( '<span>' . count(\Yii::$app->user->identity->bookmarks) . '</span>' ) : ( '' ) ) . '</a>', | |
181 | 181 | ], |
182 | 182 | ], |
183 | 183 | ]); |
... | ... | @@ -229,7 +229,7 @@ |
229 | 229 | unset( $items ); |
230 | 230 | ?> |
231 | 231 | </div> |
232 | - | |
232 | + | |
233 | 233 | <div class="footer-menu-wrapper second-footer-menu"> |
234 | 234 | <?php |
235 | 235 | $items = [ |
... | ... | @@ -282,7 +282,7 @@ |
282 | 282 | <div class="footer-menu-project-ico-txt">новые проекты</div> |
283 | 283 | </div> |
284 | 284 | </div> |
285 | - | |
285 | + | |
286 | 286 | <div class="footer-menu-wrapper third-footer-menu"> |
287 | 287 | <?php |
288 | 288 | $items = [ |
... | ... | @@ -339,7 +339,7 @@ |
339 | 339 | <div class="footer-menu-project-ico-txt">новости сервера</div> |
340 | 340 | </div> |
341 | 341 | </div> |
342 | - | |
342 | + | |
343 | 343 | <div class="footer-menu-wrapper last-footer-menu"> |
344 | 344 | <?php |
345 | 345 | /* No content |
... | ... | @@ -381,12 +381,12 @@ |
381 | 381 | */ |
382 | 382 | ?> |
383 | 383 | </div> |
384 | - | |
384 | + | |
385 | 385 | </div> |
386 | 386 | </div> |
387 | 387 | </div> |
388 | 388 | </div> |
389 | - | |
389 | + | |
390 | 390 | <div class="section-box artweb-footer-all"> |
391 | 391 | <div class="box-wr"> |
392 | 392 | <div class="box-all"> | ... | ... |
frontend/web/css/style.css