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 | <?php | 1 | <?php |
2 | - | 2 | + |
3 | /* @var $this \yii\web\View */ | 3 | /* @var $this \yii\web\View */ |
4 | /* @var $content string */ | 4 | /* @var $content string */ |
5 | - | 5 | + |
6 | use common\modules\comment\models\CommentProject; | 6 | use common\modules\comment\models\CommentProject; |
7 | use yii\helpers\Html; | 7 | use yii\helpers\Html; |
8 | use yii\helpers\Url; | 8 | use yii\helpers\Url; |
9 | use yii\widgets\Menu; | 9 | use yii\widgets\Menu; |
10 | use frontend\assets\AppAsset; | 10 | use frontend\assets\AppAsset; |
11 | - | 11 | + |
12 | AppAsset::register($this); | 12 | AppAsset::register($this); |
13 | ?> | 13 | ?> |
14 | 14 | ||
@@ -19,12 +19,12 @@ | @@ -19,12 +19,12 @@ | ||
19 | <html lang="<?= Yii::$app->language ?>"> | 19 | <html lang="<?= Yii::$app->language ?>"> |
20 | 20 | ||
21 | <head> | 21 | <head> |
22 | - | ||
23 | - | 22 | + |
23 | + | ||
24 | <meta charset="<?= Yii::$app->charset ?>"> | 24 | <meta charset="<?= Yii::$app->charset ?>"> |
25 | - | 25 | + |
26 | <?= Html::csrfMetaTags() ?> | 26 | <?= Html::csrfMetaTags() ?> |
27 | - | 27 | + |
28 | <title><?= Html::encode($this->title) ?></title> | 28 | <title><?= Html::encode($this->title) ?></title> |
29 | <?php $this->head() ?> | 29 | <?php $this->head() ?> |
30 | 30 | ||
@@ -50,27 +50,27 @@ | @@ -50,27 +50,27 @@ | ||
50 | <div class="header-cabinet-wr"> | 50 | <div class="header-cabinet-wr"> |
51 | <?php | 51 | <?php |
52 | if(Yii::$app->user->isGuest): ?> | 52 | if(Yii::$app->user->isGuest): ?> |
53 | - <div class="header-cabinet-foto"> | ||
54 | - | ||
55 | - </div> | 53 | + <div class="header-cabinet-foto"></div> |
56 | <div class="header-cabinet-profile not-login">Профиль</div> | 54 | <div class="header-cabinet-profile not-login">Профиль</div> |
57 | <div> | 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 | </div> | 58 | </div> |
61 | - | 59 | + |
62 | <?php else : ?> | 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 | <div class="header-cabinet-profile">Профиль</div> | 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 | <?php endif; ?> | 72 | <?php endif; ?> |
73 | - | 73 | + |
74 | </div> | 74 | </div> |
75 | </div> | 75 | </div> |
76 | </div> | 76 | </div> |
@@ -140,7 +140,7 @@ | @@ -140,7 +140,7 @@ | ||
140 | </div> | 140 | </div> |
141 | </li> | 141 | </li> |
142 | </ul> | 142 | </ul> |
143 | - | 143 | + |
144 | <div class="search-main-menu"> | 144 | <div class="search-main-menu"> |
145 | <form action="<?= Url::to([ 'search/common' ]) ?>" method="get"> | 145 | <form action="<?= Url::to([ 'search/common' ]) ?>" method="get"> |
146 | <input value="" name="query" type="text"/> | 146 | <input value="" name="query" type="text"/> |
@@ -169,15 +169,15 @@ | @@ -169,15 +169,15 @@ | ||
169 | 'items' => [ | 169 | 'items' => [ |
170 | [ | 170 | [ |
171 | 'url' => [ '/projects' ], | 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 | 'url' => [ 'chat/list' ], | 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 | 'url' => [ '/bookmarks' ], | 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,7 +229,7 @@ | ||
229 | unset( $items ); | 229 | unset( $items ); |
230 | ?> | 230 | ?> |
231 | </div> | 231 | </div> |
232 | - | 232 | + |
233 | <div class="footer-menu-wrapper second-footer-menu"> | 233 | <div class="footer-menu-wrapper second-footer-menu"> |
234 | <?php | 234 | <?php |
235 | $items = [ | 235 | $items = [ |
@@ -282,7 +282,7 @@ | @@ -282,7 +282,7 @@ | ||
282 | <div class="footer-menu-project-ico-txt">новые проекты</div> | 282 | <div class="footer-menu-project-ico-txt">новые проекты</div> |
283 | </div> | 283 | </div> |
284 | </div> | 284 | </div> |
285 | - | 285 | + |
286 | <div class="footer-menu-wrapper third-footer-menu"> | 286 | <div class="footer-menu-wrapper third-footer-menu"> |
287 | <?php | 287 | <?php |
288 | $items = [ | 288 | $items = [ |
@@ -339,7 +339,7 @@ | @@ -339,7 +339,7 @@ | ||
339 | <div class="footer-menu-project-ico-txt">новости сервера</div> | 339 | <div class="footer-menu-project-ico-txt">новости сервера</div> |
340 | </div> | 340 | </div> |
341 | </div> | 341 | </div> |
342 | - | 342 | + |
343 | <div class="footer-menu-wrapper last-footer-menu"> | 343 | <div class="footer-menu-wrapper last-footer-menu"> |
344 | <?php | 344 | <?php |
345 | /* No content | 345 | /* No content |
@@ -381,12 +381,12 @@ | @@ -381,12 +381,12 @@ | ||
381 | */ | 381 | */ |
382 | ?> | 382 | ?> |
383 | </div> | 383 | </div> |
384 | - | 384 | + |
385 | </div> | 385 | </div> |
386 | </div> | 386 | </div> |
387 | </div> | 387 | </div> |
388 | </div> | 388 | </div> |
389 | - | 389 | + |
390 | <div class="section-box artweb-footer-all"> | 390 | <div class="section-box artweb-footer-all"> |
391 | <div class="box-wr"> | 391 | <div class="box-wr"> |
392 | <div class="box-all"> | 392 | <div class="box-all"> |
frontend/web/css/style.css
@@ -287,7 +287,7 @@ ul.header-contacts-menu li:last-child a { | @@ -287,7 +287,7 @@ ul.header-contacts-menu li:last-child a { | ||
287 | margin-left: 13px; | 287 | margin-left: 13px; |
288 | } | 288 | } |
289 | 289 | ||
290 | -.header-cabinet-wr a { | 290 | +.header-cabinet-wr a.header-cabinet-link { |
291 | float: left; | 291 | float: left; |
292 | text-decoration: none; | 292 | text-decoration: none; |
293 | color: #0072bc; | 293 | color: #0072bc; |