user->identity; $seo = Yii::$app->get('seo'); $feedback = new Feedback(); $settings = Settings::getInstance(); $controller = Yii::$app->controller; $default_controller = Yii::$app->defaultRoute; /** * @var LoginForm $loginForm */ $loginForm = \Yii::createObject( [ 'class' => LoginForm::className(), 'returnUrl' => \Yii::$app->request->absoluteUrl, ] ); /** * @var Newsletter $newsletter */ $newsletter = \Yii::createObject( [ 'class' => Newsletter::className(), ] ); $isHome = ( ( $controller->id === $default_controller ) && ( $controller->action->id === $controller->defaultAction ) ) ? true : false; /** * @var Page[] $pages */ $pages = Page::find() ->where([ 'in_menu' => true ]) ->with('lang.alias') ->orderBy( [ 'sort' => SORT_ASC, 'id' => SORT_ASC, ] ) ->all(); $logo = null; if ($settings->logo) { $logo_img = Image::findOne($settings->logo); if ($logo_img) { $logo = $logo_img->getUrl() ?? $logo; } } $this->registerMetaTag( [ 'name' => 'description', 'content' => $seo->desc, ] ); $js = <<< JS //первый слайдер $(".slider-first").owlCarousel({ responsiveClass: true, navSpeed:150, dots:true, nav:false, items:1 }); //бренды $(".slider-brands").owlCarousel({ responsiveClass: true, responsive: { 0: { items: 2, slideBy: 1 }, 370: { items: 3, slideBy: 1 }, 500: { items: 4, slideBy: 1 }, 660: { items: 5, slideBy: 1 }, 768: { items: 6, slideBy: 1 }, 920: { items: 7, slideBy: 1 }, 1200: { items: 9, slideBy: 1 } }, navSpeed:150, nav:false, dots:false }) //товары + новости var owlArticles = $(".slider-articles, .slider-hit, .slider-sales, .slider-exclusive, .slider-news"); owlArticles.owlCarousel({ // loop:true, responsiveClass: true, responsive: { 0: { items: 1, slideBy: 1 }, 370: { items: 1, slideBy: 1 }, 570: { items: 2, slideBy: 1 }, 768: { items: 3, slideBy: 1 } }, // navSpeed:150, smartSpeed:150, nav:false, dots:false, onInitialized: function(){ owlArticles.next().addClass('vis_ lock'); owlArticles.next().next().addClass('vis_'); } }) $(".btn-r_ ").click(function(){ if(!($(this).hasClass('lock'))){ $(this).parent().find(owlArticles).trigger('next.owl.carousel'); $(this).parent().parent().addClass('substrate') } }) $(".btn-l_ ").click(function() { if(!($(this).hasClass('lock'))){ $(this).parent().find(owlArticles).trigger('prev.owl.carousel'); $(this).parent().parent().addClass('substrate') } }) owlArticles.on('changed.owl.carousel', function(event) { var index = event.item.index; var count = event.item.count; var size = event.page.size; if(index==(count-size)){ $(this).parent().find(".btn-r_ ").addClass('lock') $(this).parent().parent().addClass('substrate').removeClass('substrate') } else { $(this).parent().find(".btn-r_ ").removeClass('lock') } if (index==0){ $(this).parent().find(".btn-l_ ").addClass('lock') } else { $(this).parent().find(".btn-l_ ").removeClass('lock') $(this).parent().parent().addClass('substrate').removeClass('substrate') } }) owlArticles.on('translated.owl.carousel', function(event) { $(this).parent().parent().removeClass('substrate') }) JS; $this->registerJs($js, View::POS_READY); ?> beginPage() ?> <?= Html::encode($seo->title) ?> head() ?> beginBody() ?>
Киев
  • Киев

    (068) 776-60-67

    (095) 282-85-08

    (044) 339-92-33

  • Харьков

    (057) 340-58-88

(068) 776-60-67

(095) 282-85-08

(044) 339-92-33

endBody() ?> endPage() ?>