Desafio 4 M3 Academy #1

Merged
naianfelix merged 11 commits from develop into main 2022-12-19 08:58:14 +00:00
13 changed files with 2027 additions and 11458 deletions

10970
checkout/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -32,13 +32,12 @@ export default class CheckoutUI {
toggleFooterDropdown(event) { toggleFooterDropdown(event) {
event.target.classList.toggle("closed"); event.target.classList.toggle("closed");
event.target.nextElementSibling.classList.toggle( event.target.nextElementSibling.classList.toggle("dropdown__content--closed");
"dropdown__content--closed"
);
} }
init() { init() {
this.configThumb(); this.configThumb();
this.resetTitle();
waitForEl(".product-image img", this.resizeImages.bind(this)); waitForEl(".product-image img", this.resizeImages.bind(this));
$(window).on("orderFormUpdated.vtex", this.resizeImages.bind(this)); $(window).on("orderFormUpdated.vtex", this.resizeImages.bind(this));
} }
@ -56,14 +55,27 @@ export default class CheckoutUI {
resizeImages() { resizeImages() {
$(".product-image img").each((i, el) => { $(".product-image img").each((i, el) => {
const $el = $(el); const $el = $(el);
$el.attr( $el.attr("src", alterarTamanhoImagemSrcVtex($el.attr("src"), this.width, this.height));
"src",
alterarTamanhoImagemSrcVtex(
$el.attr("src"),
this.width,
this.height
)
);
}); });
} }
async resetTitle() {
const orderForm = await window.vtexjs.checkout.getOrderForm();
const itemsForm = orderForm.items.length;
const cartId = document.querySelector("#cart-title");
$(window).on("orderFormUpdated.vtex", (evt, oF) => {
if (oF.items.length <= 0) {
cartId.style.display = "none";
} else {
cartId.style.display = "block";
}
if (window.location.hash === "#/shipping" || window.location.hash === "#/payment") {
cartId.style.display = "none";
}
});
if (itemsForm === 0) {
cartId.style.display = "none";
}
}
} }

View File

@ -6,16 +6,173 @@ export default class Footer {
} }
async init() { async init() {
this.list = await this.fetchPrateleira();
await this.selectors(); await this.selectors();
// this.onUpdate(); // this.onUpdate();
this.createPrateleira();
this.prateleira = await waitElement(".footerCheckout__carrossel-itens");
this.itensPrateleira();
this.addCarrossel();
await this.displaySlick();
this.creditCardIconsHTML();
this.developedByIconsHTML();
} }
async selectors() { async selectors() {
//Para verificar se o carrinho está vazio e remover a prateleira de produtos: this.itensShelf = await waitElement(".footerCheckout__prateleira", {
// vocês devem olhar a doc fornecida no Desafio para aprender a usar o waitElement timeout: 5000,
this.checkoutVazio = await waitElement(".empty-cart-content"); interval: 1000,
});
this.creditCardIcons = await waitElement(".footerCheckout__stamps");
this.developedByIcons = await waitElement(".footerCheckout__developedBy");
} }
async displaySlick() {
const orderForm = await window.vtexjs.checkout.getOrderForm();
const items = orderForm.items.length;
const _this = this;
$(window).on("orderFormUpdated.vtex", (evt, oF) => {
if (oF.items.length <= 0) {
_this.itensShelf.style.display = "none";
} else {
if (window.location.hash !== "#/shipping" && window.location.hash !== "#/payment") {
_this.itensShelf.style.display = "block";
}
}
});
window.addEventListener("hashchange", async () => {
if (window.location.hash === "#/shipping" || window.location.hash === "#/payment") {
_this.itensShelf.style.display = "none";
} else {
const orderForm = await window.vtexjs.checkout.getOrderForm();
const items = orderForm.items.length;
if (items > 0) {
_this.itensShelf.style.display = "block";
}
}
});
if (
items === 0 ||
window.location.hash === "#/shipping" ||
window.location.hash === "#/payment"
) {
this.itensShelf.style.display = "none";
}
}
createPrateleira() {
if (this.itensShelf) {
this.itensShelf.innerHTML = `
<div class="footerCheckout__prateleira-title">
<h2>Você também pode gostar:</h2>
</div>
<ul class="footerCheckout__carrossel-itens"></ul>
`;
}
}
async itensPrateleira() {
let structure = "";
this.list.forEach((response) => {
const sku = response.skus.map((item) => `<li>${item}</li>`);
structure += `
<li class="slick">
<figure class="container-img"><img src ="${response.img}"/></figure>
<figcaption class="name-picture">${response.name}</figcaption>
<div><ul class= "number" >${sku.join("")}</ul></div>
<button type="button"><a href="${response.link}">Ver Produto</a></button>
</li>
`;
});
this.prateleira.innerHTML = structure;
}
async fetchPrateleira() {
const api =
"https://m3academy.myvtex.com/api/catalog_system/pub/products/search/?fq=productClusterIds:319";
return fetch(api)
.then((response) => response.json())
.then((data) => {
const prodInfo = data.map((response) => ({
name: response.productName,
skus: response.items.map((item) => item.name),
img: response.items[0].images[0].imageUrl,
link: response.link,
}));
return prodInfo;
});
}
async addCarrossel() {
const elemento = await waitElement(".footerCheckout__carrossel-itens");
$(elemento).slick({
slidesToShow: 4,
slidesToScroll: 1,
arrows: true,
infinite: true,
responsive: [
{
breakpoint: 1279,
settings: {
slidesToShow: 3,
slidesToScroll: 1,
infinite: true,
dots: true,
},
},
{
breakpoint: 790,
settings: {
slidesToShow: 2,
slidesToScroll: 1,
infinite: true,
dots: true,
},
},
],
});
}
creditCardIconsHTML() {
this.creditCardIcons.innerHTML = `
<li><img class="master" src="https://agenciamagma.vteximg.com.br/arquivos/masterCardM3Academy.png" alt="Mastercard"></li>
<li><img class="visa" src="https://agenciamagma.vteximg.com.br/arquivos/visaM3Academy.png" alt=""></li>
<li><img class="amex" src="https://agenciamagma.vteximg.com.br/arquivos/amexM3Academy.png" alt="American Express"></li>
<li><img class="elo" src="https://agenciamagma.vteximg.com.br/arquivos/eloM3Academy.png" alt="Elo"></li>
<li><img class="hiper" src="https://agenciamagma.vteximg.com.br/arquivos/hiperCardM3Academy.png" alt="Hipercard"></li>
<li><img class="paypal" src="https://agenciamagma.vteximg.com.br/arquivos/payPalM3Academy.png" alt="PayPal"></li>
<li><img class="boleto" src="https://agenciamagma.vteximg.com.br/arquivos/boletoM3Academy.png" alt="Boleto"></li>
<li><span class="footerCheckout__stamps__divider"></span></li>
<li class="vtex-pci"><img class="vtex" src="https://agenciamagma.vteximg.com.br/arquivos/vtexPCIM3Academy.png" alt="PCI VTEX"></li>
`;
}
developedByIconsHTML() {
this.developedByIcons.innerHTML = `
<li>
<div class="by-vtex">
<a href="https://vtex.com.br-pt/">
<span>Powered By</span>
</a>
<img class="vtex-logo" src="https://agenciamagma.vteximg.com.br/arquivos/logoVTEXM3Academy.png" alt="VTEX" />
</div>
</li>
<li>
<div class="by-m3">
<a href="https://vtex.com.br-pt/">
<span>Developed By</span>
</a>
<img class="m3-logo" src="https://agenciamagma.vteximg.com.br/arquivos/logoM3M3Academy.png" alt="M3" />
</div>
</li>
`;
}
onUpdate() { onUpdate() {
//Função qeu fará a verificação se o carrinho está vazio para remover a prateleira de produtos: //Função qeu 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
@ -30,11 +187,4 @@ export default class Footer {
observer.observe(target, config); observer.observe(target, config);
} }
async addCarrossel() {
const elemento = await waitElement("#my-element");
$(elemento).slick({
slidesToShow: 4,
slidesToScroll: 1,
});
}
} }

