feature/template-checkout #1

Merged
FilipeQuintanilha merged 12 commits from feature/template-checkout into main 2022-12-19 02:42:46 +00:00
6 changed files with 508 additions and 362 deletions
Showing only changes of commit 389be436ba - Show all commits

View File

@ -10,13 +10,15 @@ export default class Footer {
this.pagamentos();
this.certificado();
this.desenvolvimento();
// this.onUpdate();
this.mostraTitulo();
this.onUpdate();
}
async selectors() {
//Para verificar se o carrinho está vazio e remover a prateleira de produtos:
// vocês devem olhar a doc fornecida no Desafio para aprender a usar o waitElement
this.checkoutVazio = await waitElement(".empty-cart-content");
this.titulo = await waitElement("#cart-title");
this.payments = await waitElement(".footerCheckout__payments", {
timeout: 5000,
interval: 1000,
@ -106,4 +108,10 @@ export default class Footer {
</a>
`;
}
mostraTitulo() {
if (this.checkoutVazio.style.cssText === "display: block;") {
$(this.titulo).attr("style", "");
}
}
}

View File

@ -1,289 +1,330 @@
.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: 14px;
.link-cart {
a {
color: $color-black;
font-size: 14px;
label {
margin-top: 0;
}
&:hover {
color: lighen($color-black, 10);
}
}
}
.link-cart {
margin: 0;
a {
color: $color-black;
font-size: 14px;
.pre-email {
flex-direction: column;
display: flex;
align-items: center;
justify-content: center;
&:hover {
color: lighen($color-black, 10);
}
}
}
h3 {
margin-bottom: 16px;
.pre-email {
flex-direction: column;
display: flex;
align-items: center;
justify-content: center;
span {
color: #303030;
font-size: 24px;
}
h3 {
margin-bottom: 16px;
margin-top: 65px;
small {
color: $color-gray4;
}
}
}
span {
font-family: $font-family-secundary;
font-style: normal;
font-weight: 400;
font-size: 20px;
line-height: 23px;
text-align: center;
text-transform: uppercase;
color: #000000;
}
.client-email {
margin: 0 0 16px;
small {
font-family: $font-family-secundary;
font-style: normal;
font-weight: 400;
font-size: 20px;
line-height: 23px;
text-align: center;
text-transform: uppercase;
color: #000000;
padding: 0;
}
}
}
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;
.client-email {
margin: 0 0 16px;
display: flex;
align-items: center;
justify-content: center;
@media (max-width: 490px) {
width: auto;
}
}
input {
border: 1px solid #000000;
border-radius: 5px 0px 0px 5px;
box-shadow: none;
color: #000000;
font-family: $font-family;
padding: 0 16px;
box-sizing: border-box;
font-size: 12px;
line-height: 16px;
height: 50px;
width: 65.8%;
border-right: none;
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: #00c8ff;
color: #000000;
font-weight: 700;
border-radius: 0px 8px 8px 0px;
border: none;
font-family: $font-family;
height: 52px;
position: initial;
width: 18.7%;
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: red;
font-weight: 700;
font-size: 12px;
line-height: 16px;
position: absolute;
top: 50px;
margin-top: 3px;
}
}
h3 {
color: #303030;
margin: 0 0 8px 0;
}
.emailInfo {
margin-top: 24px;
padding: 16px;
background-color: $color-white;
border: 1px solid #000000;
border-radius: 5px;
ul {
margin: 0;
h3 {
color: #000000;
margin: 0 0 9px 0;
font-weight: 700;
}
li {
span {
color: $color-black;
}
ul {
margin: 0;
i::before {
color: $color-black;
font-size: 1rem;
opacity: 1;
}
}
}
li {
span {
font-weight: 700;
font-size: 12px;
line-height: 16px;
color: #000000;
}
i::before {
color: $color-black;
font-size: 6rem;
opacity: 0.5;
}
}
}
i::before {
color: #00c8ff;
font-size: 1rem;
opacity: 1;
}
}
}
.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-black;
font-size: 6rem;
opacity: 0.5;
}
}
}
.accordion-heading {
span {
color: #303030;
margin-bottom: 8px;
padding: 0;
.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 {
fill: #303030;
}
}
.accordion-heading {
span {
color: #303030;
margin-bottom: 8px;
padding: 0;
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;
}
}
i::before {
fill: #303030;
}
}
.accordion-inner {
padding: 0;
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;
}
}
/* General configurations */
.accordion-inner {
padding: 0;
.client-notice {
color: $color-black;
}
/* General configurations */
p {
label {
color: $color-black;
font-weight: 500;
}
.client-notice {
color: $color-black;
}
select,
input {
border-radius: 0;
border: 1px solid $color-gray4;
box-shadow: none;
}
p {
label {
color: $color-black;
font-weight: 500;
}
.help.error {
color: red;
}
}
select,
input {
border-radius: 0;
border: 1px solid $color-gray4;
box-shadow: none;
}
.box-client-info-pj {
.link a#is-corporate-client,
.link a#not-corporate-client {
color: $color-black;
font-weight: 500;
text-decoration: underline;
}
}
.help.error {
color: red;
}
}
.state-inscription-box span {
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;
}
}
button.submit {
border: none;
border-radius: 5px;
background: $color-black;
margin-top: 8px;
outline: none;
transition: all 0.2s linear;
.state-inscription-box span {
font-weight: 500;
}
&:hover {
background: lighten($color-black, 5);
}
button.submit {
border: none;
border-radius: 5px;
background: $color-black;
margin-top: 8px;
outline: none;
transition: all 0.2s linear;
&:active {
background: darken($color-black, 5);
}
}
&:hover {
background: lighten($color-black, 5);
}
/* Shipping configurations */
&:active {
background: darken($color-black, 5);
}
}
.ship-postalCode small a {
color: #303030;
font-weight: 500;
text-decoration: underline;
}
/* Shipping configurations */
.vtex-omnishipping-1-x-deliveryGroup {
p {
color: #303030;
font-size: 14px;
font-weight: 500;
}
.ship-postalCode small a {
color: #303030;
font-weight: 500;
text-decoration: underline;
}
.shp-lean {
border: 1px solid $color-gray4;
border-radius: 0;
.vtex-omnishipping-1-x-deliveryGroup {
p {
color: #303030;
font-size: 14px;
font-weight: 500;
}
label {
background-color: $color-white;
box-shadow: none;
color: #303030;
padding: 8px 12px;
.shp-lean {
border: 1px solid $color-gray4;
border-radius: 0;
svg path {
fill: #d8c8ac;
}
}
}
}
label {
background-color: $color-white;
box-shadow: none;
color: #303030;
padding: 8px 12px;
.delivery-address-title {
color: #303030;
font-size: 14px;
font-weight: 500;
}
svg path {
fill: #d8c8ac;
}
}
}
}
.shp-summary-group-info {
border-color: $color-gray4;
}
.delivery-address-title {
color: #303030;
font-size: 14px;
font-weight: 500;
}
.address-summary {
background: none;
border-color: $color-gray4;
border-radius: 0;
color: #303030;
padding: 12px;
.shp-summary-group-info {
border-color: $color-gray4;
}
@include mq(md, max) {
background-position: 8px 9px;
}
.address-summary {
background: none;
border-color: $color-gray4;
border-radius: 0;
color: #303030;
padding: 12px;
a {
color: #303030;
font-weight: 500;
text-decoration: underline;
}
}
@include mq(md, max) {
background-position: 8px 9px;
}
.shp-summary-group-price,
.shp-summary-package {
color: $color-gray4;
}
a {
color: #303030;
font-weight: 500;
text-decoration: underline;
}
}
.shp-summary-group-price {
padding-right: 16px;
}
.shp-summary-group-price,
.shp-summary-package {
color: $color-gray4;
}
.shp-summary-package {
padding-left: 16px;
}
.shp-summary-group-price {
padding-right: 16px;
}
.vtex-omnishipping-1-x-summaryChange {
border-color: #303030;
color: #303030;
}
.shp-summary-package {
padding-left: 16px;
}
.vtex-omnishipping-1-x-deliveryChannelsToggle {
background-color: #d8c8ac;
border: 1px solid #d8c8ac;
}
.vtex-omnishipping-1-x-summaryChange {
border-color: #303030;
color: #303030;
}
.vtex-omnishipping-1-x-deliveryOptionActive {
text-shadow: 1.3px 1px lighten($color-black, 50);
}
}
}
}
.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);
}
}
}
}
}

View File

@ -16,7 +16,7 @@
border: 3px solid $color-gray3;
box-sizing: border-box;
border-radius: 5px;
padding: 16px;
padding: 0 16px;
@include mq(md, max) {
margin: 0px 0 25px 0;
@ -111,13 +111,42 @@
}
th {
font-family: $font-family-secundary;
color: $color-black;
padding: 0 0 16px;
font-weight: 400;
padding: 0 0 7px;
font-style: normal;
font-weight: bold;
font-size: 14px;
line-height: 16px;
&.shipping-date {
font-size: 0px;
padding-right: 38px;
}
&.shipping-date::after {
content: "Frete";
font-size: 14px !important;
display: flex;
}
&.product-price {
font-size: 0px;
}
&.product-price::after {
content: "Unidade";
font-size: 14px !important;
display: flex;
}
&.quantity {
text-align: initial;
}
&.quantity-price {
text-align: initial;
}
@include mq(md, max) {
&.quantity-price,
&.shipping-date {
@ -155,9 +184,9 @@
}
a {
color: $color-blue;
color: #000000;
font-style: normal;
font-weight: normal;
font-weight: 400;
font-size: 12px;
line-height: 14px;
transition: ease-in 0.22s all;
@ -179,15 +208,22 @@
}
td.shipping-date {
color: $color-gray2;
color: #989898;
font-size: 12px;
line-height: 14px;
padding: 0;
text-align: initial;
@include mq(md, max) {
display: none;
}
}
td.product-price {
padding: 23px 0 0 0;
text-align: initial;
}
.product-price {
min-width: 100px;
@include mq(md, max) {
@ -200,7 +236,9 @@
}
span.list-price {
color: $color-gray2;
color: #989898;
font-family: $font-family-secundary;
font-weight: 400;
font-size: 12px;
line-height: 14px;
text-decoration-line: line-through;
@ -217,14 +255,14 @@
td.quantity {
align-items: center;
border: 1px solid $color-gray3;
border-radius: 0;
border: 1px solid #f0f0f0;
border-radius: 8px;
box-sizing: border-box;
display: flex;
justify-content: center;
margin: 6px auto 0;
max-height: 38px;
max-width: 118px;
margin-top: 23px;
min-height: 34px;
min-width: 99px;
padding: 0;
width: max-content !important;
@ -234,7 +272,7 @@
input {
background-color: $color-white;
border: 1px solid $color-gray3;
border: 1px solid transparent;
border-radius: 0;
border-width: 0 1px;
display: block;
@ -252,25 +290,17 @@
.icon-plus-sign,
.icon-minus-sign {
display: flex;
&::before {
color: $color-black;
display: block;
width: 16px;
height: 16px;
color: #00c8ff;
display: flex;
align-items: center;
justify-content: center;
font-weight: 500;
padding: 1px 12px;
}
}
.icon-minus-sign {
&:before {
content: "-";
font-size: 16px;
}
}
.icon-plus-sign {
&:before {
content: "+";
font-size: 14px;
border-radius: 8px;
background-color: #ffffff;
}
}
@ -288,6 +318,11 @@
padding: 0;
}
}
&-price {
text-align: initial;
padding: 0;
}
}
.quantity-price,
@ -296,11 +331,27 @@
display: none;
}
span {
font-family: $font-family-secundary;
font-style: normal;
font-weight: normal;
font-weight: 400;
font-size: 14px;
line-height: 16px;
color: $color-black;
&.new-product-price-label {
text-transform: lowercase;
}
}
}
.quantity-price {
span {
font-family: $font-family;
font-style: normal;
font-weight: 700;
font-size: 14px;
line-height: 19px;
color: $color-black;
}
}
@ -315,7 +366,7 @@
top: 0;
}
.icon::before {
color: $color-gray4;
color: #c4c4c4;
font-size: 15px;
@include mq(md, max) {
@ -351,12 +402,12 @@
}
.srp-main-title {
margin: 32px 0 12px;
margin: 33px 0 12px;
font-style: normal;
font-weight: normal;
font-size: 24px;
line-height: 28px;
color: $color-gray2;
line-height: 33px;
color: #000;
@include mq(md, max) {
margin-top: 0;
@ -365,22 +416,23 @@
.srp-description {
color: $color-gray2;
font-size: 12px;
font-size: 14px;
line-height: 18px;
margin: 0 0 12px;
margin: 0px;
}
button.shp-open-options {
background-color: $color-gray5;
background-color: #ededed;
border: none;
border-radius: 5px;
color: $color-gray2;
border-radius: 8px;
color: #000;
font-size: 16px;
letter-spacing: 0.05em;
line-height: 19px;
font-weight: 500;
outline: none;
padding: 12px 40px;
margin: 0;
transition: all 0.2s linear;
&:hover {
@ -394,6 +446,7 @@
}
.srp-data {
margin-top: 10px;
width: 280px;
@include mq(cstm, max) {
@ -405,17 +458,17 @@
}
.srp-pickup-my-location__button {
background-color: $color-black;
background-color: #00c8ff;
border: none;
border-radius: 5px;
border-radius: 8px;
color: $color-white;
outline: none;
width: 100%;
font-style: normal;
font-weight: 500;
font-weight: 700;
font-size: 14px;
line-height: 16px;
line-height: 19px;
letter-spacing: 0.05em;
&:hover {
@ -485,19 +538,22 @@
}
& ~ button {
background-color: $color-black;
font-family: $font-family;
background: #00c8ff;
border-radius: 8px;
border: none;
border-radius: 5px;
color: $color-white;
font-size: 12px;
font-size: 14px;
line-height: 19px;
font-weight: 700;
height: 36px;
letter-spacing: 1px;
letter-spacing: 0.05em;
outline: none;
position: absolute;
right: -150px;
top: 36px;
transition: all 0.2s linear;
width: 96px;
width: 100px;
text-transform: uppercase;
&:hover {
@ -510,13 +566,19 @@
}
small a {
font-family: $font-family;
font-size: 0px;
}
small a::after {
content: "Não sei meu código postal";
font-family: $font-family-secundary;
font-style: normal;
font-weight: normal;
font-size: 10px;
line-height: 12px;
color: $color-blue;
margin-top: 7px;
color: #000000;
margin-top: 4px;
text-decoration: underline;
}
span.help.error {
@ -592,9 +654,10 @@
&-totalizers {
padding: 0;
width: 346px;
width: 354px;
.coupon-data {
margin-top: 33px;
#cart-link-coupon-add {
text-decoration: none;
&:hover {
@ -608,7 +671,7 @@
font-weight: normal;
font-size: 12px;
line-height: 14px;
color: $color-blue;
color: #000000;
text-decoration: none;
}
}
@ -629,8 +692,12 @@
text-decoration: underline;
}
.coupon-label {
margin-bottom: 0;
}
.coupon-label label {
margin-bottom: 12px;
margin-bottom: 4px;
font-family: $font-family;
font-style: normal;
font-weight: normal;
@ -641,7 +708,7 @@
}
.coupon-fields {
margin-bottom: 32px;
margin-bottom: 20px;
@include mq(sm, max) {
span {
@ -663,7 +730,7 @@
color: $color-gray4;
font-size: 12px;
height: 34px;
padding: 0 12px;
padding: 0 59px 0 16px;
max-width: 160px;
@include mq(sm, max) {
@ -673,17 +740,20 @@
}
button {
background: $color-black;
background: #00c8ff;
border: none;
border-radius: 5px;
color: $color-white;
font-size: 12px;
border-radius: 8px;
font-family: $font-family;
color: #000000;
font-weight: 400;
font-size: 14px;
line-height: 19px;
height: 36px;
letter-spacing: 1px;
margin-left: 6px;
letter-spacing: 0.5px;
margin-left: 11px;
outline: none;
transition: all 0.2s linear;
width: 94px;
width: 133px;
text-transform: uppercase;
@include mq(md, max) {
@ -691,11 +761,11 @@
}
&:hover {
background-color: lighten($color-black, 5);
background-color: lighten(#00c8ff, 5);
}
&:active {
background-color: darken($color-black, 5);
background-color: darken(#00c8ff, 5);
}
}
}
@ -717,7 +787,7 @@
font-size: 14px;
line-height: 16px;
color: $color-black;
padding: 12px 0;
padding: 10px 0;
}
&.info {
@ -733,10 +803,11 @@
tfoot {
td.info,
td.monetary {
font-family: $font-family;
font-style: normal;
font-weight: normal;
font-weight: 700;
font-size: 18px;
line-height: 21px;
line-height: 25px;
color: $color-black;
}
}
@ -747,7 +818,7 @@
.cart-links-bottom {
display: flex;
flex-direction: column;
width: 343px;
width: 354px;
@include mq(md, max) {
padding: 0 16px;
@ -776,31 +847,31 @@
font-weight: normal;
font-size: 12px;
line-height: 14px;
color: $color-blue;
color: #000000;
}
}
.btn-place-order-wrapper {
a {
background: $color-green;
background: #00c8ff;
border: none;
border-radius: 5px;
border-radius: 8px;
display: block;
font-size: 0;
transition: ease-in 0.22s all;
padding: 12px 19px;
&:hover {
background-color: darken($color-green, 5);
background-color: darken(#00c8ff, 5);
}
&:after {
content: "finalizar compra";
font-family: $font-family;
font-weight: 500;
font-size: 13px;
font-weight: 700;
font-size: 14px;
letter-spacing: 0.05em;
color: $color-white;
color: #000000;
text-transform: uppercase;
vertical-align: middle;
line-height: 19px;
@ -809,4 +880,21 @@
}
}
}
.coupon-fieldset {
div {
display: flex;
flex-direction: column;
align-items: flex-start;
}
}
.input.ship-country.text {
display: none;
}
.srp-toggle {
margin: 0 0 10px 0 !important;
padding: 0;
}
}

View File

@ -1,38 +1,42 @@
.empty-cart {
font-family: $font-family;
&-content {
color: $color-black;
text-align: center;
font-family: $font-family;
&-content {
color: $color-black;
text-align: center;
@include mq(md, max) {
padding: 0 16px;
}
}
@include mq(md, max) {
padding: 0 16px;
}
}
&-title {
font-size: 20px;
}
&-title {
font-size: 20px;
}
&-links {
.link-choose-products {
background: $color-black;
border: none;
border-radius: 5px;
transition: ease-in 0.22s all;
outline: none;
font-family: $font-family;
font-style: normal;
font-weight: 500;
font-size: 14px;
line-height: 16px;
text-align: center;
letter-spacing: 0.05em;
color: $color-white;
text-transform: uppercase;
&-links {
.link-choose-products {
background-color: #ffffff;
border: 1px solid #000000;
border-radius: 0px;
outline: none;
font-family: $font-family-secundary;
font-style: normal;
font-weight: 500;
font-size: 0px;
line-height: 16px;
text-align: center;
color: #000000;
text-transform: uppercase;
width: 28.1%;
margin: 0;
&:hover {
background: lighten($color-black, 5);
}
}
}
&:hover {
}
}
.link-choose-products::after {
content: "CONTINUAR COMPRANDO";
font-size: 14px;
}
}
}

View File

@ -3,11 +3,6 @@
@import "./checkout-pagamento";
@import "./checkout-autenticacao";
html {
height: 100%;
min-height: 100%;
}
footer .footerCheckout__wrapper {
width: 94.9734%;
margin: auto auto 0 auto;
@ -19,10 +14,8 @@ header {
}
body {
display: flex;
flex-direction: column;
min-height: 100% !important;
padding-top: 0 !important;
padding: 0 !important;
margin: 0 !important;
@include mq(md, max) {
padding-left: 0;
@ -68,13 +61,13 @@ body {
#cart-title,
#orderform-title {
color: $color-gray2;
color: $color-black;
font-family: $font-family;
font-weight: 500;
font-size: 36px;
line-height: 42px;
margin: 40px 0 30px;
letter-spacing: 0.1em;
font-weight: 700;
font-size: 24px;
line-height: 33px;
margin: 17px 0 16px;
letter-spacing: 0.05em;
text-transform: uppercase;
@include mq(md, max) {
@ -82,11 +75,22 @@ body {
}
}
.show {
display: block;
}
.empty-cart-title {
font-weight: 700;
font-size: 24px;
line-height: 33px;
color: #000000;
font-family: $font-family;
text-transform: uppercase;
margin: 0 0 32px 0;
}
.empty-cart-message {
display: none;
}
.empty-cart-content {

View File

@ -2,6 +2,7 @@
.footerCheckout {
border-top: 1px solid black;
color: $color-gray2;
margin-top: 94px;
&__wrapper {
width: auto !important;