Commit f0e0b86ffdf8df0ac64bd3f50b650e99bdc924a7
1 parent
c4db9709
fsgxfsgxf
Showing
8 changed files
with
202 additions
and
46 deletions
Show diff stats
frontend/views/layouts/main.php
@@ -164,9 +164,9 @@ use yii\captcha\Captcha; | @@ -164,9 +164,9 @@ use yii\captcha\Captcha; | ||
164 | <?php $form = ActiveForm::begin(['options' => ['enctype'=> 'multipart/form-data','id'=>'call_form'], 'action' => '/']); ?> | 164 | <?php $form = ActiveForm::begin(['options' => ['enctype'=> 'multipart/form-data','id'=>'call_form'], 'action' => '/']); ?> |
165 | <fieldset> | 165 | <fieldset> |
166 | <h3>Обратный звонок</h3> | 166 | <h3>Обратный звонок</h3> |
167 | - <?= $form->field(new Callback(), 'name')->textInput(['maxlength' => 45,'placeholder'=>'Имя'])->label(false) ?><span class='star'>*</span> | 167 | + <?= $form->field(new Callback(), 'name')->textInput(['maxlength' => 45,'placeholder'=>'Имя'])->label(false) ?> |
168 | 168 | ||
169 | - <?= $form->field(new Callback(), 'phone_num')->textInput(['maxlength' => 45,'placeholder'=>'Телефон','class'=>'form-control telephone_registration'])->label(false) ?><span class='star1'>*</span> | 169 | + <?= $form->field(new Callback(), 'phone_num')->textInput(['maxlength' => 45,'placeholder'=>'Телефон','class'=>'form-control telephone_registration'])->label(false) ?> |
170 | 170 | ||
171 | <button class="purple" type="submit" value="Submit">Запросить</button> | 171 | <button class="purple" type="submit" value="Submit">Запросить</button> |
172 | </fieldset> | 172 | </fieldset> |
frontend/views/news/view.php
@@ -19,12 +19,17 @@ $this->params['breadcrumbs'][] = $this->title; | @@ -19,12 +19,17 @@ $this->params['breadcrumbs'][] = $this->title; | ||
19 | </div> | 19 | </div> |
20 | <div class='long_line'></div> | 20 | <div class='long_line'></div> |
21 | <div class="go_news"> | 21 | <div class="go_news"> |
22 | - <?php foreach ($news_list as $one_news):?> | ||
23 | - <div class="back_news"> | ||
24 | - <?= Html::a("<p class='article'>".$one_news->name."</p>",['news/view', 'translit' =>$one_news->code ]) ?> | ||
25 | - <?= Html::a("<p class='short_news'>".$one_news->brief."</p>",['news/view', 'translit' =>$one_news->code ]) ?> | ||
26 | - </div> | ||
27 | - <?php endforeach; ?> | 22 | + |
23 | + <div class="back_news"> | ||
24 | + <?= Html::a("<p class='article'>".$next_news->name."</p>",['news/view', 'translit' =>$next_news->code ]) ?> | ||
25 | + <?= Html::a("<p class='short_news'>".$next_news->brief."</p>",['news/view', 'translit' =>$next_news->code ]) ?> | ||
26 | + </div> | ||
27 | + | ||
28 | + <div class="back_news"> | ||
29 | + <?= Html::a("<p class='article'>".$prev_news->name."</p>",['news/view', 'translit' =>$prev_news->code ]) ?> | ||
30 | + <?= Html::a("<p class='short_news'>".$prev_news->brief."</p>",['news/view', 'translit' =>$prev_news->code ]) ?> | ||
31 | + </div> | ||
32 | + | ||
28 | </div> | 33 | </div> |
29 | </div> | 34 | </div> |
30 | <img src="/images/lonh_line.png" style="margin-top:-20px;opacity:0"> | 35 | <img src="/images/lonh_line.png" style="margin-top:-20px;opacity:0"> |
frontend/views/site/index.php
@@ -577,27 +577,57 @@ use \yii\helpers\Html; | @@ -577,27 +577,57 @@ use \yii\helpers\Html; | ||
577 | </div> | 577 | </div> |
578 | <div class="news"> | 578 | <div class="news"> |
579 | <?= Html::a( 'Новости', Url::toRoute('news/index'),['class'=>'main_link_news'])?> | 579 | <?= Html::a( 'Новости', Url::toRoute('news/index'),['class'=>'main_link_news'])?> |
580 | - <span><img src="/images/arrow_slider_back.png"></span> | ||
581 | - <span class="number_of">1/</span> | ||
582 | - <span class="general_number">5</span> | ||
583 | - <span><img src="/images/arrow_slider_go.png"></span> | ||
584 | - <?php foreach ($news_list as $one_news):?> | ||
585 | - <div class="slider_tovars"> | ||
586 | - <div class="tovar"> | ||
587 | - <?= Html::img(\yii\helpers\Url::to($one_news->img)); ?> | ||
588 | - <?= Html::a("<p class='article'>".$one_news->name."</p>",['news/view', 'translit' =>$one_news->code ]) ?> | ||
589 | - </div> | ||
590 | - </div> | ||
591 | - <?php endforeach; ?> | 580 | +<!-- <span><img src="/images/arrow_slider_back.png"></span>--> |
581 | + <span class="num"></span> | ||
582 | +<!-- <span class="general_number">5</span>--> | ||
583 | +<!-- <span><img src="/images/arrow_slider_go.png"></span>--> | ||
584 | +<!-- --><?php //foreach ($news_list as $one_news):?> | ||
585 | +<!-- <div class="slider_tovars">--> | ||
586 | +<!-- <div class="tovar">--> | ||
587 | +<!-- --><?//= Html::img(\yii\helpers\Url::to($one_news->img)); ?> | ||
588 | +<!-- --><?//= Html::a("<p class='article'>".$one_news->name."</p>",['news/view', 'translit' =>$one_news->code ]) ?> | ||
589 | +<!-- </div>--> | ||
590 | +<!-- </div>--> | ||
591 | +<!-- --><?php //endforeach; ?> | ||
592 | <div class="slider_tovars"> | 592 | <div class="slider_tovars"> |
593 | - <div class="tovar"> | ||
594 | - <img src="/images/news.png"> | ||
595 | - <p>На склад поступила очередная партия товара Metalcaucho. Готов к отгрузке.<br><br> | ||
596 | 593 | ||
597 | - Полный список товаров этой группы доступен по <br><a href="">ссылке</a></p> | 594 | + <div id="carousel-example-generic1" class="carousel slide" data-ride="carousel"> |
595 | +<!-- Indicators--> | ||
596 | + <ol class="carousel-indicators"> | ||
597 | + <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li> | ||
598 | + <li data-target="#carousel-example-generic" data-slide-to="1"></li> | ||
599 | + <li data-target="#carousel-example-generic" data-slide-to="2"></li> | ||
600 | + </ol> | ||
601 | + | ||
602 | + <!-- Wrapper for slides --> | ||
603 | + <div class="carousel-inner" role="listbox"> | ||
604 | + <div class="item tovar active"> | ||
605 | + <img src="/images/news.png"> | ||
606 | + <div class="carousel-caption"> | ||
607 | + <p>На склад поступила очередная партия товара Metalcaucho. Готов к отгрузке.<br><br> | ||
608 | + | ||
609 | + Полный список товаров этой группы доступен по <br><a href="">ссылке</a></p> | ||
610 | + </div> | ||
611 | + </div> | ||
612 | + <div class="item tovar"> | ||
613 | + <img src="/images/news.png"> | ||
614 | + <div class="carousel-caption"> | ||
615 | + <p>На склад поступила очередная партия товара Metalcaucho. Готов к отгрузке.<br><br> | ||
598 | 616 | ||
599 | - </div> | 617 | + Полный список товаров этой группы доступен по <br><a href="">ссылке</a></p> |
618 | + </div> | ||
619 | + </div> | ||
600 | 620 | ||
621 | + </div> | ||
622 | + | ||
623 | + <!-- Controls --> | ||
624 | + <a class="left carousel-control" href="#carousel-example-generic1" role="button" data-slide="prev"> | ||
625 | + <img src="/images/arrow_slider_back.png"> | ||
626 | + </a> | ||
627 | + <a class="right carousel-control" href="#carousel-example-generic1" role="button" data-slide="next"> | ||
628 | + <img src="/images/arrow_slider_go.png"> | ||
629 | + </a> | ||
630 | + </div> | ||
601 | 631 | ||
602 | </div> | 632 | </div> |
603 | </div> | 633 | </div> |
frontend/web/css/about_company.css
frontend/web/css/main.css
@@ -142,7 +142,13 @@ li a{ | @@ -142,7 +142,13 @@ li a{ | ||
142 | margin-bottom: 10px; | 142 | margin-bottom: 10px; |
143 | } | 143 | } |
144 | 144 | ||
145 | -div.required:after {content: " *"; color: #fec831;} | 145 | +div.required:after { content: " *"; |
146 | + color: #fec831; | ||
147 | + display: inline-block; | ||
148 | + position: relative; | ||
149 | + top: -31px; | ||
150 | + left: 40px; | ||
151 | +} | ||
146 | 152 | ||
147 | .registration_holder{ | 153 | .registration_holder{ |
148 | padding-top: 32px; | 154 | padding-top: 32px; |
@@ -181,4 +187,79 @@ div.required:after {content: " *"; color: #fec831;} | @@ -181,4 +187,79 @@ div.required:after {content: " *"; color: #fec831;} | ||
181 | .vin{ | 187 | .vin{ |
182 | width: 960px; | 188 | width: 960px; |
183 | margin: 20px auto; | 189 | margin: 20px auto; |
190 | +} | ||
191 | + | ||
192 | +#modal_form input { | ||
193 | + background-color: #f5f5f5; | ||
194 | + width: 334px; | ||
195 | + height: 30px; | ||
196 | + padding-left: 9px; | ||
197 | + border-radius: 6px; | ||
198 | + border: 1px solid #dfdfdf; | ||
199 | + margin: 8px 114px 20px; | ||
200 | +} | ||
201 | + | ||
202 | +#modal_form #email-error{ | ||
203 | + position: absolute; | ||
204 | + left: 121px; | ||
205 | + top: 150px; | ||
206 | +} | ||
207 | + | ||
208 | +#modal_form input[type="checkbox"] + label span, input[type="checkbox"]:checked + label span { | ||
209 | + position: absolute; | ||
210 | + left: 114px; | ||
211 | + top: 224px; | ||
212 | + -webkit-transition: background 0.4s linear; | ||
213 | + -o-transition: background 0.4s linear; | ||
214 | + -moz-transition: background 0.4s linear; | ||
215 | + transition: background 0.4s linear; | ||
216 | +} | ||
217 | +#modal_form #password-error{ | ||
218 | + position: absolute; | ||
219 | + left: 124px; | ||
220 | + top: 199px; | ||
221 | +} | ||
222 | + | ||
223 | +.star1 { | ||
224 | + color: #fec831; | ||
225 | + position: absolute; | ||
226 | + left: 104px; | ||
227 | + top: 184px; | ||
228 | +} | ||
229 | + | ||
230 | +.has-error .help-block, .has-error .control-label, .has-error .radio, .has-error .checkbox, .has-error .radio-inline, .has-error .checkbox-inline, .has-error.radio label, .has-error.checkbox label, .has-error.radio-inline label, .has-error.checkbox-inline label{ | ||
231 | + position: absolute!important; | ||
232 | + left: 135px!important; | ||
233 | +} | ||
234 | + | ||
235 | +.back_news a:last-child strong span{ | ||
236 | + font-size: 14px!important; | ||
237 | + font-weight: 500; | ||
238 | + display: block; | ||
239 | + margin-left: 61px; | ||
240 | + width: 240px; | ||
241 | + | ||
242 | +} | ||
243 | + | ||
244 | +.back_news:nth-child(2){ | ||
245 | + background-image: url('/images/arrow_slider_go.png'); | ||
246 | + background-repeat: no-repeat; | ||
247 | + background-position: 100% 46%; | ||
248 | +} | ||
249 | +.back_news:nth-child(2){ | ||
250 | + background-image: url('/images/arrow_slider_go.png'); | ||
251 | + background-repeat: no-repeat; | ||
252 | + background-position: 100% 46%; | ||
253 | +} | ||
254 | + | ||
255 | +.back_news:hover{ | ||
256 | + background-image: url('/images/arrow_slider_back.png'); | ||
257 | + background-repeat: no-repeat; | ||
258 | + background-position: 0% 46%; | ||
259 | +} | ||
260 | + | ||
261 | +.back_news:nth-child(2):hover{ | ||
262 | + background-image: url('/images/arrow_slider_go.png'); | ||
263 | + background-repeat: no-repeat; | ||
264 | + background-position: 100% 46%; | ||
184 | } | 265 | } |
185 | \ No newline at end of file | 266 | \ No newline at end of file |
frontend/web/css/news_all.css
frontend/web/css/style.css
@@ -309,9 +309,9 @@ | @@ -309,9 +309,9 @@ | ||
309 | .searching_for_tovars:focus{ | 309 | .searching_for_tovars:focus{ |
310 | outline: none | 310 | outline: none |
311 | } | 311 | } |
312 | -.slider_tovars{ | ||
313 | - width: 730px; | ||
314 | - height: 315px; | 312 | +#carousel-example-generic1{ |
313 | + width: 220px; | ||
314 | + height: 310px; | ||
315 | } | 315 | } |
316 | .car a{ | 316 | .car a{ |
317 | color:#ffffff; | 317 | color:#ffffff; |
@@ -322,7 +322,35 @@ | @@ -322,7 +322,35 @@ | ||
322 | 322 | ||
323 | } | 323 | } |
324 | 324 | ||
325 | +#carousel-example-generic1 .carousel-control.left{ | ||
326 | + background-image: none!important; | ||
327 | + height: 27px; | ||
328 | + top: -35px; | ||
329 | + left: 90px; | ||
330 | +} | ||
325 | 331 | ||
332 | +#carousel-example-generic1 .right.carousel-control{ | ||
333 | + background-image: none!important; | ||
334 | + height: 27px; | ||
335 | + top: -36px; | ||
336 | + right: 42px; | ||
337 | +} | ||
338 | +#carousel-example-generic1 .carousel-caption { | ||
339 | + position: static!important; | ||
340 | + right: 15%; | ||
341 | + bottom: 20px; | ||
342 | + left: 15%; | ||
343 | + z-index: 10; | ||
344 | + padding-top:0!important; | ||
345 | + padding-bottom: 0!important; | ||
346 | + color: inherit!important; | ||
347 | + text-shadow: none!important; | ||
348 | + width: 179px; | ||
349 | +} | ||
350 | + | ||
351 | +#carousel-example-generic1 .carousel-indicators{ | ||
352 | + display: none | ||
353 | +} | ||
326 | .tovar a:hover{ | 354 | .tovar a:hover{ |
327 | color:#a2b5da; | 355 | color:#a2b5da; |
328 | } | 356 | } |
@@ -1917,7 +1945,7 @@ span:first-child .tovars{ | @@ -1917,7 +1945,7 @@ span:first-child .tovars{ | ||
1917 | } | 1945 | } |
1918 | 1946 | ||
1919 | .news .slider_tovars .tovar img{ | 1947 | .news .slider_tovars .tovar img{ |
1920 | - margin-left: -18px; | 1948 | + margin-left: 13px; |
1921 | border:1px solid #dfdfdf; | 1949 | border:1px solid #dfdfdf; |
1922 | } | 1950 | } |
1923 | .news img{ | 1951 | .news img{ |
@@ -2512,27 +2540,29 @@ input[type="checkbox"]:checked + label span { | @@ -2512,27 +2540,29 @@ input[type="checkbox"]:checked + label span { | ||
2512 | 2540 | ||
2513 | 2541 | ||
2514 | 2542 | ||
2515 | - .carousel-indicators { | 2543 | + #carousel-example-generic.carousel-indicators { |
2516 | bottom: 0px; | 2544 | bottom: 0px; |
2517 | } | 2545 | } |
2518 | 2546 | ||
2519 | - .carousel { | 2547 | + #carousel-example-generic .carousel { |
2520 | position: relative; | 2548 | position: relative; |
2521 | - height: 300px; | ||
2522 | } | 2549 | } |
2523 | 2550 | ||
2524 | - .carousel-inner > .item > img, .carousel-inner > .item > a > img { | 2551 | + #carousel-example-generic .carousel-inner > .item > img, .carousel-inner > .item > a > img { |
2525 | line-height: 1; | 2552 | line-height: 1; |
2526 | - height: 300px; | 2553 | + max-height: 300px; |
2554 | + margin: 0 auto; | ||
2527 | } | 2555 | } |
2528 | - | ||
2529 | - .carousel-control.left{ | 2556 | + #carousel-example-generic .carousel-inner > .item{ |
2557 | + height: auto!important; | ||
2558 | + } | ||
2559 | + #carousel-example-generic .carousel-control.left{ | ||
2530 | background-image: url('../images/arrow_back.png'); | 2560 | background-image: url('../images/arrow_back.png'); |
2531 | background-repeat: no-repeat; | 2561 | background-repeat: no-repeat; |
2532 | background-position: 82% 50%; | 2562 | background-position: 82% 50%; |
2533 | } | 2563 | } |
2534 | 2564 | ||
2535 | - .carousel-control.right { | 2565 | + #carousel-example-generic .carousel-control.right { |
2536 | 2566 | ||
2537 | background-image: url('../images/arrow_go.png'); | 2567 | background-image: url('../images/arrow_go.png'); |
2538 | background-repeat: no-repeat; | 2568 | background-repeat: no-repeat; |
@@ -2952,3 +2982,8 @@ input[type="checkbox"]:checked + label span { | @@ -2952,3 +2982,8 @@ input[type="checkbox"]:checked + label span { | ||
2952 | margin-top: -1px; | 2982 | margin-top: -1px; |
2953 | } | 2983 | } |
2954 | 2984 | ||
2985 | +.num{ | ||
2986 | + font-weight: 500; | ||
2987 | + font-size: 22px; | ||
2988 | + margin-left: 26px; | ||
2989 | +} | ||
2955 | \ No newline at end of file | 2990 | \ No newline at end of file |
frontend/web/js/script.js
1 | $(document).ready(function(){ | 1 | $(document).ready(function(){ |
2 | + var totalItems = $('#carousel-example-generic1 .item').length; | ||
3 | + var currentIndex = $('#carousel-example-generic1 .active').index() + 1; | ||
4 | + $('.num').html(''+currentIndex+'/'+totalItems+''); | ||
5 | + $('#carousel-example-generic1').bind('slide.bs.carousel', function() { | ||
6 | + currentIndex = $('#carousel-example-generic1 .active').index() + 1; | ||
7 | + $('.num').html(''+currentIndex+'/'+totalItems+''); | ||
8 | + }); | ||
9 | + | ||
2 | $('.phone_control, .phone_placeholder').click( | 10 | $('.phone_control, .phone_placeholder').click( |
3 | function(){ | 11 | function(){ |
4 | $('.phone_placeholder').toggleClass('active_placeholder'); | 12 | $('.phone_placeholder').toggleClass('active_placeholder'); |
@@ -44,14 +52,6 @@ $('.phone_control, .phone_placeholder').click( | @@ -44,14 +52,6 @@ $('.phone_control, .phone_placeholder').click( | ||
44 | 52 | ||
45 | } | 53 | } |
46 | ); | 54 | ); |
47 | - | ||
48 | - // $('#catalog1').hover(function(){ | ||
49 | - // $('.dropdown_menu_catalog').stop().slideDown(400); | ||
50 | - // $('#by_name').removeClass('active_button'); | ||
51 | - // $('#by_vin').removeClass('active_button'); | ||
52 | - // $('#by_to').removeClass('active_button'); | ||
53 | - // $('#by_articul').removeClass('active_button'); | ||
54 | - // }); | ||
55 | 55 | ||
56 | var $class = 0; | 56 | var $class = 0; |
57 | // $('.choose_tovar .menu_item1').each(function(){ | 57 | // $('.choose_tovar .menu_item1').each(function(){ |