Commit 3153ce64d536d90af50cdfd38ff588111c2a4fb6

Authored by Eugeny Galkovskiy
1 parent 48cf2eb5

lang widget

common/messages/ru/app.php
1 1 <?php
2 2 return [
  3 + 'lang' => '/ru/',
3 4 'Contact us on ' => 'Свяжитесь с нами ',
4 5 ' or ' => ' или ',
5 6 'tel:' => 'по тел.',
... ...
common/messages/ua/app.php
1 1 <?php
2 2 return [
  3 + 'lang' => '/ua/',
3 4 'Contact us on ' => '',
4 5 'menu-about' => 'Про нас',
5 6 'menu-individual' => 'Для фізичних осіб',
... ...
frontend/views/layouts/main.php
... ... @@ -96,10 +96,19 @@
96 96 <div id="all">
97 97 <div id="top">
98 98 <div class="container">
99   - <div class="col-md-6"></div>
100   - <div class="col-md-6 text-right">
  99 + <div class="col-md-10"></div>
  100 + <div class="col-md-2 text-right" style="height:100%;">
101 101 <div class="header-lang">
102   - <?= artbox\core\widgets\LangLink::widget(); ?>
  102 + <?php
  103 + $langs = \Yii::$app->language;
  104 + $langs_a = explode("-",$langs);
  105 + $this_lang = $langs_a['0'];
  106 +
  107 + $langs_head = artbox\core\widgets\LangLink::widget();
  108 + $langs_head = str_replace(" / ","",$langs_head);
  109 + $langs_head = str_replace($this_lang,"",$langs_head);
  110 + echo "<span class='active_lang'>$this_lang</span>".$langs_head;
  111 + ?>
103 112 </div>
104 113 </div>
105 114 </div>
... ... @@ -315,7 +324,7 @@
315 324 ];
316 325 $items[] = [
317 326 'label' => \Yii::t('app', 'menu-mediaabout'),
318   - 'url' => [ 'site/media-about' ],
  327 + 'url' => [ "site/media-about" ],
319 328 ];
320 329 $items[] = [
321 330 'label' => \Yii::t('app', 'menu-blog'),
... ...
frontend/web/css/main.css
... ... @@ -73,7 +73,13 @@ body{position:relative;}
73 73 line-height: 13px;
74 74 cursor: default;
75 75 }
76   -#top {background: #555555;color: #eeeeee;padding: 7px 0 6px;}
  76 +#top {
  77 + background: #f6f6f6;
  78 + color: #000;
  79 + padding: 0;
  80 + height:30px;
  81 +}
  82 +#top>.container{height:100%;}
77 83 #top .social a {
78 84 color: #999999;
79 85 display: inline-block;
... ... @@ -620,8 +626,35 @@ section.bar.background-gray.steps-pre:before {
620 626 }
621 627 .form-comm-wr .form-group.field-commentmodel-text{width:100%;}
622 628 .has-error .help-block{display:block;}
623   -.header-lang{text-transform: uppercase;font-weight: normal;color: #969a9a;font-size: 11px;}
624   -.header-lang a{font-weight: bold;color: #fff;}
  629 +.header-lang{
  630 + height: 100%;
  631 + display: flex;
  632 + justify-content: flex-end;
  633 + align-items: center;
  634 + font-size: 13px;
  635 +}
  636 +.header-lang .active_lang{
  637 + background-color: #e9e7e7;
  638 + height: 30px;
  639 + line-height: 29px;
  640 + padding: 0px 10px;
  641 +}
  642 +.header-lang a{
  643 + background-color: #f6f6f6;
  644 + height: 30px;
  645 + line-height: 29px;
  646 + padding: 0px 10px;
  647 + border: 1px solid #e9e7e7;
  648 + border-top: 0;
  649 + border-bottom: 0;
  650 + margin-left: -1px;
  651 +}
  652 +.header-lang a:hover{
  653 + background-color: #e9e7e7;
  654 + border: 1px solid #cacaca;
  655 + border-top: 0;
  656 + border-bottom: 0;
  657 +}
625 658  
626 659 @media(min-width:1201px){
627 660 .links-ses-for-wr .container .row p {margin: 7px 20px;}
... ...