View File

@ -8,14 +8,70 @@ export default class Header {
async init() { async init() {
await this.selectors(); await this.selectors();
console.log(this.item); this.progressBarHTML();
this.progressBarProgress();
this.progressUpdate();
} }
async selectors() { async selectors() {
this.item = await waitElement("#my-element", { this.header = await waitElement(".headerCheckout");
//#my-element pode ser a class ou o id do elemento html qeu vocÊ quer pegar this.progressBar = await waitElement("#progressBar");
timeout: 5000, // vai esperar 5 segundos antes de rejeitar a promise // this.item = await waitElement("#my-element", {
interval: 1000, // vai verificar a cada 1 segundo se o elemento existe // //#my-element pode ser a class ou o id do elemento html qeu vocÊ quer pegar
// timeout: 5000, // vai esperar 5 segundos antes de rejeitar a promise
// interval: 1000, // vai verificar a cada 1 segundo se o elemento existe
// });
}
progressBarHTML() {
if (this.progressBar && window.innerWidth > 1024) {
this.progressBar.innerHTML = `
<ul class="list" style="list-style: none;">
<li class="laterais" ><div class="container-li"><div><p class="progress-bar-text">Meu Carrinho</p><p id="progress-bar-circle-1" class="progress-bar-circle-1"></p><p class="progress-bar-line-1"></p></div></li>
<li class="central" ><div class="container-li-central"><div><p class="progress-bar-text">Dados Pessoais</p><p id="progress-bar-circle-2" class="progress-bar-circle-2"></p></div></div></li>
<li class="laterais" ><div class="container-li"><div><p class="progress-bar-text">Pagamentos</p><p id="progress-bar-circle-3" class="progress-bar-circle-3"></p><p class="progress-bar-line-2"></p></div></li>
</ul>
`;
}
if (this.progressBar && window.innerWidth <= 1024) {
this.progressBar.innerHTML = ``;
}
}
progressBarProgress() {
this.progressUpdate();
window.addEventListener("hashchange", () => {
this.progressUpdate();
}); });
} }
progressUpdate() {
const meuCarrinho = document.querySelector(".progress-bar-circle-1");
const dadosPessoais = document.querySelector(".progress-bar-circle-2");
const pagamento = document.querySelector(".progress-bar-circle-3");
switch (location.hash) {
case "#/cart":
meuCarrinho.classList.add("active");
dadosPessoais.classList.remove("active");
pagamento.classList.remove("active");
break;
case "#/profile":
case "#/shipping":
meuCarrinho.classList.remove("active");
dadosPessoais.classList.add("active");
pagamento.classList.remove("active");
break;
case "#/payment":
dadosPessoais.classList.remove("active");
meuCarrinho.classList.remove("active");
pagamento.classList.add("active");
break;
}
}
} }

View File

