Commit 8e23b3abd0722f69c99877d5118201b94e569037
1 parent
87f1520d
- styles and scripts / mobile version
Showing
4 changed files
with
84 additions
and
2 deletions
Show diff stats
frontend/views/layouts/main.php
| ... | ... | @@ -308,18 +308,22 @@ _________________________________________________________ --> |
| 308 | 308 | [ |
| 309 | 309 | 'label' => \Yii::t('app', 'Чому ми'), |
| 310 | 310 | 'url' => [ '../#section1' ], |
| 311 | + 'options' => ['class' => 'scroll-to',], | |
| 311 | 312 | ], |
| 312 | 313 | [ |
| 313 | 314 | 'label' => \Yii::t('app', 'Наші проекти'), |
| 314 | 315 | 'url' => [ '../#section2' ], |
| 316 | + 'options' => ['class' => 'scroll-to',], | |
| 315 | 317 | ], |
| 316 | 318 | [ |
| 317 | 319 | 'label' => \Yii::t('app', '10 кроків до енергонезалежності'), |
| 318 | 320 | 'url' => [ '../#section3' ], |
| 321 | + 'options' => ['class' => 'scroll-to',], | |
| 319 | 322 | ], |
| 320 | 323 | [ |
| 321 | 324 | 'label' => \Yii::t('app', 'Контакти'), |
| 322 | 325 | 'url' => [ '../#section4' ], |
| 326 | + 'options' => ['class' => 'scroll-to',], | |
| 323 | 327 | ], |
| 324 | 328 | ], |
| 325 | 329 | 'options' => [ | ... | ... |
frontend/views/site/index.php
| ... | ... | @@ -375,7 +375,7 @@ $this->registerJs($js, View::POS_END); |
| 375 | 375 | |
| 376 | 376 | - Робота 89 комп'ютерів за 365 днів |
| 377 | 377 | </p> |
| 378 | - <a href="http://fb.com/KBEnergy.UA/" class="button1" target="_blank" style="padding: 18px;width: 300px;font-size: 18px;">Більше наших проектів</a> | |
| 378 | + <a href="http://fb.com/KBEnergy.UA/" class="button1 more-projects" target="_blank">Більше наших проектів</a> | |
| 379 | 379 | </div> |
| 380 | 380 | <div class="col-md-4"> |
| 381 | 381 | <div class="col-md-12 row project-right"> | ... | ... |
frontend/web/css/style.css
| 1 | +.modal{z-index:10500;} | |
| 2 | +.modal-backdrop{z-index:10400;} | |
| 3 | +.modal-open .modal{padding:0!important;} | |
| 4 | +.panel-title{padding-right:15px;} | |
| 5 | + | |
| 1 | 6 | .box-simple h3{letter-spacing: 0.02em;} |
| 2 | 7 | .navbar ul.nav > li > a {letter-spacing: 0.01em;} |
| 3 | 8 | #back-to-top{background: #269cda;} |
| ... | ... | @@ -190,9 +195,79 @@ a.sqre_btn { |
| 190 | 195 | .panel-heading.active a:before{ |
| 191 | 196 | content: "\f107"; |
| 192 | 197 | } |
| 198 | +.more-projects{padding: 18px;width: 300px;font-size: 18px;margin-bottom:40px;} | |
| 193 | 199 | |
| 194 | 200 | |
| 195 | 201 | /* send form buttons */ |
| 196 | 202 | .send-form.btn{ |
| 197 | 203 | display:none; |
| 204 | +} | |
| 205 | + | |
| 206 | +@media(min-width:992px) and (max-width:1199px){ | |
| 207 | + .pr_cover { | |
| 208 | + max-width: 320px; | |
| 209 | + max-height: 180px; | |
| 210 | + overflow: hidden; | |
| 211 | + display: inline-block; | |
| 212 | + width: calc(100% + 15px); | |
| 213 | + height: 0; | |
| 214 | + padding-bottom: 67.087%; | |
| 215 | + position: relative; | |
| 216 | + } | |
| 217 | + .head_video_buttons .button1{margin-bottom: 7px;} | |
| 218 | + .head_video_buttons .button1, .head_video_buttons .button2{ | |
| 219 | + float:none!important; | |
| 220 | + display:block!important; | |
| 221 | + } | |
| 222 | +} | |
| 223 | +@media(max-width:991px){ | |
| 224 | + .background-kben.block-why, .head_video_buttons{ | |
| 225 | + margin-top: 30px; | |
| 226 | + } | |
| 227 | + .pr_cover { | |
| 228 | + max-width: 320px; | |
| 229 | + max-height: 180px; | |
| 230 | + width: 105%; | |
| 231 | + height: 19vh; | |
| 232 | + position: relative; | |
| 233 | + } | |
| 234 | + .project-right .open_gal img { | |
| 235 | + position: absolute; | |
| 236 | + width:100%;height:100%; | |
| 237 | + } | |
| 238 | + #section2{padding: 0!important;} | |
| 239 | +} | |
| 240 | +@media(min-width:768px) and (max-width:991px){ | |
| 241 | + .navbar-brand.home img{ | |
| 242 | + width: 76px; | |
| 243 | + margin-top: 9px; | |
| 244 | + } | |
| 245 | +} | |
| 246 | +@media(max-width:500px){ | |
| 247 | + .head_video_buttons .button1{margin-bottom: 7px;} | |
| 248 | + .head_video_buttons .button1, .head_video_buttons .button2{ | |
| 249 | + float:none!important; | |
| 250 | + display:block!important; | |
| 251 | + } | |
| 252 | + .button1{width:100%;} | |
| 253 | + h2, .h2 {font-size: 6vw;} | |
| 254 | +} | |
| 255 | +@media(max-width:380px){ | |
| 256 | + .more-projects{ | |
| 257 | + padding: 18px; | |
| 258 | + width: 100%!important; | |
| 259 | + font-size: 4.68vw; | |
| 260 | + line-height: 2.5vh; | |
| 261 | + margin-bottom: 50px; | |
| 262 | + } | |
| 263 | +} | |
| 264 | +@media(max-width:280px) { | |
| 265 | + .pr_cover { | |
| 266 | + width:109%; | |
| 267 | + } | |
| 268 | +} | |
| 269 | +@media(max-width:275px){ | |
| 270 | + .head_video_buttons .button1, .head_video_buttons .button2{ | |
| 271 | + width: 100%!important; | |
| 272 | + } | |
| 198 | 273 | } |
| 199 | 274 | \ No newline at end of file | ... | ... |
frontend/web/js/front.js
| ... | ... | @@ -462,7 +462,7 @@ function utils() { |
| 462 | 462 | ); |
| 463 | 463 | /* animated scrolling */ |
| 464 | 464 | |
| 465 | - $('.scroll-to, .scroll-to-top') | |
| 465 | + $('.scroll-to, .scroll-to-top, .scroll-to a, .scroll-to-top a') | |
| 466 | 466 | .click( |
| 467 | 467 | function(event) { |
| 468 | 468 | |
| ... | ... | @@ -472,6 +472,9 @@ function utils() { |
| 472 | 472 | |
| 473 | 473 | scrollTo(full_url); |
| 474 | 474 | event.preventDefault(); |
| 475 | + if($(".navbar-collapse.collapse").hasClass('in')){ | |
| 476 | + $(".navbar-toggle").click(); //закрытие меню на мобильной версии при нажатии ссылки | |
| 477 | + } | |
| 475 | 478 | } |
| 476 | 479 | } |
| 477 | 480 | ); | ... | ... |