ltsecurityinc安防产品在线商城代码
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Magento creates more than one full-page loader role. Keep the selectors
|
||||
* scoped to direct body children so component-level loaders remain local.
|
||||
*/
|
||||
body[data-container="body"] > .loading-mask[data-role="loader"],
|
||||
body[data-container="body"] > .loading-mask[data-role="main-css-loader"],
|
||||
body[data-container="body"] > .loading-mask[data-role="checkout-loader"] {
|
||||
position: fixed !important;
|
||||
z-index: 10050 !important;
|
||||
inset: 0 !important;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
margin: 0 !important;
|
||||
background: rgba(0, 0, 0, .78) !important;
|
||||
cursor: wait;
|
||||
}
|
||||
|
||||
body[data-container="body"] > .loading-mask[data-role="loader"] .loader,
|
||||
body[data-container="body"] > .loading-mask[data-role="main-css-loader"] .loader,
|
||||
body[data-container="body"] > .loading-mask[data-role="checkout-loader"] .loader {
|
||||
position: fixed !important;
|
||||
top: 50% !important;
|
||||
left: 50% !important;
|
||||
width: 140px !important;
|
||||
height: 70px !important;
|
||||
margin: 0 !important;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
body[data-container="body"] > .loading-mask[data-role="loader"] .loader > img,
|
||||
body[data-container="body"] > .loading-mask[data-role="main-css-loader"] .loader > img,
|
||||
body[data-container="body"] > .loading-mask[data-role="checkout-loader"] .loader > img {
|
||||
position: static !important;
|
||||
display: block !important;
|
||||
box-sizing: border-box !important;
|
||||
width: 140px !important;
|
||||
height: 70px !important;
|
||||
max-width: none !important;
|
||||
margin: 0 !important;
|
||||
padding: 0 0 0 140px !important;
|
||||
overflow: hidden;
|
||||
background: url('../images/lts-footer/lts-logo.png') center center / contain no-repeat !important;
|
||||
animation: lts-global-loader-pulse 1.35s ease-in-out infinite;
|
||||
}
|
||||
|
||||
body[data-container="body"] > .loading-mask[data-role="loader"] .loader > p,
|
||||
body[data-container="body"] > .loading-mask[data-role="main-css-loader"] .loader > p,
|
||||
body[data-container="body"] > .loading-mask[data-role="checkout-loader"] .loader > p {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
@keyframes lts-global-loader-pulse {
|
||||
0%, 100% {
|
||||
opacity: .58;
|
||||
transform: scale(.96);
|
||||
}
|
||||
50% {
|
||||
opacity: 1;
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
body[data-container="body"] > .loading-mask[data-role="loader"] .loader > img,
|
||||
body[data-container="body"] > .loading-mask[data-role="main-css-loader"] .loader > img,
|
||||
body[data-container="body"] > .loading-mask[data-role="checkout-loader"] .loader > img {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 520px) {
|
||||
body[data-container="body"] > .loading-mask[data-role="loader"] .loader,
|
||||
body[data-container="body"] > .loading-mask[data-role="loader"] .loader > img,
|
||||
body[data-container="body"] > .loading-mask[data-role="main-css-loader"] .loader,
|
||||
body[data-container="body"] > .loading-mask[data-role="main-css-loader"] .loader > img,
|
||||
body[data-container="body"] > .loading-mask[data-role="checkout-loader"] .loader,
|
||||
body[data-container="body"] > .loading-mask[data-role="checkout-loader"] .loader > img {
|
||||
width: 120px !important;
|
||||
height: 60px !important;
|
||||
}
|
||||
|
||||
body[data-container="body"] > .loading-mask[data-role="loader"] .loader > img,
|
||||
body[data-container="body"] > .loading-mask[data-role="main-css-loader"] .loader > img,
|
||||
body[data-container="body"] > .loading-mask[data-role="checkout-loader"] .loader > img {
|
||||
padding-left: 120px !important;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,814 @@
|
||||
// /**
|
||||
// * Copyright © Magento, Inc. All rights reserved.
|
||||
// * See COPYING.txt for license details.
|
||||
// */
|
||||
|
||||
//
|
||||
// Theme variables
|
||||
// _____________________________________________
|
||||
@text-color-dark: #322c29;
|
||||
|
||||
// Messages
|
||||
@message-global-note__background: @color-yellow-light2;
|
||||
@message-global-note__border-color: @color-yellow-light3;
|
||||
@message-global-note__color: @text__color;
|
||||
|
||||
@message-global-note-link__color: @link__color;
|
||||
@message-global-note-link__color-hover: @link__hover__color;
|
||||
@message-global-note-link__color-active: @link__active__color;
|
||||
|
||||
@message-global-caution__background: @color-red9;
|
||||
@message-global-caution__border-color: none;
|
||||
@message-global-caution__color: @color-white;
|
||||
|
||||
@message-global-caution-link__color: @link__color;
|
||||
@message-global-caution-link__color-hover: @link__hover__color;
|
||||
@message-global-caution-link__color-active: @link__active__color;
|
||||
|
||||
// Header
|
||||
@header__background-color: false;
|
||||
@header-icons-color: @color-gray56;
|
||||
@header-icons-color-hover: @color-gray20;
|
||||
|
||||
@addto-color: @text__color__muted;
|
||||
@addto-hover-color: @primary__color;
|
||||
|
||||
@minicart-icons-color: @header-icons-color;
|
||||
@minicart-icons-color-hover: @header-icons-color-hover;
|
||||
|
||||
@button__shadow: none;
|
||||
|
||||
@h1__margin-bottom__desktop: @indent__xl;
|
||||
|
||||
// Footer
|
||||
@footer__background-color: #000000;
|
||||
//@link__transition: all 600ms ease-in-out;
|
||||
.tiny-arrow-ba(){
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 16px;
|
||||
right: 10px;
|
||||
width: 4px;
|
||||
background: #969696;
|
||||
height: 1px;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
.switcher-fn() {
|
||||
line-height: 35px;
|
||||
display: inline-block;
|
||||
.switcher-label{
|
||||
display:none;
|
||||
}
|
||||
.options {
|
||||
.lib-dropdown(
|
||||
@_dropdown-actions-padding: 0 24px 0 11px,
|
||||
@_dropdown-list-item-padding: 0,
|
||||
@_dropdown-list-margin-top : 0,
|
||||
@_dropdown-list-border: 0,
|
||||
@_icon-font-size: 11px,
|
||||
@_icon-font-line-height: 18px,
|
||||
@_dropdown-list-min-width: 130px,
|
||||
@_dropdown-list-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.15),
|
||||
@_dropdown-list-background: #ffffff,
|
||||
);
|
||||
.action.toggle{
|
||||
strong{
|
||||
font-weight: normal;
|
||||
}
|
||||
&:before{
|
||||
.tiny-arrow-ba();
|
||||
right: 12px;
|
||||
transform: rotateZ(40deg);
|
||||
}
|
||||
&:after{
|
||||
.tiny-arrow-ba();
|
||||
transform: rotateZ(-40deg);
|
||||
}
|
||||
}
|
||||
ul.dropdown {
|
||||
padding:15px;
|
||||
a {
|
||||
.lib-link(
|
||||
@_link-color: @text-color-dark,
|
||||
@_link-text-decoration: none,
|
||||
@_link-color-visited: @text-color-dark,
|
||||
@_link-text-decoration-visited: none,
|
||||
@_link-color-hover: @text-color-dark,
|
||||
@_link-text-decoration-hover: none,
|
||||
@_link-color-active: @text-color-dark,
|
||||
@_link-text-decoration-active: none
|
||||
);
|
||||
display: block;
|
||||
padding: 1px 7px;
|
||||
white-space: nowrap;
|
||||
line-height: 18px;
|
||||
}
|
||||
&:before,
|
||||
&:after {
|
||||
content:none;
|
||||
}
|
||||
li{
|
||||
.fast-anim();
|
||||
line-height: 18px;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.store,
|
||||
&.language {
|
||||
.options{
|
||||
ul.dropdown {
|
||||
a{
|
||||
padding: 2px 10px 2px 27px;
|
||||
background: 5px 50% no-repeat;
|
||||
}
|
||||
}
|
||||
strong {
|
||||
line-height: 35px;
|
||||
margin:0;
|
||||
span{
|
||||
padding: 0 0 0 24px;
|
||||
background: none 0% 50% no-repeat;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.noflags{
|
||||
.options{
|
||||
ul.dropdown {
|
||||
a{
|
||||
padding-left:10px;
|
||||
}
|
||||
}
|
||||
strong {
|
||||
span{
|
||||
padding-left:0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
// Common
|
||||
// _____________________________________________
|
||||
|
||||
& when (@media-common = true) {
|
||||
.ox-expand{
|
||||
&.minimized{
|
||||
.ox-expand__inner{
|
||||
display:block;
|
||||
max-height: 90px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
.ox-expand__link{
|
||||
.more{
|
||||
display:inline-block;
|
||||
}
|
||||
.less{
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
}
|
||||
.ox-expand__link{
|
||||
.less,
|
||||
.more{
|
||||
cursor: pointer;
|
||||
border-bottom: 1px solid;
|
||||
}
|
||||
.more{
|
||||
display:none;
|
||||
margin-top: 5px;
|
||||
|
||||
}
|
||||
.less{
|
||||
display: inline-block;
|
||||
margin-top: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
.lib-css(background-color, @page__background-color);
|
||||
}
|
||||
a {
|
||||
-webkit-transition: @link__transition;
|
||||
-moz-transition: @link__transition;
|
||||
-o-transition: @link__transition;
|
||||
transition: @link__transition;
|
||||
&:hover{
|
||||
-webkit-transition: all 10ms ease-in-out;
|
||||
-moz-transition: all 10ms ease-in-out;
|
||||
-o-transition: all 10ms ease-in-out;
|
||||
transition: all 10ms ease-in-out;
|
||||
}
|
||||
}
|
||||
/*._keyfocus *:focus, */
|
||||
input:not([disabled]):focus, textarea:not([disabled]):focus, select:not([disabled]):focus {
|
||||
box-shadow: none;
|
||||
}
|
||||
//
|
||||
// Header
|
||||
// ---------------------------------------------
|
||||
|
||||
.page-header {
|
||||
.lib-css(background-color, @header__background-color);
|
||||
border-bottom: none;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.header {
|
||||
&.content {
|
||||
&:extend(.abs-add-clearfix all);
|
||||
padding-top: @indent__s;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
.logo {
|
||||
float: left;
|
||||
margin: 0 0 @indent__s @indent__xl;
|
||||
max-width: 50%;
|
||||
position: relative;
|
||||
z-index: 5;
|
||||
|
||||
img {
|
||||
display: block;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.page-print & {
|
||||
float: none;
|
||||
}
|
||||
}
|
||||
|
||||
.page-main {
|
||||
> .page-title-wrapper {
|
||||
.page-title + .action {
|
||||
margin-top: @indent__l;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.action.skip {
|
||||
&:not(:focus) {
|
||||
&:extend(.abs-visually-hidden all);
|
||||
}
|
||||
|
||||
&:focus {
|
||||
.lib-css(background, @color-gray94);
|
||||
.lib-css(padding, @indent__s);
|
||||
box-sizing: border-box;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
z-index: 15;
|
||||
}
|
||||
}
|
||||
|
||||
.action-skip-wrapper {
|
||||
height: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
//
|
||||
// Global notice
|
||||
// ---------------------------------------------
|
||||
|
||||
.message.global {
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
&.noscript,
|
||||
&.cookie {
|
||||
.lib-message(@_message-type: global-note);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
&.cookie {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
z-index: 3;
|
||||
|
||||
.actions {
|
||||
margin-top: @indent__s;
|
||||
}
|
||||
}
|
||||
|
||||
&.demo {
|
||||
.lib-message(@_message-type: global-caution);
|
||||
margin-bottom: 0;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
//
|
||||
// Copyright
|
||||
// ---------------------------------------------
|
||||
.copyright-footer{
|
||||
background-color: #141414;
|
||||
padding: 30px 0;
|
||||
color: #666666;
|
||||
font-family: @content-font;
|
||||
a{
|
||||
color: #888888;
|
||||
&:hover,
|
||||
&:focus{
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
small{
|
||||
font-size: 12px;
|
||||
line-height: 1.4;
|
||||
display: block;
|
||||
}
|
||||
.copyright-right{
|
||||
text-align: right;
|
||||
}
|
||||
.container{
|
||||
padding-right: 20px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
&.copyright-layout-2{
|
||||
padding: 80px 0;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
@media (max-width: 768px){
|
||||
.copyright-footer{
|
||||
.copyright-right{
|
||||
text-align: left;
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.athlete_footer_customer_service{
|
||||
> span,
|
||||
> h6{
|
||||
margin:0 0 10px 0;
|
||||
&:last-child{
|
||||
margin-bottom:0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px){
|
||||
.athlete_footer_customer_service{
|
||||
ms-flex-pack: end;
|
||||
justify-content: flex-end;
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap!important;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-ms-flex-preferred-size: 0;
|
||||
flex-basis: 0;
|
||||
-ms-flex-positive: 1;
|
||||
flex-grow: 1;
|
||||
max-width: 100%;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
> span,
|
||||
> h6{
|
||||
margin: 0 0 0 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
// Footer
|
||||
// ---------------------------------------------
|
||||
|
||||
.page-footer {
|
||||
.lib-css(background-color, @footer__background-color);
|
||||
margin-top: auto;
|
||||
.switcher{
|
||||
.switcher-fn();
|
||||
&:hover .toggle strong,
|
||||
.toggle.active strong{
|
||||
color:#000;
|
||||
}
|
||||
.action.toggle{
|
||||
.simple-animation();
|
||||
strong{
|
||||
.simple-animation();
|
||||
}
|
||||
}
|
||||
&:hover{
|
||||
.action.toggle{
|
||||
background:@main-color;
|
||||
}
|
||||
}
|
||||
.options ul.dropdown{
|
||||
top: auto;
|
||||
bottom:100%;
|
||||
padding:20px;
|
||||
a {
|
||||
line-height: 1.6;
|
||||
}
|
||||
}
|
||||
&.store,
|
||||
&.language {
|
||||
.options{
|
||||
ul.dropdown {
|
||||
a{
|
||||
padding: 4px 10px 4px 31px;
|
||||
background: 8px 50% no-repeat;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.footer-block-content{
|
||||
float: left;
|
||||
padding: 24px 0 0;
|
||||
width: 100%;
|
||||
transform: translateZ(0);
|
||||
}
|
||||
.footer-block-content-after{
|
||||
.lib-clearfix();
|
||||
width: 100%;
|
||||
float: left;
|
||||
margin: 30px 0 0 0;
|
||||
padding: 40px 0 0;
|
||||
border-top: 1px solid rgba(255,255,255,0.15);
|
||||
}
|
||||
.footer {
|
||||
&.content {
|
||||
.lib-clearfix();
|
||||
font-family: @content-font;
|
||||
border-top: none;
|
||||
color: #a8a8a8;
|
||||
padding-bottom: 40px;
|
||||
ul {
|
||||
&:extend(.abs-reset-list all);
|
||||
> li {
|
||||
margin: 0 0 4px;
|
||||
}
|
||||
margin-bottom:35px;
|
||||
}
|
||||
h1, h2, h3, h4, h5, h6{
|
||||
color:#ffffff;
|
||||
}
|
||||
|
||||
.switcher-store {
|
||||
margin: 0 0 30px;
|
||||
}
|
||||
a{
|
||||
display: inline-block;
|
||||
color: #a8a8a8;
|
||||
text-decoration: none;
|
||||
&:hover{
|
||||
background-color: @main-color;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
a:not(.button){
|
||||
line-height: 14px;
|
||||
padding: 2px 5px 3px;
|
||||
font-size: 12px;
|
||||
}
|
||||
li > a{
|
||||
margin-left: -2px;
|
||||
}
|
||||
}
|
||||
|
||||
.copyright,
|
||||
.bugs {
|
||||
display: block;
|
||||
margin: 20px 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.ox-slideout{
|
||||
.switcher {
|
||||
.switcher-label{
|
||||
text-transform: uppercase;
|
||||
font-weight: @font-weight__black;
|
||||
margin-bottom: 10px;
|
||||
font-size:16px;
|
||||
display: none;
|
||||
}
|
||||
.options {
|
||||
padding-left: 10px;
|
||||
/*padding-top: 7px;*/
|
||||
.action.toggle{
|
||||
position:relative;
|
||||
z-index: 2;
|
||||
strong{
|
||||
font-weight: normal;
|
||||
span{
|
||||
padding: 5px 9px;
|
||||
display: inline-block;
|
||||
text-transform: uppercase;
|
||||
font-weight: @font-weight__bold;
|
||||
color: #ffffff;
|
||||
background-color: #000000;
|
||||
margin-left: -9px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
ul.dropdown {
|
||||
padding:0;
|
||||
list-style: none;
|
||||
a {
|
||||
display: block;
|
||||
padding: 5px 0;
|
||||
white-space: nowrap;
|
||||
text-transform: uppercase;
|
||||
font-weight: @font-weight__bold;
|
||||
}
|
||||
&:before,
|
||||
&:after {
|
||||
content:none;
|
||||
}
|
||||
li{
|
||||
line-height: 18px;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.store,
|
||||
&.language {
|
||||
.options{
|
||||
ul.dropdown {
|
||||
a{
|
||||
padding-left: 24px;
|
||||
background: none 0% 50% no-repeat;
|
||||
|
||||
}
|
||||
}
|
||||
.action.toggle{
|
||||
strong {
|
||||
span{
|
||||
padding-left: 33px;
|
||||
background: 9px 50% no-repeat;
|
||||
background-color: #000000;
|
||||
margin-left: -9px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Widgets
|
||||
// ---------------------------------------------
|
||||
|
||||
.sidebar {
|
||||
.widget.block:not(:last-child),
|
||||
.widget:not(:last-child) {
|
||||
&:extend(.abs-margin-for-blocks-and-widgets all);
|
||||
}
|
||||
}
|
||||
.sidebar-additional{
|
||||
rs-module-wrap,
|
||||
.rev_slider_wrapper{
|
||||
margin-bottom: 15px!important;
|
||||
}
|
||||
.block{
|
||||
border: 0;
|
||||
position:relative;
|
||||
padding: 0 20px;
|
||||
margin-bottom: 15px;
|
||||
background-color: #f8f8f8;
|
||||
.block-title {
|
||||
padding: 25px 0 15px;
|
||||
> strong {
|
||||
.lib-heading(h5);
|
||||
font-weight: @font-weight__black;
|
||||
letter-spacing: -0.03em;
|
||||
text-transform:uppercase;
|
||||
line-height: .9;
|
||||
}
|
||||
}
|
||||
&:before{
|
||||
content: '';
|
||||
height: 6px;
|
||||
width: 100%;
|
||||
background: @main-color;
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
&:last-child{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
> .empty,
|
||||
> .block-content{
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
.sidebar-nobg{
|
||||
.sidebar-additional{
|
||||
.block{
|
||||
padding:0;
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
&.page-layout-3columns,
|
||||
&.page-layout-2columns-right{
|
||||
.sidebar-additional {
|
||||
.block:first-child {
|
||||
&:before {
|
||||
content:none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.widget {
|
||||
clear: both;
|
||||
|
||||
.block-title {
|
||||
&:extend(.abs-block-title all);
|
||||
}
|
||||
}
|
||||
/*
|
||||
.page-header,
|
||||
.page-footer {
|
||||
.widget.block {
|
||||
.lib-css(margin, @indent__base 0);
|
||||
}
|
||||
}*/
|
||||
|
||||
.no-display {
|
||||
&:extend(.abs-no-display all);
|
||||
}
|
||||
|
||||
//
|
||||
// Calendar
|
||||
// ---------------------------------------------
|
||||
|
||||
.ui-datepicker {
|
||||
td {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Desktop
|
||||
// _____________________________________________
|
||||
|
||||
.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
|
||||
|
||||
html,
|
||||
body {
|
||||
height: 100%; // Stretch screen area for sticky footer
|
||||
}
|
||||
|
||||
.page-wrapper {
|
||||
.lib-vendor-prefix-display(flex);
|
||||
.lib-vendor-prefix-flex-direction(column);
|
||||
min-height: 100%; // Stretch content area for sticky footer
|
||||
|
||||
> .breadcrumbs,
|
||||
> .top-container,
|
||||
> .widget {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.ie10 &,
|
||||
.ie11 & {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
&.content {
|
||||
padding-bottom: 50px;
|
||||
padding-top: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
.header {
|
||||
&.panel {
|
||||
> .header.links {
|
||||
float: right;
|
||||
font-size: 0;
|
||||
.lib-list-inline();
|
||||
margin-left: auto;
|
||||
|
||||
> li {
|
||||
font-size: @font-size__base;
|
||||
margin: 0 0 0 15px;
|
||||
|
||||
&.welcome,
|
||||
a {
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
&.welcome {
|
||||
a {
|
||||
.lib-css(padding-left, @indent__xs);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.content {
|
||||
&:extend(.abs-add-clearfix-desktop all);
|
||||
padding: @indent__l @indent__base 0;
|
||||
}
|
||||
}
|
||||
.page-header {
|
||||
.switcher {
|
||||
.options {
|
||||
.action.toggle{
|
||||
position:relative;
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.page-header {
|
||||
.switcher{
|
||||
.switcher-fn();
|
||||
}
|
||||
}
|
||||
.page-header {
|
||||
border: 0;
|
||||
margin-bottom: 0;
|
||||
|
||||
.panel.wrapper {
|
||||
border-bottom: 1px solid @secondary__color;
|
||||
}
|
||||
|
||||
.header.panel {
|
||||
&:extend(.abs-add-clearfix-desktop all);
|
||||
padding-bottom: @indent__s;
|
||||
padding-top: @indent__s;
|
||||
}
|
||||
}
|
||||
|
||||
.page-main {
|
||||
> .page-title-wrapper {
|
||||
.page-title {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.page-title + .action {
|
||||
float: right;
|
||||
margin-top: @indent__base;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.footer-block-content{
|
||||
padding: 26px 0 0;
|
||||
}
|
||||
.footer--layout-1{
|
||||
.footer-block-content{
|
||||
max-width: 64%;
|
||||
padding: 26px 20px 0 0;
|
||||
}
|
||||
}
|
||||
.footer--layout-4,
|
||||
.footer--layout-2{
|
||||
.footer.content{
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
}
|
||||
.footer {
|
||||
&.content {
|
||||
.block {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.links {
|
||||
display: inline-block;
|
||||
margin-bottom: 20px;
|
||||
padding: 0 50px 0 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
/*
|
||||
.switcher.store {
|
||||
display: inline-block;
|
||||
padding-right: 50px;
|
||||
vertical-align: top;
|
||||
}*/
|
||||
}
|
||||
|
||||
.copyright {
|
||||
&:extend(.abs-add-clearfix all);
|
||||
}
|
||||
}
|
||||
.footer-block-content-after{
|
||||
margin-bottom:-10px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 9.2 KiB |
|
After Width: | Height: | Size: 400 B |
|
After Width: | Height: | Size: 975 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 923 B |
|
After Width: | Height: | Size: 634 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 244 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 276 KiB |
|
After Width: | Height: | Size: 342 KiB |
|
After Width: | Height: | Size: 442 KiB |
|
After Width: | Height: | Size: 531 KiB |
|
After Width: | Height: | Size: 244 KiB |
|
After Width: | Height: | Size: 213 KiB |
|
After Width: | Height: | Size: 348 KiB |
|
After Width: | Height: | Size: 684 KiB |
@@ -0,0 +1,154 @@
|
||||
define(['jquery'], function ($) {
|
||||
'use strict';
|
||||
|
||||
return function (config, element) {
|
||||
var $root = $(element),
|
||||
$track = $root.find('.lts-announcement__track'),
|
||||
$items = $track.children('.lts-announcement__item'),
|
||||
itemCount = $items.length,
|
||||
delay = Math.max(1000, Number(config.delay) || 3000),
|
||||
duration = Math.max(300, Number(config.duration) || 1200),
|
||||
current = 0,
|
||||
timer = null,
|
||||
delayStartedAt = 0,
|
||||
delayRemaining = delay,
|
||||
animation = null,
|
||||
hovered = false,
|
||||
focused = false,
|
||||
reducedMotion = window.matchMedia
|
||||
&& window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
||||
|
||||
if (itemCount < 2 || reducedMotion) {
|
||||
$root.addClass('is-static');
|
||||
$items.eq(0).attr('aria-hidden', 'false');
|
||||
$items.slice(1).attr('aria-hidden', 'true');
|
||||
return;
|
||||
}
|
||||
|
||||
var $firstClone = $items.eq(0).clone(false)
|
||||
.removeClass('is-active is-leaving')
|
||||
.addClass('lts-announcement__item--clone')
|
||||
.attr('aria-hidden', 'true')
|
||||
.attr('tabindex', '-1');
|
||||
|
||||
$items.removeClass('is-active is-leaving').attr('aria-hidden', 'true');
|
||||
$items.eq(0).attr('aria-hidden', 'false');
|
||||
$track.append($firstClone);
|
||||
|
||||
function shouldPause() {
|
||||
return hovered || focused || document.hidden;
|
||||
}
|
||||
|
||||
function schedule() {
|
||||
window.clearTimeout(timer);
|
||||
timer = null;
|
||||
|
||||
if (shouldPause() || animation) {
|
||||
return;
|
||||
}
|
||||
|
||||
delayStartedAt = Date.now();
|
||||
timer = window.setTimeout(function () {
|
||||
timer = null;
|
||||
delayRemaining = delay;
|
||||
slideNext();
|
||||
}, delayRemaining);
|
||||
}
|
||||
|
||||
function finishSlide(nextIndex) {
|
||||
var endTransform = 'translate3d(-' + (nextIndex * 100) + '%, 0, 0)';
|
||||
|
||||
$track.css('transform', endTransform);
|
||||
|
||||
if (animation) {
|
||||
animation.onfinish = null;
|
||||
animation.cancel();
|
||||
animation = null;
|
||||
}
|
||||
|
||||
current = nextIndex;
|
||||
|
||||
if (current === itemCount) {
|
||||
$track.css('transform', 'translate3d(0, 0, 0)');
|
||||
current = 0;
|
||||
}
|
||||
|
||||
$items.attr('aria-hidden', 'true');
|
||||
$items.eq(current).attr('aria-hidden', 'false');
|
||||
delayRemaining = delay;
|
||||
schedule();
|
||||
}
|
||||
|
||||
function slideNext() {
|
||||
var nextIndex,
|
||||
startTransform,
|
||||
endTransform;
|
||||
|
||||
if (shouldPause() || animation) {
|
||||
return;
|
||||
}
|
||||
|
||||
nextIndex = current + 1;
|
||||
startTransform = 'translate3d(-' + (current * 100) + '%, 0, 0)';
|
||||
endTransform = 'translate3d(-' + (nextIndex * 100) + '%, 0, 0)';
|
||||
|
||||
animation = $track[0].animate([
|
||||
{transform: startTransform},
|
||||
{transform: endTransform}
|
||||
], {
|
||||
duration: duration,
|
||||
easing: 'linear',
|
||||
fill: 'forwards'
|
||||
});
|
||||
animation.onfinish = function () {
|
||||
finishSlide(nextIndex);
|
||||
};
|
||||
}
|
||||
|
||||
function pause() {
|
||||
if (timer) {
|
||||
delayRemaining = Math.max(0, delayRemaining - (Date.now() - delayStartedAt));
|
||||
window.clearTimeout(timer);
|
||||
timer = null;
|
||||
}
|
||||
|
||||
if (animation && animation.playState === 'running') {
|
||||
animation.pause();
|
||||
}
|
||||
}
|
||||
|
||||
function resume() {
|
||||
if (shouldPause()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (animation && animation.playState === 'paused') {
|
||||
animation.play();
|
||||
} else {
|
||||
schedule();
|
||||
}
|
||||
}
|
||||
|
||||
$root.on('mouseenter', function () {
|
||||
hovered = true;
|
||||
pause();
|
||||
});
|
||||
$root.on('mouseleave', function () {
|
||||
hovered = false;
|
||||
resume();
|
||||
});
|
||||
$root.on('focusin', function () {
|
||||
focused = true;
|
||||
pause();
|
||||
});
|
||||
$root.on('focusout', function () {
|
||||
focused = false;
|
||||
resume();
|
||||
});
|
||||
$(document).on('visibilitychange.ltsAnnouncement', function () {
|
||||
document.hidden ? pause() : resume();
|
||||
});
|
||||
|
||||
schedule();
|
||||
};
|
||||
});
|
||||
@@ -0,0 +1,470 @@
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/* Theme JS */
|
||||
require([
|
||||
'jquery',
|
||||
'mage/cookies',
|
||||
'domReady!'
|
||||
], function ($) {
|
||||
'use strict';
|
||||
/* dynamic input size for overlay search */
|
||||
$.fn.textWidth = function (text, font) {
|
||||
if (!$.fn.textWidth.fakeEl) $.fn.textWidth.fakeEl = $('<span>').hide().appendTo(document.body);
|
||||
$.fn.textWidth.fakeEl.text(text || this.val() || this.text() || this.attr('placeholder')).css({
|
||||
'font': font || this.css('font'),
|
||||
'text-transform': 'uppercase',
|
||||
'letter-spacing': this.css('letter-spacing')
|
||||
});
|
||||
return $.fn.textWidth.fakeEl.width();
|
||||
};
|
||||
$('.width-dynamic').on('input', function () {
|
||||
var inputWidth = $(this).textWidth() + 40; //40 is padding
|
||||
$(this).css({
|
||||
width: inputWidth
|
||||
})
|
||||
}).trigger('input');
|
||||
$('.width-dynamic').on('blur',function () {
|
||||
if (!$(this).val().length) {
|
||||
$(this).css({
|
||||
width: ''
|
||||
})
|
||||
}
|
||||
});
|
||||
/* input plus minus */
|
||||
$("body").on('click', ".qty-controls-wrap .qty-plus", function (event) {
|
||||
event.preventDefault();
|
||||
var _input = $(this).parent().find('input');
|
||||
_input.val(parseInt(_input.val()) + 1);
|
||||
_input.change();
|
||||
$(this).parent().find('button.update-cart-item').show();
|
||||
|
||||
});
|
||||
$("body").on('click', ".qty-controls-wrap .qty-minus", function (event) {
|
||||
event.preventDefault();
|
||||
var _input = $(this).parent().find('input');
|
||||
var min = parseInt(_input.attr('min'), 10);
|
||||
min = isNaN(min) ? 0 : min;
|
||||
var count = parseInt(_input.val()) - 1;
|
||||
count = count < min ? min : count;
|
||||
_input.val(count).change();
|
||||
$(this).parent().find('button.update-cart-item').show();
|
||||
|
||||
});
|
||||
$("body").on('change', ".qty-controls-wrap input", function () {
|
||||
var $this = $(this);
|
||||
var min = parseInt($this.attr('min'), 10);
|
||||
min = isNaN(min) ? 0 : min;
|
||||
var val = parseInt($this.val(), 10);
|
||||
var max = 100000;
|
||||
val = Math.min(val, max);
|
||||
val = Math.max(val, min);
|
||||
if (isNaN(val)) {
|
||||
val = 1;
|
||||
}
|
||||
$this.val(val);
|
||||
$this.trigger('keypress');
|
||||
});
|
||||
|
||||
|
||||
/* Filter toggle */
|
||||
var item = $('.block.filter, .filters-slideout-content').find('.filter-options, .filter-current'),
|
||||
itemContent = item.find('.filter-options-content, .ox-toggle-content');
|
||||
|
||||
if (item.length) {
|
||||
item.each(function () {
|
||||
if ($(this).hasClass('collapsible')) {
|
||||
if ($(this).hasClass('open')) {
|
||||
$(this).find(itemContent).slideDown(function () {
|
||||
$('body').trigger('oxToggleUpdated');
|
||||
});
|
||||
} else {
|
||||
$(this).find(itemContent).slideUp(function () {
|
||||
$('body').trigger('oxToggleUpdated');
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
$(document).on('click', '.filter-options-title, .filter-current-subtitle', function (e) {
|
||||
e.preventDefault();
|
||||
var speed = 300;
|
||||
var thisParent = $(this).parent(),
|
||||
nextLevel = $(this).next('.filter-options-content, .ox-toggle-content');
|
||||
if (thisParent.hasClass('collapsible')) {
|
||||
if (thisParent.hasClass('open')) {
|
||||
thisParent.removeClass('open');
|
||||
nextLevel.slideUp(speed, function () {
|
||||
$('body').trigger('oxToggleUpdated');
|
||||
});
|
||||
} else {
|
||||
thisParent.addClass('open');
|
||||
nextLevel.slideDown(speed, function () {
|
||||
$('body').trigger('oxToggleUpdated');
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.ox_toggles = function () {
|
||||
var $this = $(this);
|
||||
$this.each(function () {
|
||||
if ($(this).hasClass('collapsible')) {
|
||||
if ($(this).hasClass('open')) {
|
||||
$(this).find(itemContent).slideDown();
|
||||
} else {
|
||||
$(this).find(itemContent).slideUp();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$this.on('click', '.ox-toggle-title', function (e) {
|
||||
e.preventDefault();
|
||||
var speed = 300;
|
||||
var thisParent = $(this).parent(),
|
||||
nextLevel = $(this).next('.ox-toggle-content');
|
||||
if (thisParent.hasClass('collapsible')) {
|
||||
if (thisParent.hasClass('open')) {
|
||||
thisParent.removeClass('open');
|
||||
nextLevel.slideUp(speed, function () {
|
||||
$('body').trigger('oxToggleUpdated');
|
||||
});
|
||||
} else {
|
||||
thisParent.addClass('open');
|
||||
nextLevel.slideDown(speed, function () {
|
||||
$('body').trigger('oxToggleUpdated');
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
};
|
||||
$('.ox-toggle').ox_toggles();
|
||||
|
||||
/* Collapsible text */
|
||||
$('body').off('click.OXExpand').on('click.OXExpand', '.ox-expand .ox-expand__link', function (e) {
|
||||
e.preventDefault();
|
||||
var $this = $(this).closest('.ox-expand').eq(0),
|
||||
max_height = $this.data('max-height') || 90,
|
||||
isMin = $this.hasClass('minimized');
|
||||
$this.toggleClass('minimized', !isMin)
|
||||
.children('.ox-expand__inner')
|
||||
.attr("aria-expanded", isMin ? "true" : "false")
|
||||
.css('max-height', isMin ? '100%' : max_height);
|
||||
});
|
||||
$(function () {
|
||||
$('.ox-expand').each(function () {
|
||||
let $this = $(this),
|
||||
$inner = $this.find('.ox-expand__inner'),
|
||||
max_height = $this.data('max-height') || 90;
|
||||
if (parseInt($inner.css('height')) < max_height) {
|
||||
let isMin = true;
|
||||
$this.toggleClass('minimized', !isMin)
|
||||
.children('.ox-expand__inner')
|
||||
.attr("aria-expanded", isMin ? "true" : "false")
|
||||
.css('max-height', isMin ? '100%' : max_height);
|
||||
$this.find('.ox-expand__link').hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
require([
|
||||
'jquery',
|
||||
'jquery-ui-modules/effect',
|
||||
'domReady!'
|
||||
], function ($) {
|
||||
/* cms banner animation */
|
||||
var debounce = function (func, wait, immediate) {
|
||||
var timeout, args, context, timestamp, result;
|
||||
return function () {
|
||||
context = this;
|
||||
args = arguments;
|
||||
timestamp = new Date();
|
||||
var later = function () {
|
||||
var last = (new Date()) - timestamp;
|
||||
if (last < wait) {
|
||||
timeout = setTimeout(later, wait - last);
|
||||
} else {
|
||||
timeout = null;
|
||||
if (!immediate)
|
||||
result = func.apply(context, args);
|
||||
}
|
||||
};
|
||||
var callNow = immediate && !timeout;
|
||||
if (!timeout) {
|
||||
timeout = setTimeout(later, wait);
|
||||
}
|
||||
if (callNow)
|
||||
result = func.apply(context, args);
|
||||
return result;
|
||||
};
|
||||
};
|
||||
$.fn.OxBanner = function () {
|
||||
|
||||
var cmsBanner = $(this);
|
||||
var cmsBannerText = cmsBanner.find('.ox-banner-animated-container');
|
||||
|
||||
if (!cmsBannerText.length)
|
||||
return;
|
||||
|
||||
$('.text', cmsBanner).wrap('<div class="animation-wrapper animation-text" />');
|
||||
$('.link', cmsBanner).wrap('<div class="animation-wrapper animation-link" />');
|
||||
$(' br', cmsBannerText).hide();
|
||||
|
||||
var initTitle = function () {
|
||||
//$('.text, .link', cmsBanner).removeAttr('style');
|
||||
$('.animation-wrapper', cmsBanner).removeAttr('style').css({visibility: 'hidden'}).attr({'data-width': '', 'data-height': ''});
|
||||
|
||||
cmsBannerText.css('visibility', 'visible');
|
||||
$('.text, .link', cmsBanner).each(function () {
|
||||
var w = $(this).outerWidth(),
|
||||
h = $(this).outerHeight();
|
||||
|
||||
$(this).parent()
|
||||
.attr('data-width', w)
|
||||
.attr('data-height', h)
|
||||
.width(0)
|
||||
.height(h);
|
||||
});
|
||||
/*
|
||||
$( '.ox-banner-animated-container.center', cmsBanner ).each( function () {
|
||||
$( this ).css( 'marginTop', parseInt( ( $( this ).parent().height() - $( this ).height() ) / 2 ) + 'px' );
|
||||
} );*/
|
||||
};
|
||||
|
||||
var showTitle = function () {
|
||||
initTitle();
|
||||
$('.animation-wrapper', cmsBannerText).each(function (i) {
|
||||
$(this)
|
||||
.css('visibility', 'visible')
|
||||
.delay(32 * i)
|
||||
.queue(function (next) {
|
||||
$(this).animate({width: $(this).attr('data-width')}, 256, 'easeOutExpo');
|
||||
next();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
//banner hover
|
||||
$('body').on('mouseenter', '.ox-banner',
|
||||
function () {
|
||||
$('.ox-banner-animated-container .animation-wrapper', this).each(function (i) {
|
||||
$(this)
|
||||
.delay(64 * (i))
|
||||
.queue(function (next) {
|
||||
$(this).addClass('animate-me');
|
||||
next();
|
||||
});
|
||||
});
|
||||
}).on('mouseleave', '.ox-banner',
|
||||
function () {
|
||||
$('.ox-banner-animated-container .animation-wrapper', this).each(function (i) {
|
||||
$(this)
|
||||
.delay(64 * i)
|
||||
.queue(function (next) {
|
||||
$(this).removeClass('animate-me');
|
||||
next();
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
setTimeout(function () {
|
||||
showTitle();
|
||||
$(window).on('resize', function () {
|
||||
$('.animation-wrapper', cmsBannerText).css({width: 0});
|
||||
debounce(showTitle, 400);
|
||||
});
|
||||
$(window).on('resize', debounce(showTitle, 400));
|
||||
}, 1000);
|
||||
};
|
||||
$('.ox-banner-animated-text').OxBanner();
|
||||
|
||||
|
||||
});
|
||||
|
||||
require(['jquery', 'matchMedia'], function ($) {
|
||||
$(function () {
|
||||
var _this = '.header__item-account-links',
|
||||
_class = 'store.links',
|
||||
mediaBreakpoint = '(min-width: 1025px)';
|
||||
if (_this.length) {
|
||||
mediaCheck({
|
||||
media: mediaBreakpoint,
|
||||
entry: function () {
|
||||
var $this = $(_this),
|
||||
$desktop_parent = $('[data-move-desktop="header.myaccount"]').eq(0),
|
||||
position = $this.data('moveDesktopPosition') || 0;
|
||||
if (!$desktop_parent.length || $this.parent().is($desktop_parent)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var element = $this.detach();
|
||||
if (0 < position) {
|
||||
var prev = $desktop_parent.children().eq(position - 1);
|
||||
if (prev.length) {
|
||||
prev.after(element);
|
||||
} else {
|
||||
$desktop_parent.append(element);
|
||||
}
|
||||
} else {
|
||||
$desktop_parent.append(element);
|
||||
}
|
||||
},
|
||||
exit: function () {
|
||||
var $this = $(_this),
|
||||
$mobile_parent = $('[data-move-mobile="' + _class + '"]').eq(0);
|
||||
if (!$this.length || !$mobile_parent.length || $this.parent().is($mobile_parent)) {
|
||||
return;
|
||||
}
|
||||
$this.data('moveDesktopPosition', $this.parent().children().index($this));
|
||||
var element = $this.detach();
|
||||
$mobile_parent.append(element);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/* resize fullheight menu if its width bigger than the header area */
|
||||
require(["jquery", "domReady!"], function ($) {
|
||||
"use strict";
|
||||
$(function () {
|
||||
var menu2 = $('.menu-style-2'),
|
||||
menu4 = $('.menu-style-4'),
|
||||
menu5 = $('.menu-style-5'),
|
||||
headerContent = $('.page-header'),
|
||||
headerLeft = headerContent.find('.ox-megamenu-navigation'),
|
||||
headerLeftWidth = headerLeft.innerWidth();
|
||||
|
||||
function debouncer(func, timeout) {
|
||||
var timeoutID, timeout = timeout || 500;
|
||||
return function () {
|
||||
var scope = this,
|
||||
args = arguments;
|
||||
clearTimeout(timeoutID);
|
||||
timeoutID = setTimeout(function () {
|
||||
func.apply(scope, Array.prototype.slice.call(args));
|
||||
}, timeout);
|
||||
}
|
||||
}
|
||||
|
||||
var calcMenuWidth = function () {
|
||||
headerLeft = headerContent.find('.ox-megamenu-navigation');
|
||||
if ((menu2.length || menu4.length || menu5.length) && headerLeft.length && $(window).width() > 1024) {
|
||||
var count = 0,
|
||||
padding = 0;
|
||||
if( menu5.length){
|
||||
padding = 24;
|
||||
}
|
||||
headerLeftWidth = headerLeft.innerWidth() - padding;
|
||||
headerLeft.find("> li").each(function () {
|
||||
count += $(this).outerWidth(true);
|
||||
});
|
||||
$('body').toggleClass('ox-mm-resize', headerLeftWidth < count);
|
||||
}
|
||||
};
|
||||
calcMenuWidth();
|
||||
$(window).on('resize', function () {
|
||||
debouncer(calcMenuWidth());
|
||||
setTimeout(function () {
|
||||
debouncer(calcMenuWidth());
|
||||
}, 150);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// require(["jquery"], function ($) {
|
||||
// "use strict";
|
||||
// $(function () {
|
||||
// $('.block-search.block-search--type-panel button.action-search').on('click', function (event) {
|
||||
// event.preventDefault();
|
||||
// event.stopPropagation();
|
||||
|
||||
// $(this).closest('.block-search').eq(0).find('form').trigger('submit');
|
||||
// });
|
||||
// });
|
||||
// });
|
||||
|
||||
require(["jquery"], function ($) {
|
||||
"use strict";
|
||||
$(function () {
|
||||
function searchInputFocus() {
|
||||
$(".js-input-focus").each(function () {
|
||||
if ($(this).val().length) {
|
||||
searchInputFocusTrigger(this);
|
||||
}
|
||||
});
|
||||
}
|
||||
searchInputFocus();
|
||||
$('body').on('modal_opened.OXmodal', function(){
|
||||
var $searchModal = $(".ox-slideout-top ");
|
||||
if($searchModal.length){
|
||||
if ($searchModal.hasClass('active')) {
|
||||
searchInputFocus();
|
||||
}
|
||||
}
|
||||
});
|
||||
function searchInputFocusTrigger(element) {
|
||||
$(element).closest(".control").addClass('input-focused');
|
||||
$("html").addClass('ox-search-focused');
|
||||
}
|
||||
$(document).on('focus', '.js-input-focus', function(){
|
||||
searchInputFocusTrigger(this);
|
||||
}).on('blur', '.js-input-focus', function () {
|
||||
if (!$(this).val().length) {
|
||||
$(this).closest(".control").removeClass('input-focused');
|
||||
$("html").removeClass('ox-search-focused');
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
require(["jquery"], function ($) {
|
||||
"use strict";
|
||||
$(function () {
|
||||
//check device type
|
||||
//touch on IOS and Android
|
||||
var isAndroid = /(android)/i.test(navigator.userAgent);
|
||||
var isMobile = /(mobile)/i.test(navigator.userAgent);
|
||||
if (navigator.userAgent.match(/(iPod|iPhone|iPad)/) || isAndroid || isMobile) {
|
||||
$('html').addClass('touch').removeClass('no-touch');
|
||||
} else {
|
||||
$('html').addClass('no-touch').removeClass('touch');
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
require(["jquery"], function ($) {
|
||||
"use strict";
|
||||
$(function () {
|
||||
|
||||
var $toTop = $("#toTop");
|
||||
if ($toTop.length > 0) {
|
||||
$(window).on('scroll', function () {
|
||||
if ($(this).scrollTop() > 100) {
|
||||
$toTop.show();
|
||||
} else {
|
||||
$toTop.hide();
|
||||
}
|
||||
});
|
||||
$toTop.on("click", function () {
|
||||
$('body,html').animate({
|
||||
scrollTop: 0
|
||||
}, 256);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,81 @@
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
define([
|
||||
'jquery',
|
||||
'uiComponent',
|
||||
'Magento_Customer/js/customer-data',
|
||||
'underscore',
|
||||
'escaper',
|
||||
'jquery/jquery-storageapi'
|
||||
], function ($, Component, customerData, _, escaper) {
|
||||
'use strict';
|
||||
|
||||
return Component.extend({
|
||||
defaults: {
|
||||
cookieMessages: [],
|
||||
messages: [],
|
||||
allowedTags: ['div', 'span', 'b', 'strong', 'i', 'em', 'u', 'a'],
|
||||
timeout: 10,
|
||||
},
|
||||
|
||||
/**
|
||||
* Extends Component object by storage observable messages.
|
||||
*/
|
||||
initialize: function () {
|
||||
this._super();
|
||||
|
||||
this.cookieMessages = _.unique($.cookieStorage.get('mage-messages'), 'text');
|
||||
this.messages = customerData.get('messages').extend({
|
||||
disposableCustomerData: 'messages'
|
||||
});
|
||||
|
||||
// Force to clean obsolete messages
|
||||
if (!_.isEmpty(this.messages().messages)) {
|
||||
customerData.set('messages', {});
|
||||
}
|
||||
|
||||
$.mage.cookies.set('mage-messages', '', {
|
||||
samesite: 'strict',
|
||||
domain: ''
|
||||
});
|
||||
},
|
||||
updateHeight: function () {
|
||||
$('body').trigger('oxToggleUpdated');
|
||||
|
||||
return true;
|
||||
},
|
||||
closeMessage: function () {
|
||||
$('[role="alert"]').on('click close.messages', '[data-action="close"]', function (event) {
|
||||
event.preventDefault();
|
||||
let $this = $(this).hide(),
|
||||
$parent = $this.parent('[data-ui-id]').removeAttr('data-ui-id').removeAttr('class');
|
||||
$parent.find('[data-bind^="html"]').text('');
|
||||
});
|
||||
if ($('body').hasClass('ox-messages-fixed')) {
|
||||
if (this.timer) {
|
||||
clearTimeout(this.timer);
|
||||
}
|
||||
this.timer = setTimeout(function () {
|
||||
$('[role="alert"] [data-action="close"]').trigger('close.messages');
|
||||
}, this.timeout * 1000);
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
/**
|
||||
* Prepare the given message to be rendered as HTML
|
||||
*
|
||||
* @param {String} message
|
||||
* @return {String}
|
||||
*/
|
||||
prepareMessageForHtml: function (message) {
|
||||
return escaper.escapeHtml(message, this.allowedTags);
|
||||
}
|
||||
});
|
||||
});
|
||||