From 0d471b7e95a0b842bfafa2833fd6515d8a2eeaca Mon Sep 17 00:00:00 2001 From: Rafael Sampaio Date: Thu, 15 Dec 2022 15:54:53 -0300 Subject: [PATCH] feat: adiciona css checkout email 1280px --- checkout/src/arquivos/js/components/Footer.js | 6 +- .../sass/checkout/_checkout-autenticacao.scss | 519 ++++++++++-------- .../src/arquivos/sass/checkout/_checkout.scss | 4 +- .../src/arquivos/sass/utils/_variaveis.scss | 2 + 4 files changed, 290 insertions(+), 241 deletions(-) diff --git a/checkout/src/arquivos/js/components/Footer.js b/checkout/src/arquivos/js/components/Footer.js index 08d8163..1955699 100644 --- a/checkout/src/arquivos/js/components/Footer.js +++ b/checkout/src/arquivos/js/components/Footer.js @@ -10,7 +10,9 @@ export default class Footer { await this.selectors(); this.cartTitle = await waitElement("#cart-title"); console.log(this.cartTitle); - await this.cartUpdate(); + if (window.location.hash == "#/cart") { + await this.cartUpdate(); + } this.emptyTitle = await waitElement(".empty-cart-title"); this.emptyButton = await waitElement(".link-choose-products"); this.paymentsMethods = await waitElement(".footerCheckout__payments"); @@ -52,7 +54,7 @@ export default class Footer { console.log("target"); let config = { childList: true, attributes: true }; console.log("config"); - let observer = await new MutationObserver((mutations) => { + let observer = new MutationObserver((mutations) => { console.log("observer"); mutations.map((mutation) => { const cartStatus = mutation.target.attributes.style.nodeValue; diff --git a/checkout/src/arquivos/sass/checkout/_checkout-autenticacao.scss b/checkout/src/arquivos/sass/checkout/_checkout-autenticacao.scss index 92f0375..2996460 100644 --- a/checkout/src/arquivos/sass/checkout/_checkout-autenticacao.scss +++ b/checkout/src/arquivos/sass/checkout/_checkout-autenticacao.scss @@ -1,289 +1,334 @@ .checkout-container { - .client-pre-email { - border-color: $color-gray4; - font-family: $font-family; - padding-top: 8px; + .client-pre-email { + border-color: $color-gray4; + font-family: $font-family; + padding-top: 8px; + border-top: 1px solid $color-black; - .link-cart { - a { - color: $color-black; - font-size: 14px; + .link-cart { + a { + color: $color-black; + font-family: "Tenor Sans"; + font-size: 14px; + line-height: 16px; + text-transform: uppercase; - &:hover { - color: lighen($color-black, 10); - } - } - } + &:hover { + color: lighen($color-black, 10); + } + } + } - .pre-email { - flex-direction: column; - display: flex; - align-items: center; - justify-content: center; + .pre-email { + flex-direction: column; + display: flex; + align-items: center; + justify-content: center; - h3 { - margin-bottom: 16px; + h3 { + margin-bottom: 16px; - span { - color: #303030; - font-size: 24px; - } + span { + color: $color-black; + font-family: "Tenor Sans"; + font-weight: 400; + font-size: 20px; + line-height: 23px; + text-transform: uppercase; + } - small { - color: $color-gray4; - } - } - } + small { + color: $color-black; + font-family: "Tenor Sans"; + font-weight: 400; + font-size: 20px; + line-height: 23px; + text-transform: uppercase; + } + } + } - .client-email { - margin: 0 0 16px; + .client-email { + margin: 0 0 16px; + width: 54.883%; - input { - box-shadow: none; - color: $color-black; - font-family: $font-family; - padding: 0 16px; - border: 2px solid $color-gray3; - box-sizing: border-box; - border-radius: 5px; + input { + position: relative; + height: 50px; + box-shadow: none; + color: $color-black; + font-family: $font-family; + padding: 0 18px; + border: 1px solid $color-black; + box-sizing: border-box; + border-radius: 5px 8px 8px 5px; - @media (max-width: 490px) { - width: auto; - } - } + &::placeholder { + font-family: "Open Sans"; + font-weight: 400; + font-size: 12px; + line-height: 16px; + color: $color-black; + position: absolute; + top: 32%; + } - button { - background-color: $color-black; - border-radius: 5px; - border: none; - font-family: $font-family; - height: 54px; - right: 0; - top: 0; + @media (max-width: 490px) { + width: auto; + } + } - @media (max-width: 490px) { - height: 48px; - margin: 0; - position: absolute; - } - } + button { + background-color: $color-blue; + border-radius: 0 8px 8px 0px; + border: none; + font-family: "Open Sans"; + font-weight: 700; + font-size: 14px; + line-height: 19px; + height: 52px; + text-transform: uppercase; + color: $color-black; + right: -0.1%; + top: -1.5%; + width: 22.555%; - span.help.error { - color: red; - } - } + @media (max-width: 490px) { + height: 48px; + margin: 0; + position: absolute; + } + } - .emailInfo { - padding: 16px; - background-color: $color-white; - border: 1px solid $color-gray4; - border-radius: 0; + span.help.error { + color: $color-red; + font-weight: 700; + font-size: 12px; + line-height: 16px; + } + } - h3 { - color: #303030; - margin: 0 0 8px 0; - } + .emailInfo { + padding: 23.5px 16px; + background-color: $color-white; + border: 1px solid $color-black; + border-radius: 5px; + margin-top: 10px; + width: 35.743%; - ul { - margin: 0; + @media (min-width: 1025px) and (max-width: 1026px) { + margin-top: 0; + padding: 16px; + } - li { - span { - color: $color-black; - } + h3 { + color: $color-black; + margin: 0 0 8px 0; + } - i::before { - color: $color-black; - font-size: 1rem; - opacity: 1; - } - } - } + ul { + margin: 0; - i::before { - color: $color-black; - font-size: 6rem; - opacity: 0.5; - } - } - } + li { + span { + color: $color-black; + font-weight: 700; + font-size: 12px; + line-height: 16px; + } - .shipping-data, - .payment-data, - .client-profile-data { - .accordion-group { - border-radius: 0; - border: 1px solid $color-gray4; - font-family: $font-family; - padding: 16px; + i::before { + color: $color-blue; + font-size: 1rem; + opacity: 1; + } + } + } - .accordion-heading { - span { - color: #303030; - margin-bottom: 8px; - padding: 0; + i::before { + color: $color-black; + font-size: 6rem; + opacity: 0.5; + } + } + } - i::before { - fill: #303030; - } - } + .shipping-data, + .payment-data, + .client-profile-data { + .accordion-group { + border-radius: 0; + border: 1px solid $color-gray4; + font-family: $font-family; + padding: 16px; - a { - align-items: center; - background-color: #303030; - border-radius: 8px; - border: none; - color: $color-white; - display: flex; - justify-content: center; - padding: 6px 5px 6px 8px; - } - } + .accordion-heading { + span { + color: #303030; + margin-bottom: 8px; + padding: 0; - .accordion-inner { - padding: 0; + i::before { + fill: #303030; + } + } - /* General configurations */ + a { + align-items: center; + background-color: #303030; + border-radius: 8px; + border: none; + color: $color-white; + display: flex; + justify-content: center; + padding: 6px 5px 6px 8px; + } + } - .client-notice { - color: $color-black; - } + .accordion-inner { + padding: 0; - p { - label { - color: $color-black; - font-weight: 500; - } + /* General configurations */ - select, - input { - border-radius: 0; - border: 1px solid $color-gray4; - box-shadow: none; - } + .client-notice { + color: $color-black; + } - .help.error { - color: red; - } - } + p { + label { + color: $color-black; + font-weight: 500; + } - .box-client-info-pj { - .link a#is-corporate-client, - .link a#not-corporate-client { - color: $color-black; - font-weight: 500; - text-decoration: underline; - } - } + select, + input { + border-radius: 0; + border: 1px solid $color-gray4; + box-shadow: none; + } - .state-inscription-box span { - font-weight: 500; - } + .help.error { + color: red; + } + } - button.submit { - border: none; - border-radius: 5px; - background: $color-black; - margin-top: 8px; - outline: none; - transition: all 0.2s linear; + .box-client-info-pj { + .link a#is-corporate-client, + .link a#not-corporate-client { + color: $color-black; + font-weight: 500; + text-decoration: underline; + } + } - &:hover { - background: lighten($color-black, 5); - } + .state-inscription-box span { + font-weight: 500; + } - &:active { - background: darken($color-black, 5); - } - } + button.submit { + border: none; + border-radius: 5px; + background: $color-black; + margin-top: 8px; + outline: none; + transition: all 0.2s linear; - /* Shipping configurations */ + &:hover { + background: lighten($color-black, 5); + } - .ship-postalCode small a { - color: #303030; - font-weight: 500; - text-decoration: underline; - } + &:active { + background: darken($color-black, 5); + } + } - .vtex-omnishipping-1-x-deliveryGroup { - p { - color: #303030; - font-size: 14px; - font-weight: 500; - } + /* Shipping configurations */ - .shp-lean { - border: 1px solid $color-gray4; - border-radius: 0; + .ship-postalCode small a { + color: #303030; + font-weight: 500; + text-decoration: underline; + } - label { - background-color: $color-white; - box-shadow: none; - color: #303030; - padding: 8px 12px; + .vtex-omnishipping-1-x-deliveryGroup { + p { + color: #303030; + font-size: 14px; + font-weight: 500; + } - svg path { - fill: #d8c8ac; - } - } - } - } + .shp-lean { + border: 1px solid $color-gray4; + border-radius: 0; - .delivery-address-title { - color: #303030; - font-size: 14px; - font-weight: 500; - } + label { + background-color: $color-white; + box-shadow: none; + color: #303030; + padding: 8px 12px; - .shp-summary-group-info { - border-color: $color-gray4; - } + svg path { + fill: #d8c8ac; + } + } + } + } - .address-summary { - background: none; - border-color: $color-gray4; - border-radius: 0; - color: #303030; - padding: 12px; + .delivery-address-title { + color: #303030; + font-size: 14px; + font-weight: 500; + } - @include mq(md, max) { - background-position: 8px 9px; - } + .shp-summary-group-info { + border-color: $color-gray4; + } - a { - color: #303030; - font-weight: 500; - text-decoration: underline; - } - } + .address-summary { + background: none; + border-color: $color-gray4; + border-radius: 0; + color: #303030; + padding: 12px; - .shp-summary-group-price, - .shp-summary-package { - color: $color-gray4; - } + @include mq(md, max) { + background-position: 8px 9px; + } - .shp-summary-group-price { - padding-right: 16px; - } + a { + color: #303030; + font-weight: 500; + text-decoration: underline; + } + } - .shp-summary-package { - padding-left: 16px; - } + .shp-summary-group-price, + .shp-summary-package { + color: $color-gray4; + } - .vtex-omnishipping-1-x-summaryChange { - border-color: #303030; - color: #303030; - } + .shp-summary-group-price { + padding-right: 16px; + } - .vtex-omnishipping-1-x-deliveryChannelsToggle { - background-color: #d8c8ac; - border: 1px solid #d8c8ac; - } + .shp-summary-package { + padding-left: 16px; + } - .vtex-omnishipping-1-x-deliveryOptionActive { - text-shadow: 1.3px 1px lighten($color-black, 50); - } - } - } - } + .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); + } + } + } + } } diff --git a/checkout/src/arquivos/sass/checkout/_checkout.scss b/checkout/src/arquivos/sass/checkout/_checkout.scss index b73fd3b..f2920f1 100644 --- a/checkout/src/arquivos/sass/checkout/_checkout.scss +++ b/checkout/src/arquivos/sass/checkout/_checkout.scss @@ -69,8 +69,8 @@ body { #cart-title, #orderform-title { - color: $color-gray2; - margin: 40px 0 30px; + color: $color-black; + margin: 20px 0; font-family: "Open Sans"; font-style: normal; font-weight: 700; diff --git a/checkout/src/arquivos/sass/utils/_variaveis.scss b/checkout/src/arquivos/sass/utils/_variaveis.scss index 85cadb8..4f1141f 100644 --- a/checkout/src/arquivos/sass/utils/_variaveis.scss +++ b/checkout/src/arquivos/sass/utils/_variaveis.scss @@ -24,6 +24,8 @@ $color-blue: #00c8ff; $color-green: #4caf50; +$color-red: #ff0000; + /* Grid breakpoints */ $grid-breakpoints: ( xs: 0,