diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..1f67998 --- /dev/null +++ b/.babelrc @@ -0,0 +1,10 @@ +{ + "plugins": [ + [ + "@babel/plugin-transform-runtime", + { + "corejs": 2 + } + ] + ] +} diff --git a/.gitignore b/.gitignore index 6aaaf01..97e6428 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,9 @@ /node_modules /dist - +notes.txt yarn-error.log .idea .cache .DS_Store - +js/dev/hhApiAreas.json .vscode/ \ No newline at end of file diff --git a/css/blocks/form/form.less b/css/blocks/form/form.less index 82d7be8..e15dd3c 100644 --- a/css/blocks/form/form.less +++ b/css/blocks/form/form.less @@ -1,5 +1,15 @@ .form { background-color: @color-light; + position: relative; + + @media @screen-gt-s { + margin: 5px auto; + max-width: 768px; + } + + @media @screen-gt-m { + max-width: 1010px; + } &__heading { margin-top: 20px; @@ -7,19 +17,28 @@ } &__input-text { + position: relative; margin: 10px 0; } &__input-tel { display: flex; margin-top: 5px; + position: relative; } &__delivery-method { display: flex; } + &__delivery-address { + &_hide { + display: none; + } + } + &__textarea { + position: relative; margin-top: 10px; } @@ -59,21 +78,38 @@ } } -.form-pug { - /* Заглушка, будет popup */ - width: 290px; - height: 450px; - background-color: black; - opacity: 0.1; - font-size: 50px; - float: right; - margin-top: 136px; - color: white; - justify-content: center; - align-items: center; - display: none; +.orderForm { + position: absolute; + top: 0; + z-index: 100; + overflow: hidden; + opacity: 0; + transition: all 300ms linear; + width: 100%; + background-color: rgba(0, 0, 0, 0.5); - @media @screen-gt-s { - display: flex; + &_active { + opacity: 1; + } +} + +.form-error-block { + display: block; + position: absolute; + top: 0; + left: 0; + padding: 5px 10px 5px 5px; + margin: 0; + color: @color-dark; + background-color: @color-light; + border: 1px solid @color-light-grey; + box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.5); + z-index: 1000; + box-sizing: border-box; + font: 14px/ (@control-height - 18px) Arial, sans-serif; + text-align: left; + + &__item { + list-style: none; } } diff --git a/css/blocks/popup/popup.less b/css/blocks/popup/popup.less index db87c20..d05f907 100644 --- a/css/blocks/popup/popup.less +++ b/css/blocks/popup/popup.less @@ -1,7 +1,15 @@ .popup { width: 280px; border: 1px solid; - margin: 40px auto; + position: absolute; + opacity: 0; + transition: all 100ms linear; + background-color: @color-light; + z-index: 100; + + &_active { + opacity: 1; + } @media @screen-gt-s { width: 242px; @@ -30,5 +38,21 @@ z-index: 100; right: -10px; top: -10px; + + @media @screen-gt-m { + display: none; + } + } +} + +.js-mobile-outer { + background-color: rgba(0, 0, 0, 0.5); + position: absolute; + width: 100%; + height: 100vh; + overflow: hidden; + + &__popup { + position: relative; } } diff --git a/css/blocks/product-card/product-card.less b/css/blocks/product-card/product-card.less index 52acb32..fb42e92 100644 --- a/css/blocks/product-card/product-card.less +++ b/css/blocks/product-card/product-card.less @@ -5,19 +5,17 @@ cursor: pointer; &__image-container { - margin-bottom: 10px; font-size: 0; position: relative; - &_popup { - width: 212px; - height: 212px; - margin: 0 auto 10px auto; + //width: 212px; + //height: 212px; + min-height: 212px; + margin: 0 auto 10px auto; - @media @screen-gt-m { - width: 290px; - height: 290px; - } + @media @screen-gt-m { + width: 290px; + height: 290px; } &_form { diff --git a/css/common/button/button.less b/css/common/button/button.less index e8f5762..90cfb3c 100644 --- a/css/common/button/button.less +++ b/css/common/button/button.less @@ -36,6 +36,10 @@ .button(); width: 100%; + &_disabled { + opacity: 0.5; + } + @media @screen-gt-s { width: 138px; } @@ -49,9 +53,7 @@ cursor: pointer; text-indent: -9999px; background-image: url("close.svg"); -} -.button-close { &:hover, &:focus { outline: none; diff --git a/css/common/input/input.less b/css/common/input/input.less index 904a210..aff36c1 100644 --- a/css/common/input/input.less +++ b/css/common/input/input.less @@ -37,15 +37,15 @@ .input-tel { .default-input(); - &__country-code { + &_country-code { width: 38px; } - &__operator-code { + &_operator-code { width: 62px; } - &__number { + &_number { width: 100%; } @@ -58,3 +58,33 @@ border-color: @color-red; } } + +.input { + &_invalid { + border-color: @color-red; + } +} + +.input-select { + .default-input(); + padding: 9px 30px 9px 10px; + background-color: @color-light-1; + caret-color: transparent; + + &:hover { + cursor: pointer; + } + + -webkit-text-fill-color: @color-dark-1; + opacity: 1; /* required on iOS */ +} + +::-webkit-input-placeholder { + color: @color-dark-1; /* Chrome, Safari, Opera */ +} +::-moz-placeholder { + color: @color-dark-1; /* Firefox */ +} +:-ms-input-placeholder { + color: @color-dark-1; /* IE */ +} diff --git a/css/common/label/label.less b/css/common/label/label.less index 29eb911..a8067e7 100644 --- a/css/common/label/label.less +++ b/css/common/label/label.less @@ -6,4 +6,8 @@ .label { .label-default(); + + &_disabled { + opacity: 0.7; + } } diff --git a/css/common/radio-button/radio-button.less b/css/common/radio-button/radio-button.less index 630d9da..a3b5060 100644 --- a/css/common/radio-button/radio-button.less +++ b/css/common/radio-button/radio-button.less @@ -33,7 +33,8 @@ .radio-button-default(); &__button { - display: none; + position: absolute; + clip: rect(0 0 0 0); } &:checked + .radio-button-sqared__label { diff --git a/css/common/select/select.less b/css/common/select/select.less index 863276e..288b3dd 100644 --- a/css/common/select/select.less +++ b/css/common/select/select.less @@ -1,25 +1,6 @@ .select { position: relative; - &__select-field { - width: 100%; - height: @control-height; - display: inline-block; - box-sizing: border-box; - background-color: @color-light-1; - padding: 9px 10px; - border: 1px solid #c5c9ca; - font: 14px/ (@control-height - 18px) Arial, sans-serif; - color: @color-dark-1; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - - &:hover { - cursor: pointer; - } - } - &:before { content: ""; position: absolute; @@ -41,9 +22,46 @@ border-width: 5px 5px 0 5px; border-color: #c5c9ca transparent transparent transparent; position: absolute; - top: 50%; + top: 45%; right: 10px; z-index: 1; pointer-events: none; } } + +.select_active { + &:after { + transform: matrix(1, 0, 0, -1, 0, 0); + } +} + +.select_active > .input-select { + background-color: @color-grey; +} + +.options-container { + position: absolute; + padding: 23px 0px; + height: 290px; + width: 100%; + background-color: @color-light; + z-index: 1000; + box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.2); + overflow: hidden; + box-sizing: border-box; + + &__item { + padding: 11px 12px; + height: 38px; + line-height: 16px; + box-sizing: border-box; + font-size: 14px; + display: block; + + &:hover { + background-color: @color-primary; + color: white; + cursor: pointer; + } + } +} diff --git a/css/common/textarea/textarea.less b/css/common/textarea/textarea.less index aaf9ce6..c350866 100644 --- a/css/common/textarea/textarea.less +++ b/css/common/textarea/textarea.less @@ -10,6 +10,10 @@ color: #333333; resize: none; + &_invalid { + border: 1px solid #c52929; + } + ::-webkit-input-placeholder { color: #aeb5b9; /* Chrome, Safari, Opera */ } diff --git a/css/global.less b/css/global.less index 9d2228d..b70f740 100644 --- a/css/global.less +++ b/css/global.less @@ -5,6 +5,12 @@ body { font: 14px/1.43 Arial, sans-serif; color: #333; } +::-webkit-scrollbar { + display: none; + -webkit-appearance: none; + width: 0; + height: 0; +} a { color: #609fcf; diff --git a/html/orderForm.html b/html/orderForm.html new file mode 100644 index 0000000..6540f33 --- /dev/null +++ b/html/orderForm.html @@ -0,0 +1,157 @@ + +
+
+
+ +
+
+
+ +
+
+

Оформление заказа

+

Контактное лицо

+ + +
+ +
+ + + +
+
+ +
+

Способ получения заказа

+
+ +
+ + +
+ +
+ + +
+ +
+
+ +
+
+

Адрес

+
+ +
+
+ +
+
+
+ +
+
+

Оплата

+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+ +
+
+

Уведомления

+ +
+ + +
+ +
+
+ + + +
+ +
+
+ +
+
+ Футболка +
sale
+
+ +
Футболка
+
+
690
+ 390 ₽ +
+

Красная хлопоковая футболка + с коротким руковом

+ +
+ + + + + + + + + + + + + + + + + +
+
+
+
+ +
+ \ No newline at end of file diff --git a/html/productCardPopup.html b/html/productCardPopup.html new file mode 100644 index 0000000..4fce733 --- /dev/null +++ b/html/productCardPopup.html @@ -0,0 +1,55 @@ +