Merge pull request 'feat: adiciona css checkout dados pessoais 1290px' (#19) from feature/adiciona-css-checkout-dados-pessoais-1280px into development

Reviewed-on: #19
This commit is contained in:
Rafael Sampaio de Oliveira 2022-12-16 11:09:45 +00:00
commit 7c7e02b873
5 changed files with 238 additions and 48 deletions

View File

@ -9,8 +9,7 @@ export default class Footer {
this.list = await this.fetchApiData(); this.list = await this.fetchApiData();
await this.selectors(); await this.selectors();
this.cartTitle = await waitElement("#cart-title"); this.cartTitle = await waitElement("#cart-title");
console.log(this.cartTitle); if (window.location.hash === "#/cart") {
if (window.location.hash == "#/cart") {
await this.cartUpdate(); await this.cartUpdate();
} }
this.emptyTitle = await waitElement(".empty-cart-title"); this.emptyTitle = await waitElement(".empty-cart-title");
@ -23,7 +22,6 @@ export default class Footer {
this.addCertificationIcon(); this.addCertificationIcon();
this.events(); this.events();
this.items = await waitElement(".footerCheckout__prateleira-container"); this.items = await waitElement(".footerCheckout__prateleira-container");
console.log(this.items, "console de items");
await this.renderItems(); await this.renderItems();
await this.addCarrossel(); await this.addCarrossel();
} }
@ -46,14 +44,11 @@ export default class Footer {
} }
async cartUpdate() { async cartUpdate() {
console.log("cartUpdate");
//Função que fará a verificação se o carrinho está vazio para remover a prateleira de produtos: //Função que fará a verificação se o carrinho está vazio para remover a prateleira de produtos:
// vocês devem olhar a doc fornecida no Desafio para aprender a usar a MutationObserver // vocês devem olhar a doc fornecida no Desafio para aprender a usar a MutationObserver
// sempre que o carrinho estiver vazio o elemento chcekoutVazio fica display: none e isso pode ser usado como atributo para a MutationObserver // sempre que o carrinho estiver vazio o elemento chcekoutVazio fica display: none e isso pode ser usado como atributo para a MutationObserver
let target = this.checkoutVazio; let target = this.checkoutVazio;
console.log("target");
let config = { childList: true, attributes: true }; let config = { childList: true, attributes: true };
console.log("config");
let observer = new MutationObserver((mutations) => { let observer = new MutationObserver((mutations) => {
console.log("observer"); console.log("observer");
mutations.map((mutation) => { mutations.map((mutation) => {
@ -63,14 +58,10 @@ export default class Footer {
if (cartStatus === "display: none;") { if (cartStatus === "display: none;") {
this.renderPrateleira(); this.renderPrateleira();
console.log("Adiciona Prateleira");
this.cartTitle.classList.remove("inactive"); this.cartTitle.classList.remove("inactive");
console.log("Adiciona Título");
} else if (cartStatus === "display: block;") { } else if (cartStatus === "display: block;") {
this.removePrateleira(); this.removePrateleira();
console.log("Remove Prateleira");
this.cartTitle.classList.add("inactive"); this.cartTitle.classList.add("inactive");
console.log("Remove Título");
} }
}); });
}); });

View File

@ -5,6 +5,12 @@
padding-top: 8px; padding-top: 8px;
border-top: 1px solid $color-black; border-top: 1px solid $color-black;
&-h {
label {
margin-top: 6% !important;
}
}
.link-cart { .link-cart {
a { a {
color: $color-black; color: $color-black;
@ -157,54 +163,78 @@
.payment-data, .payment-data,
.client-profile-data { .client-profile-data {
.accordion-group { .accordion-group {
border-radius: 0; border-radius: 8px;
border: 1px solid $color-gray4; border: 1px solid $color-gray3;
font-family: $font-family; font-family: $font-family;
padding: 16px; padding: 16px;
.accordion-heading { // .accordion-heading {
span { // span {
color: #303030; // color: #303030;
margin-bottom: 8px; // margin-bottom: 8px;
padding: 0; // padding: 0;
i::before { // i::before {
fill: #303030; // fill: #303030;
} // }
} // }
a { // a {
align-items: center; // align-items: center;
background-color: #303030; // background-color: #303030;
border-radius: 8px; // border-radius: 8px;
border: none; // border: none;
color: $color-white; // color: $color-white;
display: flex; // display: flex;
justify-content: center; // justify-content: center;
padding: 6px 5px 6px 8px; // padding: 6px 5px 6px 8px;
} // }
} // }
.accordion-inner { .accordion-inner {
padding: 0; padding: 0;
/* General configurations */ /* General configurations */
.box-info,
.notification {
font-family: "Open Sans";
font-style: normal;
font-weight: 400;
font-size: 14px;
line-height: 19px;
color: $color-gray9;
}
.client-notice { .client-notice {
color: $color-black; color: $color-black;
display: none;
} }
p { p {
label { label {
color: $color-black; color: $color-gray9;
font-weight: 500; font-weight: 500;
font-family: "Open Sans";
font-style: normal;
font-weight: 400;
font-size: 14px;
line-height: 19px;
#opt-in-newsletter {
width: 18px;
height: 18px;
}
} }
select, select,
input { input {
border-radius: 0; border: 1px solid $color-gray11;
border: 1px solid $color-gray4; border-radius: 5px;
box-shadow: none; box-shadow: none;
height: 32px;
margin-bottom: 10px;
float: none;
} }
.help.error { .help.error {
@ -212,7 +242,12 @@
} }
} }
.newsletter {
margin-bottom: 45px !important;
}
.box-client-info-pj { .box-client-info-pj {
display: none;
.link a#is-corporate-client, .link a#is-corporate-client,
.link a#not-corporate-client { .link a#not-corporate-client {
color: $color-black; color: $color-black;
@ -228,18 +263,28 @@
button.submit { button.submit {
border: none; border: none;
border-radius: 5px; border-radius: 5px;
background: $color-black; background: $color-blue;
margin-top: 8px; margin-top: 8px;
outline: none; outline: none;
transition: all 0.2s linear; transition: all 0.2s linear;
width: 100%;
font-family: "Open Sans";
font-style: normal;
font-weight: 700;
font-size: 14px;
line-height: 19px;
text-align: center;
letter-spacing: 0.05em;
text-transform: uppercase;
color: $color-white;
&:hover { // &:hover {
background: lighten($color-black, 5); // background: lighten($color-black, 5);
} // }
&:active { // &:active {
background: darken($color-black, 5); // background: darken($color-black, 5);
} // }
} }
/* Shipping configurations */ /* Shipping configurations */

View File

@ -17,7 +17,7 @@
display: none; display: none;
} }
.cart { .cart {
border: 1px solid $color-gray3; // border: 1px solid $color-gray3;
box-sizing: border-box; box-sizing: border-box;
border-radius: 5px; border-radius: 5px;
padding: 16px 16px; padding: 16px 16px;
@ -41,6 +41,7 @@
font-family: $font-family; font-family: $font-family;
width: 100%; width: 100%;
h2 { h2 {
display: none;
background: $color-white; background: $color-white;
border: none; border: none;
color: #303030; color: #303030;
@ -57,12 +58,18 @@
} }
.cart { .cart {
border: 1px solid $color-gray4; // border: 1px solid $color-gray4;
ul li { ul li {
border-top: none; border-top: none;
margin-top: 0; margin-top: 0;
padding-top: 0; padding-top: 0;
font-weight: 400;
font-size: 12px;
line-height: 14px;
display: flex;
align-items: center;
color: $color-black;
&:not(:first-child) { &:not(:first-child) {
margin-top: 8px; margin-top: 8px;
@ -70,10 +77,20 @@
border-top: 1px solid #e5e5e5; border-top: 1px solid #e5e5e5;
} }
.shipping-date, .shipping-date {
.price {
color: #7d7d7d; color: #7d7d7d;
} }
.price {
color: $color-gray2;
margin: 0;
font-family: "Open Sans";
font-style: normal;
font-weight: 400;
font-size: 12px;
line-height: 16px;
text-align: right;
}
} }
} }
@ -83,8 +100,14 @@
} }
#go-to-cart-button a { #go-to-cart-button a {
color: #303030; color: $color-black;
text-decoration: underline; font-family: "Open Sans";
font-style: normal;
font-weight: 400;
font-size: 12px;
line-height: 16px;
text-align: right;
text-decoration-line: underline;
} }
.summary-totalizers { .summary-totalizers {
@ -185,6 +208,7 @@
.product-name { .product-name {
padding-right: 0; padding-right: 0;
white-space: normal;
@include mq(lg, max) { @include mq(lg, max) {
width: 250px; width: 250px;

View File

@ -4,8 +4,137 @@ body .container-main.container-order-form .orderform-template.active {
margin-left: unset; margin-left: unset;
margin-right: 0; margin-right: 0;
float: right; float: right;
border: 1px solid $color-gray5;
border-radius: 8px;
.description {
margin: 0 !important;
width: 90px;
display: flex;
justify-content: center;
align-items: center;
}
.quantity {
display: none !important;
}
.url {
height: 60px;
width: 78.93px;
margin-right: 7px;
img {
height: 100%;
width: 100%;
}
}
} }
.orderform-template-holder { .orderform-template-holder {
width: 66.1132%; width: 66.1132%;
.client-profile-data {
.accordion-group {
.accordion-heading {
.accordion-toggle {
&::after {
content: "Identificação";
font-size: 16px;
}
}
span {
color: #303030;
margin-bottom: 25px;
padding: 0;
font-size: 0;
i::before {
display: none;
fill: #303030;
}
}
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;
}
}
}
}
.shipping-data {
.accordion-group {
.accordion-heading {
span {
color: #303030;
margin-bottom: 8px;
padding: 0;
i::before {
display: none;
fill: #303030;
}
}
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;
}
}
}
}
.payment-data {
.accordion-group {
.accordion-heading {
span {
color: #303030;
margin-bottom: 8px;
padding: 0;
i::before {
display: none;
fill: #303030;
}
}
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;
}
}
}
}
}
.cart-items {
margin-top: 34px !important;
}
.summary-cart-template-holder {
.cart::before {
content: "Resumo do Pedido";
font-size: 16px;
line-height: 19px;
color: $color-gray2;
}
} }
} }

View File

@ -19,6 +19,7 @@ $color-gray7: #989898;
$color-gray8: #c4c4c4; $color-gray8: #c4c4c4;
$color-gray9: #7d7d7d; $color-gray9: #7d7d7d;
$color-gray10: #ededed; $color-gray10: #ededed;
$color-gray11: #e0e0e0;
$color-blue: #00c8ff; $color-blue: #00c8ff;