ltsecurityinc安防产品在线商城代码
This commit is contained in:
@@ -0,0 +1,95 @@
|
||||
define( [
|
||||
'jquery',
|
||||
'jquery-ui-modules/widget',
|
||||
'jquery-ui-modules/core',
|
||||
'jquery-ui-modules/effect',
|
||||
'owl.carousel',
|
||||
], function ( $ ) {
|
||||
'use strict';
|
||||
|
||||
var animation_text_space = 0;
|
||||
|
||||
$.widget( 'mage.OXBrandsSlider', {
|
||||
options: {
|
||||
// OxBannerSlider
|
||||
autoScroll: 0,
|
||||
slideWidth: 0,
|
||||
slideHeight: 0,
|
||||
// Owl.carousel
|
||||
rewind: false,
|
||||
items: 1,
|
||||
slideBy: 1,
|
||||
responsive: {
|
||||
0: {
|
||||
items: 1,
|
||||
},
|
||||
},
|
||||
dots: false,
|
||||
nav: false,
|
||||
},
|
||||
_create: function () {
|
||||
this.options.responsiveBaseElement = this.element.parent();
|
||||
this.options.autoplayTimeout = parseInt( this.options.autoScroll ) * 1000;
|
||||
this.options.autoplay = 0 < this.options.autoplayTimeout;
|
||||
this.options.autoplayHoverPause = this.options.autoplay;
|
||||
|
||||
var options = this._createOptions();
|
||||
this.element.owlCarousel( options );
|
||||
this.arrows();
|
||||
},
|
||||
|
||||
_createOptions: function () {
|
||||
var _self = this;
|
||||
var options = {
|
||||
onInitialized: function () {
|
||||
_self._resizeSlides( this.$element, this );
|
||||
},
|
||||
onRefreshed: function () {
|
||||
_self._resizeSlides( this.$element, this );
|
||||
},
|
||||
onChanged: function () {
|
||||
var carouselId = this.$element.attr( 'id' );
|
||||
var $wraper = this.$element.closest( '.ox-brand-slider__container' ).eq( 0 );
|
||||
var current = this.current();
|
||||
var $nav = $wraper.find( '#' + carouselId + '_nav' ).toggle( this.settings.items < this.items().length );
|
||||
var disable_nav_min = current === this.minimum();
|
||||
var disable_nav_max = current === this.maximum();
|
||||
if ( this.settings.loop ) {
|
||||
disable_nav_min = disable_nav_max = false;
|
||||
}
|
||||
$nav.find( '.ox-owl-next' ).toggleClass( 'disabled', disable_nav_max );
|
||||
$nav.find( '.ox-owl-prev' ).toggleClass( 'disabled', disable_nav_min );
|
||||
}
|
||||
};
|
||||
|
||||
return $.extend( { }, options, this.options );
|
||||
|
||||
},
|
||||
|
||||
_resizeSlides: function ( $this, owl ) {
|
||||
var carousel = owl.$element;
|
||||
var newWidth = $( owl._items[0] ).width(),
|
||||
newHeight = Math.round( newWidth * this.options.slideHeight / this.options.slideWidth ),
|
||||
ratio = $( owl._items[0] ).width() / this.options.slideWidth;
|
||||
|
||||
$( '.ox-brand__slide .ox-brand-slider__image', carousel ).css( {
|
||||
'transform': 'scale(' + ratio + ')',
|
||||
'-ms-transform': 'scale(' + ratio + ')',
|
||||
'-webkit-transform': 'scale(' + ratio + ')'
|
||||
} );
|
||||
|
||||
$( carousel ).animate( { height: newHeight + 'px' }, 1000, 'easeOutExpo' );
|
||||
},
|
||||
arrows: function () {
|
||||
var $wraper = this.element.closest( '.ox-brand-slider__container' ).eq( 0 );
|
||||
$wraper.on( 'click', '.ox-owl-next', $.proxy( function () {
|
||||
this.element.trigger( 'next.owl.carousel' );
|
||||
}, this ) );
|
||||
$wraper.on( 'click', '.ox-owl-prev', $.proxy( function () {
|
||||
this.element.trigger( 'prev.owl.carousel' );
|
||||
}, this ) );
|
||||
}
|
||||
} );
|
||||
|
||||
return $.mage.OXBrandsSlider;
|
||||
} );
|
||||
@@ -0,0 +1,322 @@
|
||||
@product-widget-title-side-line-color: rgba(107, 107, 107, 0.18);
|
||||
@cols: 20;
|
||||
//
|
||||
// Common
|
||||
// _____________________________________________
|
||||
|
||||
.generateCols(@counter, @prefix) when (@counter > 0) {
|
||||
@width: 100 / @counter;
|
||||
&.columns@{prefix}-@{counter} {
|
||||
.ox-brand__item{
|
||||
-ms-flex: 0 0 ~"@{width}%";
|
||||
flex: 0 0 ~"@{width}%";
|
||||
max-width: ~"@{width}%";
|
||||
}
|
||||
}
|
||||
.generateCols((@counter - 1), @prefix);
|
||||
}
|
||||
& when (@media-common = true) {
|
||||
.widget.ox-brand-slider__container,
|
||||
.widget.block.ox-brand-slider__container,
|
||||
.ox-brand-slider__container{
|
||||
margin:0;
|
||||
}
|
||||
.ox-brand-grid__container,
|
||||
.ox-brand-slider__container{
|
||||
/*.ox-brand__link {
|
||||
display: block;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
line-height: 0;
|
||||
}*/
|
||||
&.hover-default{
|
||||
.ox-brand-slider__image{
|
||||
opacity: .49!important;
|
||||
transition: opacity 0.5s ease-in-out;
|
||||
}
|
||||
a:hover{
|
||||
.ox-brand-slider__image{
|
||||
opacity:1!important;
|
||||
transition: opacity 10ms;
|
||||
}
|
||||
}
|
||||
}
|
||||
.ox-brand-slider__image{
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
margin: auto;
|
||||
position: relative;
|
||||
/*bottom: 0;
|
||||
display: block;
|
||||
height: auto;
|
||||
left: 0;
|
||||
margin: auto;
|
||||
max-width: 100%;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;*/
|
||||
-webkit-transform:scale(1) !important;
|
||||
-moz-transform:scale(1) !important;
|
||||
-o-transform:scale(1) !important;
|
||||
transform:scale(1) !important;
|
||||
}
|
||||
}
|
||||
.ox-brand-slider__container{
|
||||
&.hover-default{
|
||||
a:hover{
|
||||
span{
|
||||
transition: background 10ms;
|
||||
background: rgba(0,0,0,0.04);
|
||||
}
|
||||
}
|
||||
}
|
||||
.owl-carousel{
|
||||
display: block;
|
||||
&:not(.owl-loaded){
|
||||
> * {
|
||||
display: none;
|
||||
opacity:0;
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
/*.ox-brand-slider__image.owl-lazy,
|
||||
.ox-brand-slider__image{
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
margin: auto;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
opacity: .49!important;
|
||||
transition: opacity 0.5s ease-in-out;
|
||||
-webkit-transform:scale(1) !important;
|
||||
-moz-transform:scale(1) !important;
|
||||
-o-transform:scale(1) !important;
|
||||
transform:scale(1) !important;
|
||||
}*/
|
||||
.owl-item {
|
||||
a span{
|
||||
display: block;
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: transparent;
|
||||
transition: background 0.5s ease-in-out;
|
||||
}
|
||||
}
|
||||
.ox-owl-nav{
|
||||
button.owl-next,
|
||||
button.owl-prev{
|
||||
background:#ffffff;
|
||||
width: 22px;
|
||||
height: 25px;
|
||||
span{
|
||||
&:after,
|
||||
&:before{
|
||||
background: #b9b9b9;
|
||||
}
|
||||
}
|
||||
&:after{
|
||||
background:none;
|
||||
}
|
||||
&:hover{
|
||||
background:#000;
|
||||
span{
|
||||
&:after,
|
||||
&:before{
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.disabled{
|
||||
opacity:1;
|
||||
span{
|
||||
opacity:0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.ox-nav-sideline{
|
||||
margin-top: -12px;
|
||||
margin-bottom: -11px;
|
||||
text-align:center;
|
||||
position:relative;
|
||||
overflow:hidden;
|
||||
z-index:2;
|
||||
.ox-owl-nav{
|
||||
display:inline-block;
|
||||
display: -ms-inline-flexbox;
|
||||
display:inline-flex;
|
||||
> button{
|
||||
float:left;
|
||||
}
|
||||
}
|
||||
&:before,
|
||||
&:after{
|
||||
background-color: @product-widget-title-side-line-color;
|
||||
content: "";
|
||||
display: inline-block;
|
||||
height: 1px;
|
||||
position: relative;
|
||||
vertical-align: middle;
|
||||
width: 50%;
|
||||
}
|
||||
&:before{
|
||||
right: 0;
|
||||
}
|
||||
&:after{
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.above-footer-content{
|
||||
.ox-brand-slider__container .ox-nav-sideline{
|
||||
overflow:visible;
|
||||
&:before,
|
||||
&:after{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ox-brand-grid__container{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.generateCols(@counter: 8, @prefix: -s);
|
||||
.ox-brand__item{
|
||||
flex: 0 1 auto;
|
||||
text-align: center;
|
||||
> a{
|
||||
display:block;
|
||||
position:relative;
|
||||
&:before{
|
||||
content:'';
|
||||
display: block;
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: transparent;
|
||||
transition: background 0.5s ease-in-out;
|
||||
}
|
||||
}
|
||||
&:hover{
|
||||
> a{
|
||||
&:before{
|
||||
transition: background 10ms;
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&.hover-overlay,
|
||||
&.hover-default{
|
||||
.ox-brand__item:hover{
|
||||
> a{
|
||||
&:before{
|
||||
transition: background 10ms;
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__s) {
|
||||
.ox-brand-grid__container{
|
||||
.generateCols(@counter: 10, @prefix: -m);
|
||||
}
|
||||
}
|
||||
.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
|
||||
.ox-brand-grid__container{
|
||||
.generateCols(@cols, @prefix: -l);
|
||||
}
|
||||
}
|
||||
.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__l) {
|
||||
.ox-brand-grid__container{
|
||||
.generateCols(@cols, @prefix: ~'');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.header--layout-4 .logo__container, .logo__container{
|
||||
width: 165px !important;
|
||||
}
|
||||
.page-header .ox-megamenu .ox-megamenu-navigation{
|
||||
padding: 0;
|
||||
}
|
||||
@media only screen and (max-width:1800px){
|
||||
.header__item-search .header__search-wrapper > form {
|
||||
width: 335px !important;
|
||||
}
|
||||
.page-header .ox-megamenu .level0 > .level-top, .page-header .navigation .level0 > .level-top, .slide-out-menu--mobile, .header--layout-4 .minicart-wrapper .action.showcart, .ox-nav-sections-item-title .ox-nav-sections-item-switch, .ox-megamenu-navigation > .level0 > .level-top.page-header .ox-megamenu .level0 > .level-top, .page-header .navigation .level0 > .level-top, .slide-out-menu--mobile, .header--layout-4 .minicart-wrapper .action.showcart, .ox-nav-sections-item-title .ox-nav-sections-item-switch, .ox-megamenu-navigation > .level0 > .level-top{
|
||||
font-size: 15px !important;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
.page-header .ox-megamenu .level0 .ox-submenu .category-item > a, .ox-megamenu-navigation .ox-dropdown--simple .category-item a, .ox-slideout .header.links .logged-in, .ox-slideout .header.links a:not(.button), .ox-slideout .switcher .options ul.dropdown a, .ox-slideout .switcher .options .action.toggle strong span, .ox-slideout .switcher .options .action.toggle strong, .ox-dropdown--megamenu > .ox-megamenu__dropdown .ox-megamenu__categories .ox-megamenu-list > .category-item > a{
|
||||
font-size: 15px !important;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width:1635px){
|
||||
.page-header .ox-megamenu .level0 > .level-top, .page-header .navigation .level0 > .level-top, .slide-out-menu--mobile, .header--layout-4 .minicart-wrapper .action.showcart, .ox-nav-sections-item-title .ox-nav-sections-item-switch, .ox-megamenu-navigation > .level0 > .level-top.page-header .ox-megamenu .level0 > .level-top, .page-header .navigation .level0 > .level-top, .slide-out-menu--mobile, .header--layout-4 .minicart-wrapper .action.showcart, .ox-nav-sections-item-title .ox-nav-sections-item-switch, .ox-megamenu-navigation > .level0 > .level-top{
|
||||
font-size: 14px !important;
|
||||
}
|
||||
.page-header .ox-megamenu .level0 .ox-submenu .category-item > a, .ox-megamenu-navigation .ox-dropdown--simple .category-item a, .ox-slideout .header.links .logged-in, .ox-slideout .header.links a:not(.button), .ox-slideout .switcher .options ul.dropdown a, .ox-slideout .switcher .options .action.toggle strong span, .ox-slideout .switcher .options .action.toggle strong, .ox-dropdown--megamenu > .ox-megamenu__dropdown .ox-megamenu__categories .ox-megamenu-list > .category-item > a{
|
||||
font-size: 14px !important;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width:1585px){
|
||||
.page-header .ox-megamenu .level0 > .level-top, .page-header .navigation .level0 > .level-top, .slide-out-menu--mobile, .header--layout-4 .minicart-wrapper .action.showcart, .ox-nav-sections-item-title .ox-nav-sections-item-switch, .ox-megamenu-navigation > .level0 > .level-top.page-header .ox-megamenu .level0 > .level-top, .page-header .navigation .level0 > .level-top, .slide-out-menu--mobile, .header--layout-4 .minicart-wrapper .action.showcart, .ox-nav-sections-item-title .ox-nav-sections-item-switch, .ox-megamenu-navigation > .level0 > .level-top{
|
||||
font-size: 13px !important;
|
||||
}
|
||||
.page-header .ox-megamenu .level0 .ox-submenu .category-item > a, .ox-megamenu-navigation .ox-dropdown--simple .category-item a, .ox-slideout .header.links .logged-in, .ox-slideout .header.links a:not(.button), .ox-slideout .switcher .options ul.dropdown a, .ox-slideout .switcher .options .action.toggle strong span, .ox-slideout .switcher .options .action.toggle strong, .ox-dropdown--megamenu > .ox-megamenu__dropdown .ox-megamenu__categories .ox-megamenu-list > .category-item > a{
|
||||
font-size: 13px !important;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width:1530px){
|
||||
.header__item-search .header__search-wrapper > form {
|
||||
width: 285px !important;
|
||||
}
|
||||
.page-header .ox-megamenu .level0 > .level-top, .page-header .navigation .level0 > .level-top, .slide-out-menu--mobile, .header--layout-4 .minicart-wrapper .action.showcart, .ox-nav-sections-item-title .ox-nav-sections-item-switch, .ox-megamenu-navigation > .level0 > .level-top.page-header .ox-megamenu .level0 > .level-top, .page-header .navigation .level0 > .level-top, .slide-out-menu--mobile, .header--layout-4 .minicart-wrapper .action.showcart, .ox-nav-sections-item-title .ox-nav-sections-item-switch, .ox-megamenu-navigation > .level0 > .level-top{
|
||||
font-size: 12px !important;
|
||||
}
|
||||
.page-header .ox-megamenu .level0 .ox-submenu .category-item > a, .ox-megamenu-navigation .ox-dropdown--simple .category-item a, .ox-slideout .header.links .logged-in, .ox-slideout .header.links a:not(.button), .ox-slideout .switcher .options ul.dropdown a, .ox-slideout .switcher .options .action.toggle strong span, .ox-slideout .switcher .options .action.toggle strong, .ox-dropdown--megamenu > .ox-megamenu__dropdown .ox-megamenu__categories .ox-megamenu-list > .category-item > a{
|
||||
font-size: 12px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width:1450px){
|
||||
.menu-style-3 .page-header .ox-megamenu>ul>.level0>a, .menu-style-3 .page-header .navigation>ul>.level0>a, .menu-style-3 .page-header .ox-megamenu>ul>.level0>.level-top, .menu-style-3 .page-header .navigation>ul>.level0>.level-top{
|
||||
margin: 0 5px !important;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width:1375px){
|
||||
.header--layout-4 .header__content .minicart-wrapper .action.showcart{
|
||||
padding: 0 12px !important;
|
||||
}
|
||||
.header--layout-4 .header__content .flex-right .header__item .button{
|
||||
min-width: 50px !important;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width:1330px){
|
||||
.header__item-search .header__search-wrapper > form {
|
||||
width: 200px !important;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width:1295px){
|
||||
.menu-style-3 .page-header .ox-megamenu>ul>.level0>a, .menu-style-3 .page-header .navigation>ul>.level0>a, .menu-style-3 .page-header .ox-megamenu>ul>.level0>.level-top, .menu-style-3 .page-header .navigation>ul>.level0>.level-top{
|
||||
margin: 0 3px !important;
|
||||
}
|
||||
.header__item-search .header__search-wrapper > form {
|
||||
width: 160px !important;
|
||||
}
|
||||
.header--layout-4 .logo__container, .logo__container{
|
||||
width: 150px !important;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user