@ -5,7 +5,7 @@
} }
.cart-template { .cart-template {
font-family: $font-family; font-family: $font-family-secundary;
@include mq(md, max) { @include mq(md, max) {
padding: 0 0; padding: 0 0;
} }
@ -13,10 +13,11 @@
display: none; display: none;
} }
.cart { .cart {
border: 3px solid $color-gray3; border: 1px solid $color-gray3;
box-sizing: border-box; box-sizing: border-box;
border-radius: 5px; border-radius: 5px;
padding: 16px; padding: 16px 29px 16px 16px;
margin: 0 0 48px 0;
@include mq(md, max) { @include mq(md, max) {
margin: 0px 0 25px 0; margin: 0px 0 25px 0;
@ -25,14 +26,20 @@
border-radius: 0; border-radius: 0;
} }
} }
.cart-fixed.affix { .cart-fixed.affix {
position: relative !important; position: relative !important;
} }
.cart-fixed { .cart-fixed {
font-family: $font-family; font-family: $font-family;
width: 100%; width: 100%;
height: 397px !important;
padding: 24px 16px;
box-sizing: border-box;
h2 { h2 {
background: $color-white; background: $color-white-500;
border: none; border: none;
color: #303030; color: #303030;
font-size: 14px; font-size: 14px;
@ -61,21 +68,28 @@
border-top: 1px solid #e5e5e5; border-top: 1px solid #e5e5e5;
} }
.shipping-date, .shipping-date {
.price { display: none;
color: #7d7d7d;
} }
} }
} }
.summary-template-holder { .summary-template-holder {
border-top: none; border-top: none;
background: $color-white; background: $color-white-500;
.summary-totalizers {
max-width: unset;
}
} }
#go-to-cart-button a { #go-to-cart-button a {
color: #303030; font-family: $font-family;
color: $color-black-500;
font-size: 12px;
line-height: 16px;
text-decoration: underline; text-decoration: underline;
// padding-right: 17px;
} }
.summary-totalizers { .summary-totalizers {
@ -85,24 +99,34 @@
} }
#payment-data-submit { #payment-data-submit {
background: $color-black; font-family: "Open Sans", sans-serif;
background: $color-green2;
border: none; border: none;
border-radius: 0; border-radius: 8px;
color: $color-white; color: $color-white;
outline: none; outline: none;
transition: all 0.2s linear; transition: all 0.2s linear;
font-weight: 700;
font-size: 14px;
line-height: 19px;
text-transform: uppercase;
letter-spacing: 0.05em;
&:hover { &:hover {
background: lighten($color-black, 5); background: lighten($color-green2, 5);
} }
&:active { &:active {
background: darken($color-black, 5); background: darken($color-green2, 5);
}
.icon-lock {
display: none;
} }
} }
} }
.lookatme { .lookatme {
background-color: $color-white; background-color: $color-white-500;
} }
.cart-items { .cart-items {
@ -111,12 +135,50 @@
} }
th { th {
color: $color-black; font-family: $font-family-secundary;
color: $color-black-100;
padding: 0 0 16px; padding: 0 0 16px;
font-style: normal; font-weight: 400;
font-weight: bold;
font-size: 14px; font-size: 14px;
line-height: 16px; line-height: 16px;
text-align: unset;
vertical-align: unset;
&.product {
width: 40.64%;
}
&.shipping-date {
font-size: 0;
width: 15.05%;
&::after {
content: "Frete";
font-family: $font-family-secundary;
color: $color-black-100;
font-weight: 400;
font-size: 14px;
line-height: 16px;
}
}
&.product-price {
font-size: 0;
width: 15.15%;
&::after {
content: "Unidade";
font-family: $font-family-secundary;
color: $color-black-100;
font-weight: 400;
font-size: 14px;
line-height: 16px;
}
}
&.quantity {
width: 18.53%;
}
@include mq(md, max) { @include mq(md, max) {
&.quantity-price, &.quantity-price,
@ -130,45 +192,48 @@
height: auto; height: auto;
padding: 0; padding: 0;
width: 60px; width: 60px;
background: none;
@include mq(sm, max) { a {
width: 72px; @include mq(sm, max) {
display: block;
margin-right: 16px;
}
} }
img { img {
height: 60px; height: 60px;
max-width: 100%; max-width: unset;
width: auto; width: 60px;
transform: rotateY(180deg);
@include mq(sm, max) { object-fit: cover;
height: 72px;
width: auto;
}
} }
} }
.product-name { .product-name {
padding-right: 0; font-family: $font-family-secundary;
color: $color-black-500;
font-size: 12px;
line-height: 14px;
white-space: unset;
@include mq(lg, max) { @include mq(lg, max) {
width: 250px; width: 250px;
} }
a { a {
color: $color-blue; color: $color-black-500;
font-style: normal;
font-weight: normal;
font-size: 12px; font-size: 12px;
line-height: 14px; line-height: 14px;
transition: ease-in 0.22s all; text-decoration: none;
padding-left: 16px;
&:hover { &:hover {
color: darken($color-blue, 10);
text-decoration: none; text-decoration: none;
} }
@media (max-width: 490px) { @include mq(md, max) {
margin-left: 23px; margin: 0;
} }
} }
@ -179,9 +244,12 @@
} }
td.shipping-date { td.shipping-date {
width: 147px;
color: $color-gray2; color: $color-gray2;
font-size: 12px; font-size: 12px;
line-height: 14px; line-height: 14px;
text-align: unset;
padding: 0;
@include mq(md, max) { @include mq(md, max) {
display: none; display: none;
@ -189,7 +257,11 @@
} }
.product-price { .product-price {
text-align: unset;
min-width: 100px; min-width: 100px;
width: 148px;
padding: 0;
@include mq(md, max) { @include mq(md, max) {
min-width: 78px; min-width: 78px;
} }
@ -213,80 +285,9 @@
text-transform: lowercase; text-transform: lowercase;
} }
} }
}
td.quantity { .price-details {
align-items: center; display: none;
border: 1px solid $color-gray3;
border-radius: 0;
box-sizing: border-box;
display: flex;
justify-content: center;
margin: 6px auto 0;
max-height: 38px;
max-width: 118px;
padding: 0;
width: max-content !important;
@media (max-width: 490px) {
margin-left: 84px !important;
}
input {
background-color: $color-white;
border: 1px solid $color-gray3;
border-radius: 0;
border-width: 0 1px;
display: block;
max-height: 38px;
margin: 0 !important;
padding: 8px 0;
width: 38px;
color: $color-gray2;
box-shadow: none;
@include mq(lg, max) {
width: 24px !important;
}
}
.icon-plus-sign,
.icon-minus-sign {
&::before {
color: $color-black;
display: block;
font-weight: 500;
padding: 1px 12px;
}
}
.icon-minus-sign {
&:before {
content: "-";
font-size: 16px;
}
}
.icon-plus-sign {
&:before {
content: "+";
font-size: 14px;
}
}
.item-quantity-change {
@media (max-width: 979px) and (min-width: 768px) {
position: inherit;
bottom: inherit;
left: inherit;
height: inherit;
width: inherit;
top: inherit;
}
@media (max-width: 490px) {
padding: 0;
}
} }
} }
@ -300,14 +301,25 @@
font-weight: normal; font-weight: normal;
font-size: 14px; font-size: 14px;
line-height: 16px; line-height: 16px;
color: $color-black; color: $color-black-100;
} }
} }
.quantity-price { .quantity-price {
text-align: unset;
padding: 0;
@include mq(md, max) { @include mq(md, max) {
display: none; display: none;
} }
.total-selling-price {
text-align: unset;
font-size: 14px;
line-height: 19px;
font-weight: 700;
font-family: $font-family;
}
} }
.item-remove { .item-remove {
@ -326,7 +338,7 @@
.item-unavailable-message { .item-unavailable-message {
background-color: #d8c8ac; background-color: #d8c8ac;
color: $color-white; color: $color-white-500;
.icon-warning-sign { .icon-warning-sign {
color: #bb4f4f; color: #bb4f4f;
@ -338,6 +350,56 @@
} }
} }
.table td {
padding: 0;
}
td.quantity {
text-align: start;
border: 1px solid #f0f0f0;
border-radius: 8px;
box-sizing: border-box;
display: flex;
align-items: center;
max-width: 99px;
padding: 9px 11px;
height: 34px;
margin-top: 13px;
@include mq(md, max) {
width: 99px !important;
// margin-left: calc(60px + 16px) !important;
display: flex !important;
padding: 9px 11px !important;
}
.item-quantity-change {
@include mq(lg, max) {
position: unset !important;
width: unset !important;
height: unset !important;
}
}
.icon-minus-sign,
.icon-plus-sign {
color: $color-blue-100;
}
input {
border: none;
outline: none;
box-shadow: none;
margin: 0;
padding: 0;
flex: 1;
&:focus {
box-shadow: none;
}
}
}
.summary { .summary {
.cart-more-options { .cart-more-options {
margin: 0; margin: 0;
@ -351,12 +413,11 @@
} }
.srp-main-title { .srp-main-title {
margin: 32px 0 12px; margin: 0 0 12px;
font-style: normal;
font-weight: normal;
font-size: 24px; font-size: 24px;
line-height: 28px; line-height: 32px;
color: $color-gray2; color: $color-black-500;
font-family: $font-family;
@include mq(md, max) { @include mq(md, max) {
margin-top: 0; margin-top: 0;
@ -364,23 +425,27 @@
} }
.srp-description { .srp-description {
font-family: $font-family;
color: $color-gray2; color: $color-gray2;
font-size: 12px; font-size: 14px;
line-height: 18px; line-height: 18px;
margin: 0 0 12px; margin: 0 0 10px;
max-width: 276px;
} }
button.shp-open-options { button.shp-open-options {
background-color: $color-gray5; background-color: $color-gray1;
font-family: $font-family;
border: none; border: none;
border-radius: 5px; border-radius: 8px;
color: $color-gray2; color: $color-black-500;
font-size: 16px;
letter-spacing: 0.05em; letter-spacing: 0.05em;
font-size: 14px;
line-height: 19px; line-height: 19px;
font-weight: 500; font-weight: 500;
outline: none; outline: none;
padding: 12px 40px; padding: 12px 41px;
margin: 0;
transition: all 0.2s linear; transition: all 0.2s linear;
&:hover { &:hover {
@ -405,51 +470,42 @@
} }
.srp-pickup-my-location__button { .srp-pickup-my-location__button {
background-color: $color-black; background-color: $color-blue-100;
border: none; border: none;
border-radius: 5px; border-radius: 8px;
color: $color-white; color: $color-white-500;
outline: none; outline: none;
width: 100%; width: 100%;
font-style: normal; font-family: $font-family;
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;
&:hover {
background-color: lighten($color-black, 5);
}
&:active {
background-color: darken($color-black, 5);
}
} }
} }
.srp-toggle { .srp-toggle {
margin: 0 0 34px; margin: 0 0 20px;
&__wrapper { &__wrapper {
background-color: $color-white; background-color: $color-white-500;
border-radius: 100px; border-radius: 100px;
width: 100%; width: 100%;
font-family: $font-family; font-family: $font-family;
font-style: normal;
font-weight: normal;
font-size: 14px; font-size: 14px;
line-height: 16px; line-height: 19px;
text-transform: uppercase; text-transform: uppercase;
} }
&__current { &__current {
border: 1px solid $color-blue; border: 1px solid $color-black-500;
border-radius: 100px; border-radius: 100px;
box-shadow: 2px 2px 4px rgba($color-black-500, 0.2);
} }
.blue { .blue {
color: $color-blue; color: $color-black-500;
} }
label { label {
@ -462,6 +518,10 @@
} }
.srp-postal-code { .srp-postal-code {
.ship-country {
display: none;
}
.ship-postalCode { .ship-postalCode {
label { label {
font-family: $font-family; font-family: $font-family;
@ -469,63 +529,70 @@
font-weight: normal; font-weight: normal;
font-size: 12px; font-size: 12px;
line-height: 14px; line-height: 14px;
color: $color-black; color: $color-black-100;
margin-bottom: 12px; margin-bottom: 12px;
} }
input { input {
border: 1px solid $color-gray3; border: 1px solid $color-gray8;
border-radius: 5px; border-radius: 5px;
box-shadow: none; box-shadow: none;
color: $color-gray3; color: $color-black-500;
font-size: 12px; font-size: 14px;
line-height: 16px;
height: 36px; height: 36px;
padding: 12px 8px; padding: 12px 8px;
width: 172px; width: 172px;
} }
& ~ button { & ~ button {
background-color: $color-black; background-color: $color-blue-100;
position: absolute;
right: calc(-138px - 9px);
border: none; border: none;
border-radius: 5px; border-radius: 8px;
color: $color-white; color: $color-white-500;
font-size: 12px;
height: 36px; height: 36px;
letter-spacing: 1px; letter-spacing: 1px;
outline: none; outline: none;
position: absolute;
right: -150px;
top: 36px; top: 36px;
transition: all 0.2s linear; transition: all 0.2s linear;
width: 96px; width: 100px;
font-size: 14px;
line-height: 19px;
font-weight: 700;
letter-spacing: 0.05px;
font-family: $font-family;
text-transform: uppercase; text-transform: uppercase;
&: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-size: 0px;
font-weight: normal;
font-size: 10px;
line-height: 12px; line-height: 12px;
color: $color-blue; color: $color-black-500;
margin-top: 7px;
&::after {
content: "Não sei meu código postal";
font-family: $font-family-secundary;
color: $color-black-500;
font-size: 10px;
line-height: 12px;
text-decoration: underline;
}
} }
span.help.error { span.help.error {
font-family: $font-family;
color: red; color: red;
font-size: 12px; font-size: 12px;
line-height: 16px;
font-weight: 700;
position: absolute; position: absolute;
left: 0; left: 0;
width: 100%; width: 100%;
top: 17px; top: 15px;
} }
} }
} }
@ -591,14 +658,30 @@
} }
&-totalizers { &-totalizers {
margin: 0;
padding: 0; padding: 0;
width: 346px; max-width: 354px;
width: 100%;
@include mq(md, max) {
float: none;
margin: 0;
width: 100%;
max-width: unset;
}
.coupon-data { .coupon-data {
display: block !important;
margin: 0 0 10px;
#cart-link-coupon-add { #cart-link-coupon-add {
font-family: $font-family-secundary;
color: $color-black-500;
font-size: 12px;
line-height: 14px;
text-decoration: none; text-decoration: none;
&:hover { &:hover {
text-decoration: underline; text-decoration: none;
cursor: pointer; cursor: pointer;
} }
} }
@ -608,7 +691,7 @@
font-weight: normal; font-weight: normal;
font-size: 12px; font-size: 12px;
line-height: 14px; line-height: 14px;
color: $color-blue; color: $color-black-500;
text-decoration: none; text-decoration: none;
} }
} }
@ -630,41 +713,46 @@
} }
.coupon-label label { .coupon-label label {
margin-bottom: 12px; margin: 0;
font-family: $font-family; font-family: $font-family-secundary;
font-style: normal;
font-weight: normal;
font-size: 12px; font-size: 12px;
line-height: 14px; line-height: 14px;
color: $color-gray2; color: $color-gray2;
cursor: none; text-align: start;
} }
.coupon-fields { .coupon-fields {
margin-bottom: 32px; margin-bottom: 20px;
span {
display: flex;
i.loading-coupon {
display: none;
}
}
@include mq(sm, max) { @include mq(sm, max) {
span { span {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
i {
position: absolute;
right: 91px;
opacity: 1;
}
} }
} }
input { input {
border: 2px solid $color-gray3; border: 1px solid $color-gray5;
border-radius: 5px; border-radius: 5px;
box-shadow: none; box-shadow: none;
color: $color-gray4; color: $color-gray4;
font-size: 12px; font-size: 12px;
height: 34px; height: 36px;
padding: 0 12px; padding: 0;
max-width: 160px; max-width: 204px;
width: 100%;
float: left;
padding: 0 16px;
box-sizing: border-box;
@include mq(sm, max) { @include mq(sm, max) {
max-width: 100%; max-width: 100%;
@ -673,29 +761,32 @@
} }
button { button {
background: $color-black; background: $color-blue-100;
border: none; border: none;
border-radius: 5px; border-radius: 8px;
color: $color-white; color: $color-black-500;
font-size: 12px; font-size: 14px;
line-height: 19px;
height: 36px; height: 36px;
letter-spacing: 1px; letter-spacing: 1px;
margin-left: 6px; margin-left: 14px;
outline: none; outline: none;
transition: all 0.2s linear; transition: all 0.2s linear;
width: 94px; max-width: 133px;
width: 100%;
text-transform: uppercase; text-transform: uppercase;
text-shadow: none;
@include mq(md, max) { @include mq(md, max) {
width: 138px; width: 138px;
} }
&:hover { &:hover {
background-color: lighten($color-black, 5); background-color: lighten($color-blue-100, 5);
} }
&:active { &:active {
background-color: darken($color-black, 5); background-color: darken($color-blue-100, 5);
} }
} }
} }
@ -703,7 +794,7 @@
.accordion-group { .accordion-group {
tr { tr {
border-color: #e5e5e5; border-color: $color-gray5;
td { td {
&.empty { &.empty {
@ -712,12 +803,12 @@
&.info, &.info,
&.monetary { &.monetary {
font-style: normal; font-family: $font-family;
font-weight: normal; color: $color-black-100;
font-size: 14px; font-size: 14px;
line-height: 16px; line-height: 19px;
color: $color-black; margin: 25px 0;
padding: 12px 0; padding: 10px 0;
} }
&.info { &.info {
@ -731,13 +822,28 @@
} }
tfoot { tfoot {
td.info, font-family: $font-family;
td.monetary { font-size: 18px;
font-style: normal; line-height: 25px;
font-weight: normal; font-weight: 700;
color: $color-black-100;
td.info {
font-family: $font-family;
font-size: 18px; font-size: 18px;
line-height: 21px; line-height: 25px;
color: $color-black; font-weight: 700;
color: $color-black-100;
padding: 14px 0;
}
td.monetary {
font-family: $font-family;
font-size: 18px;
line-height: 25px;
font-weight: 700;
color: $color-black-100;
padding: 14px 0;
} }
} }
} }
@ -747,13 +853,15 @@
.cart-links-bottom { .cart-links-bottom {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 343px; max-width: 354px;
width: 100%;
@include mq(md, max) { @include mq(md, max) {
padding: 0 16px; padding: 0 16px;
width: calc(100% - 32px); width: calc(100% - 32px);
float: none; float: none;
margin-bottom: 50px; margin-bottom: 50px;
max-width: unset;
} }
@include mq(md, min) { @include mq(md, min) {
@ -764,25 +872,28 @@
.link-choose-more-products-wrapper { .link-choose-more-products-wrapper {
display: block; display: block;
text-align: center; text-align: center;
margin-bottom: 16px; margin-bottom: 15px;
text-decoration: none;
@include mq(md, max) { @include mq(md, max) {
margin-bottom: 0px; margin-bottom: 0px;
} }
a { a {
font-family: $font-family; font-family: $font-family-secundary;
font-style: normal;
font-weight: normal;
font-size: 12px; font-size: 12px;
line-height: 14px; line-height: 14px;
color: $color-blue; color: $color-black-500;
&:hover {
text-decoration: none;
}
} }
} }
.btn-place-order-wrapper { .btn-place-order-wrapper {
a { a {
background: $color-green; background: $color-blue-100;
border: none; border: none;
border-radius: 5px; border-radius: 5px;
display: block; display: block;
@ -790,17 +901,13 @@
transition: ease-in 0.22s all; transition: ease-in 0.22s all;
padding: 12px 19px; padding: 12px 19px;
&:hover {
background-color: darken($color-green, 5);
}
&:after { &:after {
content: "finalizar compra"; content: "finalizar compra";
font-family: $font-family; font-family: $font-family;
font-weight: 500; font-weight: 700;
font-size: 13px; font-size: 14px;
letter-spacing: 0.05em; letter-spacing: 0.05em;
color: $color-white; color: $color-black-500;
text-transform: uppercase; text-transform: uppercase;
vertical-align: middle; vertical-align: middle;
line-height: 19px; line-height: 19px;

View File

@ -4,6 +4,193 @@ 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;
h2 {
text-align: start;
margin-bottom: 34px;
padding: 0;
font-family: "Tenor Sans, sans-serif";
font-weight: 400;
font-size: 16px;
line-height: 19px;
}
.cart-fixed {
position: relative;
border: 1px solid #e5e5e5;
border-radius: 8px;
box-sizing: border-box;
max-height: 397px;
padding: 24px 16px;
.summary-cart-template-holder {
height: auto !important;
.cart .cart-items .product-name {
max-width: 115px;
}
}
.summary-template-holder {
.totalizers-list {
tr {
position: relative;
&:first-of-type {
&::before {
content: "";
width: calc(100% + 32px);
position: absolute;
height: 1px;
background: $color-gray8;
top: 0;
left: -16px;
}
}
&::after {
content: "";
width: calc(100% + 32px);
position: absolute;
height: 1px;
background: $color-gray8;
bottom: 0;
left: -16px;
}
}
}
td.info,
td.monetary {
padding: 0;
}
tfoot {
td.info,
td.monetary {
margin: 0;
padding: 30px 0 22px 0;
}
}
}
.payment-confirmation-wrap {
position: absolute;
top: calc(100% + 20px);
left: 0;
background: $color-green2;
border-radius: 8px;
}
.cart {
border: none;
padding: 0;
margin: 0;
height: auto !important;
ul li {
display: flex;
align-items: center;
.description {
margin-left: auto;
margin-top: unset;
font-size: 12px;
color: $color-black-100;
.price {
font-weight: 400;
}
}
}
}
}
}
.payment-data.span12 {
.accordion-heading {
&::after {
content: "Solicitamos apenas informações necessárias para realização da sua compra, sem compromenter seus dados";
font-family: "Open Sans", sans-serif;
font-weight: 400;
font-size: 14px;
line-height: 24px;
letter-spacing: -0.01em;
color: $color-gray2;
display: block;
margin: 12px 0 16px 0;
}
}
}
.payment-data {
.box-step form.form-step {
display: flex;
.steps-view {
flex: 1;
}
}
.payment-group {
margin-top: 0;
width: 209px;
margin-right: 40px;
}
}
.payment-body {
.link-gift-card {
#show-gift-card-group {
display: none;
}
}
.pg-deposito,
.pg-transferencia-bancaria,
.pg-money,
.pg-promisory---monica,
.pg-desconto-em-folha,
#payment-group-creditControlPaymentGroup,
#payment-group-creditDirectSalePaymentGroup,
#payment-group-promissoryPaymentGroup,
#payment-group-PSEPaymentGroup,
#payment-group-SPEIPaymentGroup,
[data-name="Bancolombia Transfer"] {
display: none;
}
.payment-group-list-btn {
span {
background-image: none !important;
font-family: $font-family;
color: $color-black-200;
font-size: 14px;
line-height: 24px;
text-align: center;
padding: 13px;
}
a {
background: $color-gray3;
border: 1px solid $color-black-500;
border-radius: 6px;
margin-bottom: 12px;
padding: 0;
width: 209px;
text-decoration: none;
margin-left: 0;
}
.active {
border: 1px solid $color-red-100;
background: rgba(220, 221, 227, 0.3);
margin-left: 0px;
span {
color: $color-red-100;
}
}
}
} }
.orderform-template-holder { .orderform-template-holder {
width: 66.1132%; width: 66.1132%;

View File

@ -1,38 +1,49 @@
.empty-cart { .empty-cart {
font-family: $font-family; font-family: $font-family;
&-content { &-content {
color: $color-black; color: $color-black;
text-align: center; text-align: center;
@include mq(md, max) { @include mq(md, max) {
padding: 0 16px; padding: 0 16px;
} }
} }
&-title { &-title {
font-size: 20px; font-size: 24px;
} line-height: 32px;
font-weight: 700;
text-transform: uppercase;
margin: 0;
margin-bottom: 32px;
margin-top: 170px;
padding: 0;
}
&-links { &-message {
.link-choose-products { display: none;
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;
&:hover { &-links {
background: lighten($color-black, 5); .link-choose-products {
} background: $color-white;
} border: 1px solid $color-black;
} border-radius: 0;
transition: ease-in-out 0.2s all;
font-size: 0px;
padding: 15px 65px 17px;
margin: 0;
line-height: 0;
&::after {
content: "Continuar comprando";
font-size: 14px;
line-height: 16px;
text-align: center;
font-family: $font-family-secundary;
color: $color-black;
text-transform: uppercase;
}
}
}
} }

View File

@ -8,14 +8,9 @@ html {
min-height: 100%; min-height: 100%;
} }
footer .footerCheckout__wrapper {
width: 94.9734%;
margin: auto auto 0 auto;
}
footer .footerCheckout__prateleira, footer .footerCheckout__prateleira,
header { header {
width: 79.53125%; width: 100%;
margin: 0 auto;
} }
body { body {
@ -47,34 +42,26 @@ body {
padding-left: 0; padding-left: 0;
} }
} }
.container-order-form,
.container-cart {
width: 80%;
}
} }
.btn-success { .btn-success {
background: $color-black; background: $color-black-100;
text-shadow: none; text-shadow: none;
&:hover {
background: lighten($color-black, 15%);
}
} }
.emailInfo h3 { .emailInfo h3 {
color: $color-black !important; color: $color-black-100 !important;
} }
#cart-title, #cart-title,
#orderform-title { #orderform-title {
color: $color-gray2; color: $color-black-100;
font-family: $font-family; font-family: $font-family;
font-weight: 500; font-weight: 700;
font-size: 36px; font-size: 24px;
line-height: 42px; line-height: 33px;
margin: 40px 0 30px; margin: 16px 0;
letter-spacing: 0.1em; letter-spacing: 0.05em;
text-transform: uppercase; text-transform: uppercase;
@include mq(md, max) { @include mq(md, max) {

View File

@ -1,5 +1,122 @@
/* Slider */ /* Slider */
.footerCheckout__prateleira {
margin-bottom: 56px;
.footerCheckout__prateleira-title {
font-family: "Tenor Sans";
font-style: normal;
font-weight: 400;
font-size: 24px;
line-height: 38px;
text-align: center;
color: #000000;
margin-bottom: 20px;
}
ul.footerCheckout__carrossel-itens {
display: flex;
list-style: none;
align-items: center;
margin: 0 132px;
@include mq(xl, max) {
margin: 0 16px;
}
.container-img {
margin: 0;
margin-bottom: 20px;
img {
width: 100%;
object-fit: cover;
}
}
figcaption.name-picture {
font-family: "Open Sans";
font-style: normal;
font-weight: 400;
font-size: 13px;
line-height: 18px;
text-align: center;
color: #000000;
margin-bottom: 20px;
}
li.slick {
ul.number {
display: flex;
list-style: none;
margin: 0;
justify-content: center;
margin-bottom: 20px;
text {
display: none;
}
li {
background: #00c8ff;
border-radius: 8px;
font-family: "Open Sans";
font-style: normal;
font-weight: 700;
font-size: 13px;
line-height: 18px;
letter-spacing: 0.05em;
text-transform: uppercase;
color: #ffffff;
padding: 5px;
margin: 0 2.5px;
}
}
button {
height: 42px;
width: 100%;
background: #00c8ff;
border-radius: 8px;
border: 0;
a {
font-family: "Open Sans";
font-weight: 700;
font-size: 13px;
line-height: 18px;
letter-spacing: 0.05em;
text-transform: uppercase;
color: #ffffff;
}
}
}
.slick-dots {
display: none !important;
}
.slick-next {
content: "";
background-image: url("https://agenciamagma.vteximg.com.br/arquivos/arrow-right-M3Academy.svg");
display: block;
background-size: 100% 100%;
background-repeat: no-repeat;
background-color: transparent;
height: 29.47px;
width: 13px;
border: 0;
cursor: pointer;
}
.slick-prev {
content: "";
background-image: url("https://agenciamagma.vteximg.com.br/arquivos/arrow-left-M3Academy.svg");
display: block;
background-size: 100% 100%;
background-repeat: no-repeat;
background-color: transparent;
height: 29.47px;
width: 13px;
border: 0;
cursor: pointer;
}
}
}
.slick-slider { .slick-slider {
position: relative; position: relative;
display: block; display: block;
@ -18,7 +135,7 @@
position: relative; position: relative;
overflow: hidden; overflow: hidden;
display: block; display: block;
margin: 0; margin: 0 -8px;
padding: 0; padding: 0;
&:focus { &:focus {
@ -62,6 +179,7 @@
} }
} }
.slick-slide { .slick-slide {
margin: 0 8px;
float: left; float: left;
height: 100%; height: 100%;
min-height: 1px; min-height: 1px;

View File

@ -1,35 +1,75 @@
/* _footer.scss */ /* _footer.scss */
.footerCheckout { .footerCheckout {
border-top: none;
color: $color-gray2; color: $color-gray2;
&__wrapper { &__wrapper {
align-items: center; align-items: center;
display: flex; display: flex;
}
.container {
border-top: 1px solid $color-black;
display: flex;
align-items: center;
padding: 0 16px;
width: 100%;
justify-content: space-between; justify-content: space-between;
@media (min-width: 1200px) {
width: 100%;
}
@include mq(md, max) {
margin: 0 0 0 9px;
display: grid;
}
}
.color-img {
background-color: rgb(238, 238, 238);
} }
&__address { &__address {
color: $color-gray2;
font-family: $font-family; font-family: $font-family;
font-style: normal; color: $color-gray2;
font-weight: normal; margin: 27px 0 24px 0;
width: 269px;
font-size: 10px; font-size: 10px;
line-height: 12px; line-height: 12px;
text-transform: capitalize; text-transform: capitalize;
max-width: 40%;
@include mq(md, max) { @include mq(xl, max) {
margin-bottom: 24px; margin-bottom: 24px;
max-width: 100%; max-width: 100%;
} }
@include mq(2xl, min) {
font-family: $font-family;
color: $color-black;
width: 537px;
font-size: 20px;
line-height: 27px;
text-transform: capitalize;
}
@include mq(xl, max) {
margin: 0px 0 16px 7px;
font-family: $font-family;
color: $color-black;
font-size: 10px;
line-height: 14px;
width: 269px;
text-transform: capitalize;
}
} }
&__stamps { &__stamps {
align-items: center;
display: flex; display: flex;
align-items: center;
justify-self: center; justify-self: center;
list-style: none; list-style: none;
width: 404px;
margin: 16px auto 16px auto;
@include mq(md, max) { @include mq(md, max) {
align-self: center; align-self: center;
@ -37,33 +77,66 @@
} }
&__divider { &__divider {
background-color: $color-gray4;
display: inline-block; display: inline-block;
background-color: $color-gray4;
height: 24px; height: 24px;
margin: 0 8px; margin: 0 8px;
width: 1px; width: 1px;
} }
@include mq(2xl, min) {
width: 690px;
}
@include mq(xl, max) {
width: 342px;
order: -1;
}
} }
&__developedBy { &__developedBy {
align-items: center;
display: flex; display: flex;
list-style-type: none; align-items: center;
margin: 0; margin: 0;
margin-bottom: 16px;
list-style-type: none;
li:last-child { .vtex-logo,
margin-left: 16px; .m3-logo {
height: 16px;
margin-right: 8px;
}
.by-m3 {
display: flex;
}
.by-vtex {
display: flex;
}
.list {
@include mq(2xl, min) {
font-family: "Open Sans";
font-style: normal;
font-weight: 400;
font-size: 18px;
line-height: 25px;
width: 388px;
}
@include mq(xl, max) {
margin: 0 0 16px 7px;
}
} }
a { a {
align-items: center;
color: $color-gray2;
display: flex; display: flex;
font-family: $font-family; font-family: $font-family;
font-style: normal; color: $color-gray2;
font-weight: normal;
font-size: 10px; font-size: 10px;
line-height: 12px; line-height: 12px;
align-items: center;
text-decoration: none; text-decoration: none;
span { span {

View File

@ -1,32 +1,174 @@
/* _header.scss */ /* _header.scss */
.headerCheckout { .headerCheckout {
border-bottom: 1px solid $color-black;
.container { .container {
width: auto !important; width: auto !important;
height: 65px;
@include mq(xl, min) {
height: 95px;
}
@include mq(2xl, min) {
height: 149.2px;
}
} }
&__wrapper { &__wrapper {
align-items: center;
display: flex; display: flex;
align-items: center;
justify-content: space-between; justify-content: space-between;
height: 100%;
margin: 0 16px;
@include mq(xl, min) {
margin: 0 131px;
}
@include mq(2xl, min) {
margin: 0 256px;
}
} }
&__logo { &__logo {
img { img {
height: 52px; height: 33px;
width: auto; max-width: 155.58px;
object-fit: cover;
@include mq(xl, min) {
width: 155.58px;
}
@include mq(2xl, min) {
max-width: 382.7px;
height: 91.2px;
}
}
}
.progress-bar {
width: 43.123772102161%;
@include mq(xl, max) {
width: 0;
}
@include mq(2xl, min) {
width: 52.6787109375%;
}
.list {
display: flex;
justify-content: center;
margin: 0;
.central {
width: 33%;
}
.laterais {
position: relative;
width: 33%;
display: flex;
justify-content: center;
}
.progress-bar-circle-1,
.progress-bar-circle-2,
.progress-bar-circle-3 {
margin: 0 auto;
align-items: center;
border: 1px solid $color-black;
border-radius: 50%;
height: 12px;
width: 12px;
&.active {
background: $color-black;
}
@include mq(2xl, min) {
width: 24px;
height: 24px;
}
}
.progress-bar-line-1,
.progress-bar-line-2 {
margin: 0;
border: 1px solid $color-black;
width: 100%;
transform: translateY(-50%);
bottom: 5px;
position: absolute;
max-width: calc(100% - 14px);
@include mq(2xl, min) {
max-width: calc(100% - 26px);
bottom: 10px;
}
}
.progress-bar-line-1 {
left: calc(50% + 6px);
@include mq(2xl, min) {
left: calc(50% + 12px);
}
}
.progress-bar-line-2 {
right: calc(50% + 6px);
@include mq(2xl, min) {
right: calc(50% + 12px);
}
}
}
}
.progress-bar-text {
display: flex;
align-items: center;
justify-content: center;
font-family: $font-family-secundary;
font-size: 12px;
line-height: 14px;
color: $color-black;
margin-top: 0;
margin-bottom: 9px;
@include mq(2xl, min) {
font-size: 24px;
line-height: 28px;
} }
} }
&__safeBuy { &__safeBuy {
display: flex;
align-items: center;
img {
width: 12px;
height: 13.33px;
margin-right: 8px;
@include mq(2xl, min) {
width: 29.47px;
height: 41.46px;
}
}
span { span {
align-items: center;
display: flex;
text-transform: uppercase; text-transform: uppercase;
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-gray; color: $color-black;
@include mq(2xl, min) {
font-size: 24px;
line-height: 33px;
}
} }
i { i {

View File

@ -2,37 +2,55 @@
@import url("https://fonts.googleapis.com/css2?family=Tenor+Sans&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Tenor+Sans&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700;800&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700;800&display=swap");
$font-family: "Open Sans", sans-serif; $font-family: "Open Sans", sans-serif;
$font-family-secundary:"Tenor Sans", sans-serif; $font-family-secundary: "Tenor Sans", sans-serif;
/* Colors */ /* Colors */
$color-black: #292929; $color-black: black;
$color-black-500: black;
$color-black-100: #292929;
$color-black-200: #58595b;
$color-black-1000: #000000;
$color-white: #fff; $color-red-100: #f15a31;
$color-white: white;
$color-white-500: #fff;
$color-white-1000: white;
$color-gray: #6c6c6c; $color-gray: #6c6c6c;
$color-gray1: #ededed;
$color-gray2: #7d7d7d; $color-gray2: #7d7d7d;
$color-gray3: #f0f0f0; $color-gray3: #f0f0f0;
$color-gray4: #8d8d8d; $color-gray4: #8d8d8d;
$color-gray5: #e5e5e5; $color-gray5: #e5e5e5;
$color-gray6: #c4c4c4;
$color-gray7: #989898;
$color-gray8: #e0e0e0;
$color-gray9: #f2f2f2;
$color-gray10: #808080;
$color-gray12: grey;
$color-blue: #4267b2; $color-blue: #4267b2;
$color-blue-100: #00c8ff;
$color-green: #4caf50; $color-green: #4caf50;
$color-green2: #298541;
/* Grid breakpoints */ /* Grid breakpoints */
$grid-breakpoints: ( $grid-breakpoints: (
xs: 0, xs: 0,
cstm: 400, cstm: 400,
sm: 576px, sm: 576px,
md: 768px, md: 768px,
lg: 992px, lg: 992px,
xl: 1200px xl: 1025px,
2xl: 2500px,
) !default; ) !default;
$z-index: ( $z-index: (
level1: 5, level1: 5,
level2: 10, level2: 10,
level3: 15, level3: 15,
level4: 20, level4: 20,
level5: 25 level5: 25,
) !default; ) !default;