feature/optimization #1

Merged
josecarloslins merged 16 commits from feature/optimization into main 2022-12-17 01:38:19 +00:00
4 changed files with 350 additions and 271 deletions
Showing only changes of commit 6dd7121881 - Show all commits

View File

@ -34,9 +34,24 @@ export default class Footer {
let config = { childList: true, attributes: true }; let config = { childList: true, attributes: true };
let observer = new MutationObserver(mCallback); let observer = new MutationObserver(mCallback);
if (window.location.href != "https://m3academy.myvtex.com/checkout/#/cart") {
pratileira.classList.add("elementInvisible");
}
window.addEventListener("hashchange", () => {
if (window.location.hash == "#/cart") {
this.pratileira.classList.remove("elementInvisible");
} else {
pratileira.classList.add("elementInvisible");
}
});
function mCallback(mutations) { function mCallback(mutations) {
mutations.forEach((mutation) => { mutations.forEach((mutation) => {
if (target.style.display === "block") { if (
target.style.display === "block" ||
window.location.href != "https://m3academy.myvtex.com/checkout/#/cart"
) {
titleCart.classList.add("elementInvisible"); titleCart.classList.add("elementInvisible");
pratileira.classList.add("elementInvisible"); pratileira.classList.add("elementInvisible");
sliderVisible = false; sliderVisible = false;

View File

@ -1,289 +1,350 @@
.checkout-container { .checkout-container {
.client-pre-email { .client-pre-email {
border-color: $color-gray4; border-color: $color-black-neutra;
font-family: $font-family; font-family: $font-family;
padding-top: 8px; padding-top: 8px;
.link-cart { small {
a { font-family: $color-black-neutra;
color: $color-black; font-style: normal;
font-size: 14px; font-weight: 400;
font-size: 14px;
line-height: 16px;
text-align: center;
text-transform: uppercase;
}
&:hover { .link-cart {
color: lighen($color-black, 10); a {
} color: $color-black;
} font-size: 14px;
}
.pre-email { &:hover {
flex-direction: column; color: lighen($color-black, 10);
display: flex; }
align-items: center; }
justify-content: center; }
h3 { .pre-email {
margin-bottom: 16px; flex-direction: column;
display: flex;
align-items: center;
justify-content: center;
span { h3 {
color: #303030; margin-bottom: 21px;
font-size: 24px;
}
small { span {
color: $color-gray4; font-size: 0;
} &::before {
} content: "Para finalizar a compra, informe seu e-mail. RÁPIDO. FÁCIL. SEGURO.";
} font-family: $font-family-secundary;
font-style: normal;
font-weight: 400;
font-size: 20px;
line-height: 23px;
text-align: center;
text-transform: uppercase;
color: $color-black-neutra;
}
}
.client-email { small {
margin: 0 0 16px; display: none;
}
}
}
input { .client-email {
box-shadow: none; margin: 0 auto;
color: $color-black; border: 0;
font-family: $font-family; display: flex;
padding: 0 16px; justify-content: center;
border: 2px solid $color-gray3;
box-sizing: border-box;
border-radius: 5px;
@media (max-width: 490px) { width: 59.2827%;
width: auto; margin-bottom: 25px;
} input {
} box-shadow: none;
color: $color-black;
font-family: $font-family;
padding: 0 14px;
box-sizing: border-box;
border: 1px solid $color-black-neutra;
border-radius: 5px 0px 0px 5px;
width: 90%;
margin: 0;
font-size: 12px;
button { &::placeholder {
background-color: $color-black; font-family: $font-family;
border-radius: 5px; font-style: normal;
border: none; font-weight: 400;
font-family: $font-family; font-size: 12px;
height: 54px; line-height: 16px;
right: 0; color: $color-black-neutra;
top: 0; }
@media (max-width: 490px) { @media (max-width: 490px) {
height: 48px; width: auto;
margin: 0; }
position: absolute; }
}
}
span.help.error { button {
color: red; background-color: $color-blue-light;
} border-radius: 0px 8px 8px 0px;
} border: none;
font-family: $font-family;
font-style: normal;
font-weight: 700;
font-size: 14px;
line-height: 19px;
text-transform: uppercase;
padding: 0 14px;
height: 54px;
right: 0;
top: 0;
color: $color-black-neutra;
.emailInfo { @media (max-width: 490px) {
padding: 16px; height: 48px;
background-color: $color-white; margin: 0;
border: 1px solid $color-gray4; position: absolute;
border-radius: 0; }
}
h3 { span.help.error {
color: #303030; color: red;
margin: 0 0 8px 0; }
} }
ul { .emailInfo {
margin: 0; padding: 16px 0px 28px 16px;
background-color: $color-white;
border: 1px solid $color-gray4;
border-radius: 0;
li { width: 37.306%;
span { margin-bottom: 94px;
color: $color-black;
}
i::before { h3 {
color: $color-black; color: $color-black-neutra;
font-size: 1rem; margin: 0 0 9px 0;
opacity: 1; font-family: $font-family;
} font-style: normal;
} font-weight: 700;
} font-size: 12px;
line-height: 16px;
}
i::before { ul {
color: $color-black; margin: 0;
font-size: 6rem;
opacity: 0.5;
}
}
}
.shipping-data, li {
.payment-data, span {
.client-profile-data { color: $color-black-neutra;
.accordion-group { font-family: $color-black-neutra;
border-radius: 0; font-style: normal;
border: 1px solid $color-gray4; font-weight: 700;
font-family: $font-family; font-size: 12px;
padding: 16px; line-height: 16px;
}
.accordion-heading { i::before {
span { color: $color-blue-light;
color: #303030; font-size: 1rem;
margin-bottom: 8px; opacity: 1;
padding: 0; }
}
}
i::before { i::before {
fill: #303030; color: $color-black;
} font-size: 6rem;
} opacity: 0.5;
}
}
}
a { .shipping-data,
align-items: center; .payment-data,
background-color: #303030; .client-profile-data {
border-radius: 8px; .accordion-group {
border: none; border-radius: 0;
color: $color-white; border: 1px solid $color-gray4;
display: flex; font-family: $font-family;
justify-content: center; padding: 16px;
padding: 6px 5px 6px 8px;
}
}
.accordion-inner { .accordion-heading {
padding: 0; span {
color: #303030;
margin-bottom: 8px;
padding: 0;
/* General configurations */ i::before {
fill: #303030;
}
}
.client-notice { a {
color: $color-black; align-items: center;
} background-color: #303030;
border-radius: 8px;
border: none;
color: $color-white;
display: flex;
justify-content: center;
padding: 6px 5px 6px 8px;
}
}
p { .accordion-inner {
label { padding: 0;
color: $color-black;
font-weight: 500;
}
select, /* General configurations */
input {
border-radius: 0;
border: 1px solid $color-gray4;
box-shadow: none;
}
.help.error { .client-notice {
color: red; color: $color-black;
} }
}
.box-client-info-pj { p {
.link a#is-corporate-client, label {
.link a#not-corporate-client { color: $color-black;
color: $color-black; font-weight: 500;
font-weight: 500; }
text-decoration: underline;
}
}
.state-inscription-box span { select,
font-weight: 500; input {
} border-radius: 0;
border: 1px solid $color-gray4;
box-shadow: none;
}
button.submit { .help.error {
border: none; color: red;
border-radius: 5px; }
background: $color-black; }
margin-top: 8px;
outline: none;
transition: all 0.2s linear;
&:hover { .box-client-info-pj {
background: lighten($color-black, 5); .link a#is-corporate-client,
} .link a#not-corporate-client {
color: $color-black;
font-weight: 500;
text-decoration: underline;
}
}
&:active { .state-inscription-box span {
background: darken($color-black, 5); font-weight: 500;
} }
}
/* Shipping configurations */ button.submit {
border: none;
border-radius: 5px;
background: $color-black;
margin-top: 8px;
outline: none;
transition: all 0.2s linear;
.ship-postalCode small a { &:hover {
color: #303030; background: lighten($color-black, 5);
font-weight: 500; }
text-decoration: underline;
}
.vtex-omnishipping-1-x-deliveryGroup { &:active {
p { background: darken($color-black, 5);
color: #303030; }
font-size: 14px; }
font-weight: 500;
}
.shp-lean { /* Shipping configurations */
border: 1px solid $color-gray4;
border-radius: 0;
label { .ship-postalCode small a {
background-color: $color-white; color: #303030;
box-shadow: none; font-weight: 500;
color: #303030; text-decoration: underline;
padding: 8px 12px; }
svg path { .vtex-omnishipping-1-x-deliveryGroup {
fill: #d8c8ac; p {
} color: #303030;
} font-size: 14px;
} font-weight: 500;
} }
.delivery-address-title { .shp-lean {
color: #303030; border: 1px solid $color-gray4;
font-size: 14px; border-radius: 0;
font-weight: 500;
}
.shp-summary-group-info { label {
border-color: $color-gray4; background-color: $color-white;
} box-shadow: none;
color: #303030;
padding: 8px 12px;
.address-summary { svg path {
background: none; fill: #d8c8ac;
border-color: $color-gray4; }
border-radius: 0; }
color: #303030; }
padding: 12px; }
@include mq(md, max) { .delivery-address-title {
background-position: 8px 9px; color: #303030;
} font-size: 14px;
font-weight: 500;
}
a { .shp-summary-group-info {
color: #303030; border-color: $color-gray4;
font-weight: 500; }
text-decoration: underline;
}
}
.shp-summary-group-price, .address-summary {
.shp-summary-package { background: none;
color: $color-gray4; border-color: $color-gray4;
} border-radius: 0;
color: #303030;
padding: 12px;
.shp-summary-group-price { @include mq(md, max) {
padding-right: 16px; background-position: 8px 9px;
} }
.shp-summary-package { a {
padding-left: 16px; color: #303030;
} font-weight: 500;
text-decoration: underline;
}
}
.vtex-omnishipping-1-x-summaryChange { .shp-summary-group-price,
border-color: #303030; .shp-summary-package {
color: #303030; color: $color-gray4;
} }
.vtex-omnishipping-1-x-deliveryChannelsToggle { .shp-summary-group-price {
background-color: #d8c8ac; padding-right: 16px;
border: 1px solid #d8c8ac; }
}
.vtex-omnishipping-1-x-deliveryOptionActive { .shp-summary-package {
text-shadow: 1.3px 1px lighten($color-black, 50); padding-left: 16px;
} }
}
} .vtex-omnishipping-1-x-summaryChange {
} border-color: #303030;
color: #303030;
}
.vtex-omnishipping-1-x-deliveryChannelsToggle {
background-color: #d8c8ac;
border: 1px solid #d8c8ac;
}
.vtex-omnishipping-1-x-deliveryOptionActive {
text-shadow: 1.3px 1px lighten($color-black, 50);
}
}
}
}
}
.row-fluid .orderform-template {
margin-bottom: 94px;
} }

View File

@ -452,18 +452,20 @@
} }
.srp-pickup-my-location__button { .srp-pickup-my-location__button {
background-color: $color-black; background-color: $color-blue-light;
border: none; border: none;
border-radius: 5px; border-radius: 8px;
color: $color-white; color: $color-white;
outline: none; outline: none;
width: 100%; width: 100%;
font-style: normal; font-style: normal;
font-weight: 500; font-weight: 700;
font-size: 14px; font-size: 14px;
line-height: 16px; line-height: 19px;
letter-spacing: 0.05em; letter-spacing: 0.05em;
text-transform: uppercase;
padding: 12px 0;
&:hover { &:hover {
background-color: lighten($color-black, 5); background-color: lighten($color-black, 5);
@ -476,7 +478,7 @@
} }
.srp-toggle { .srp-toggle {
margin: 0 0 34px; margin: 0 0 20px;
&__wrapper { &__wrapper {
background-color: $color-white; background-color: $color-white;
@ -486,17 +488,21 @@
font-style: normal; font-style: normal;
font-weight: normal; font-weight: normal;
font-size: 14px; font-size: 14px;
line-height: 16px; line-height: 19px !important;
text-transform: uppercase; text-transform: uppercase;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
color: $color-gray7;
} }
&__current { &__current {
border: 1px solid $color-blue; border: 1px solid $color-black-neutra;
border-radius: 100px; border-radius: 100px;
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
} }
.blue { .blue {
color: $color-blue; color: $color-black-neutra;
} }
label { label {
@ -509,22 +515,25 @@
} }
.srp-postal-code { .srp-postal-code {
.ship-country {
display: none;
}
.ship-postalCode { .ship-postalCode {
label { label {
font-family: $font-family; font-family: $font-family;
font-style: normal; font-style: normal;
font-weight: normal; font-weight: normal;
font-size: 12px; font-size: 12px;
line-height: 14px; line-height: 16px;
color: $color-black; color: $color-black-neutra;
margin-bottom: 12px; margin-bottom: 12px;
} }
input { input {
border: 1px solid $color-gray3; border: 1px solid $color-gray7;
border-radius: 5px; border-radius: 5px;
box-shadow: none; box-shadow: none;
color: $color-gray3; color: $color-black-neutra;
font-size: 12px; font-size: 12px;
height: 36px; height: 36px;
padding: 12px 8px; padding: 12px 8px;
@ -532,38 +541,32 @@
} }
& ~ button { & ~ button {
background-color: $color-black; background-color: $color-blue-light;
border: none; border: none;
border-radius: 5px; border-radius: 8px;
color: $color-white; color: $color-white;
font-size: 12px; font-size: 14px;
height: 36px; height: 36px;
letter-spacing: 1px; letter-spacing: 0.05em;
text-transform: uppercase;
outline: none; outline: none;
position: absolute; position: absolute;
right: -150px; right: -147px;
top: 36px; top: 38px;
transition: all 0.2s linear; transition: all 0.2s linear;
width: 96px; padding: 0 11px;
text-transform: uppercase; margin: 0;
vertical-align: middle;
&:hover {
background-color: lighten($color-black, 5);
}
&:active {
background-color: darken($color-black, 5);
}
} }
small a { small a {
font-family: $font-family; font-family: $font-family;
font-style: normal; font-style: normal;
font-weight: normal; font-weight: normal;
font-size: 10px; font-size: 12px;
line-height: 12px; line-height: 16px;
color: $color-blue; color: $color-black-neutra;
margin-top: 7px; margin-top: 4px;
} }
span.help.error { span.help.error {

View File

@ -62,7 +62,7 @@ body {
} }
.emailInfo h3 { .emailInfo h3 {
color: $color-black !important; color: $color-black;
} }
#cart-title, #cart-title,