Merge pull request 'development' (#14) from development into main

Reviewed-on: #14
This commit is contained in:
Luiz Felipe Silva 2022-12-27 00:20:28 +00:00
commit 6b6c98adfe
14 changed files with 2112 additions and 656 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
*node_modules *node_modules
node_modules node_modules
yarn.lock
# para arquivos sass e scss # para arquivos sass e scss

View File

@ -7,34 +7,195 @@ export default class Footer {
async init() { async init() {
await this.selectors(); await this.selectors();
// this.onUpdate(); this.onUpdate();
this.criaFooter();
this.criaPrateleira();
this.criaCarrossel();
} }
async selectors() { async selectors() {
//Para verificar se o carrinho está vazio e remover a prateleira de produtos: // Containers
// vocês devem olhar a doc fornecida no Desafio para aprender a usar o waitElement this.containerMain = document.querySelector("body .container-main");
this.cartTemplate = document.querySelector(".cart-template");
this.checkoutContainer = document.querySelector(".checkout-container");
// Checkout
this.checkoutVazio = await waitElement(".empty-cart-content"); this.checkoutVazio = await waitElement(".empty-cart-content");
this.checkoutTitle = document.querySelector("#cart-title");
this.checkoutButton = document.querySelector("#cart-choose-products");
// Footer
this.checkoutAddress = document.querySelector(".footerCheckout__address");
this.cardsIcons = document.querySelector(".footerCheckout__stamps").firstElementChild;
this.vtexIcon = document.querySelector(".footerCheckout__stamps").lastElementChild;
this.poweredBy = document.querySelector(".footerCheckout__developedBy").firstElementChild;
this.developedBy = document.querySelector(".footerCheckout__developedBy").lastElementChild;
// Prateleira
this.prateleira = document.querySelector(".footerCheckout__prateleira");
} }
onUpdate() { onUpdate() {
//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
// 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;
let containerMain = this.containerMain;
let cartTemplate = this.cartTemplate;
let checkoutContainer = this.checkoutContainer;
let checkoutTitle = this.checkoutTitle;
let checkoutButton = this.checkoutButton;
let prateleira = this.prateleira;
let config = { childList: true, attributes: true }; let config = { childList: true, attributes: true };
let observer = new MutationObserver((mutations) => { let observer = new MutationObserver((mutations) => {
mutations.forEach(function (mutation) { mutations.forEach(function (mutation) {
console.log(mutation.type); if (target.style.display != "none") {
if (document.querySelector(".prateleiraTitle") != null) {
document.querySelector(".prateleiraTitle").style.display = "none";
}
containerMain.style.display = "flex";
containerMain.style.height = "100%";
checkoutTitle.style.display = "none";
checkoutButton.innerHTML = "Continuar comprando";
cartTemplate.style.display = "flex";
prateleira.style.display = "none";
} else {
if (document.querySelector(".prateleiraTitle") != null) {
document.querySelector(".prateleiraTitle").style.display = "block";
}
containerMain.style.display = "block";
containerMain.style.height = "max-content";
checkoutTitle.style.display = "block";
cartTemplate.style.height = "max-content";
cartTemplate.style.display = "block";
prateleira.style.display = "block";
if (window.location.hash != "#/cart") {
checkoutTitle.style.display = "none";
prateleira.style.display = "none";
}
if (window.location.hash == "#/email") {
containerMain.style.height = "100%";
checkoutContainer.style.overflow = "initial"
}
}
}); });
}); });
observer.observe(target, config); observer.observe(target, config);
} }
async addCarrossel() {
const elemento = await waitElement("#my-element"); criaFooter() {
$(elemento).slick({ this.checkoutAddress.innerHTML = `
slidesToShow: 4, <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
slidesToScroll: 1, `;
this.cardsIcons.innerHTML = `
<figure>
<img src="https://agenciamagma.vteximg.com.br/arquivos/mastercardM3Academy.png" alt="Mastercard">
</figure>
<figure>
<img src="https://agenciamagma.vteximg.com.br/arquivos/visaM3Academy.png" alt="Visa">
</figure>
<figure>
<img src="https://agenciamagma.vteximg.com.br/arquivos/amexM3Academy.png" alt="Amex">
</figure>
<figure>
<img src="https://agenciamagma.vteximg.com.br/arquivos/eloM3Academy.png" alt="Elo">
</figure>
<figure>
<img src="https://agenciamagma.vteximg.com.br/arquivos/hiperCardM3Academy.png" alt="HiperCard">
</figure>
<figure>
<img src="https://agenciamagma.vteximg.com.br/arquivos/payPalM3Academy.png" alt="PayPal">
</figure>
<figure>
<img src="https://agenciamagma.vteximg.com.br/arquivos/boletoM3Academy.png" alt="Boleto">
</figure>
`;
this.vtexIcon.innerHTML = `
<figure>
<img src="https://agenciamagma.vteximg.com.br/arquivos/vtexPCIM3Academy.png" alt="VTEX PCI">
</figure>
`;
this.poweredBy.innerHTML = `
<div>
<p>Powered By</p>
<figure>
<img src="https://agenciamagma.vteximg.com.br/arquivos/logoVTEXM3Academy.png" alt="VTEX">
</figure>
</div>
`;
this.developedBy.innerHTML = `
<div>
<p>Developed By</p>
<figure>
<img src="https://agenciamagma.vteximg.com.br/arquivos/logoM3M3Academy.png" alt="M3 Academy">
</figure>
</div>
`;
}
async criaPrateleira() {
const urlAPI =
"https://m3academy.myvtex.com/api/catalog_system/pub/products/search/?fq=productClusterIds:319";
let prateleira = this.prateleira;
prateleira.innerHTML = `
<h2 class="prateleiraTitle">Você também pode gostar:</h2>
<ul class="carrossel-items"></ul>
`;
fetch(urlAPI)
.then((response) => {
return response.json();
})
.then((data) => {
return data.map((product) => {
let li = document.createElement("li");
li.setAttribute("id", product.productId);
li.innerHTML = `
<img src="${product.items[0].images[0].imageUrl}" alt="${
product.productName
}"/>
<p class="product-name">${product.productName}</p>
<div class="product-variation">${product.items
.map((name) => {
return `<a name="product-variation__item" class="product-variation__item">${name.name}</a>`;
})
.join("")}
</div>
<button class="product-button">Ver produto</button>
`;
prateleira.children[1].appendChild(li);
});
}); });
} }
async criaCarrossel() {
const prateleira = await waitElement(".carrossel-items");
setTimeout(() => {
$(prateleira).slick({
slidesToShow: 4,
slidesToScroll: 1,
autoplay: true,
autoplaySpeed: 2000,
});
}, 600);
}
} }

View File

@ -4,18 +4,75 @@ import { waitElement } from "m3-utils";
export default class Header { export default class Header {
constructor() { constructor() {
this.init(); this.init();
this.criaBarraProgresso();
} }
async init() { async init() {
await this.selectors(); await this.selectors();
console.log(this.item); this.monitoraBarraProgresso();
} }
async selectors() { async selectors() {
this.item = await waitElement("#my-element", { this.barraProgresso = document.querySelector(".progress-bar");
//#my-element pode ser a class ou o id do elemento html qeu vocÊ quer pegar this.circulo1 = await waitElement(".progress-bar__circle1");
timeout: 5000, // vai esperar 5 segundos antes de rejeitar a promise this.circulo2 = await waitElement(".progress-bar__circle2");
interval: 1000, // vai verificar a cada 1 segundo se o elemento existe this.circulo3 = await waitElement(".progress-bar__circle3");
}); }
criaBarraProgresso() {
this.barraProgresso.innerHTML = `
<ul class="progress-bar__container">
<li class="progress-bar__container-items">
<div class="progress-bar__wrapper">
<div class="progress-bar__container-item">
<p class="progress-bar__text">Meu Carrinho</p>
<p class="progress-bar__circle1 active"></p>
<p class="progress-bar__line1"></p>
</div>
</div>
</li>
</ul>
<ul class="progress-bar__container">
<li class="progress-bar__container-items">
<div class="progress-bar__wrapper">
<div class="progress-bar__container-item">
<p class="progress-bar__text">Dados Pessoais</p>
<p class="progress-bar__circle2"></p>
</div>
</div>
</li>
</ul>
<ul class="progress-bar__container">
<li class="progress-bar__container-items">
<div class="progress-bar__wrapper">
<div class="progress-bar__container-item">
<p class="progress-bar__text">Pagamento</p>
<p class="progress-bar__circle3"></p>
<p class="progress-bar__line2"></p>
</div>
</div>
</li>
</ul>
`;
}
monitoraBarraProgresso() {
setInterval(() => {
if (window.location.hash == "#/cart") {
this.circulo1.classList.add("active");
this.circulo2.classList.remove("active");
this.circulo3.classList.remove("active");
} else if (window.location.hash != "#/cart" && window.location.hash != "#/payment") {
this.circulo1.classList.remove("active");
this.circulo2.classList.add("active");
this.circulo3.classList.remove("active");
} else if (window.location.hash == "#/payment") {
this.circulo1.classList.remove("active");
this.circulo2.classList.remove("active");
this.circulo3.classList.add("active");
}
}, 100);
} }
} }

View File

@ -3,3 +3,4 @@
@import "./partials/header"; @import "./partials/header";
@import "./partials/footer"; @import "./partials/footer";
@import "./checkout/checkout.scss"; @import "./checkout/checkout.scss";
@import "./partials/prateleira";

View File

@ -1,16 +1,144 @@
.checkout-container {
.client-pre-email {
border-color: $color-gray4;
font-family: $font-family;
padding-top: 8px;
.link-cart { .mini-cart {
a { .cart {
color: $color-black; @include mq(xl, min) {
max-height: initial;
}
}
}
.checkout-container {
.mini-cart {
.affix-top,
.affix {
height: 409px !important;
@include mq(xl, min) {
height: 630px !important;
}
.summary-cart-template-holder {
height: 36% !important;
@include mq(xl, min) {
height: auto !important;
}
}
.cart {
border: none;
ul li:not(:first-child) {
padding: 0;
margin: 0;
}
}
.summary-template-holder {
.accordion-group {
.accordion-inner {
tbody {
tr {
border: 1px solid $color-gray9;
border-left: 0;
border-right: 0;
td.info,
td.monetary {
padding: 20px 17px;
font-family: $font-family;
font-size: 14px; font-size: 14px;
font-weight: 400;
line-height: 19px;
color: $color-gray2;
@include mq(xl, min) {
font-size: 28px;
line-height: 38px;
}
}
td.info {
width: -webkit-fill-available;
@include mq(xl, min) {
width: max-content;
}
}
td.monetary {
width: 100%;
@include mq(xl, min) {
width: 20px;
}
}
}
}
tfoot {
td.info,
td.monetary {
padding: 25px 17px 0 17px;
}
td.info {
width: -webkit-fill-available;
@include mq(xl, min) {
width: max-content;
}
}
td.monetary {
width: 100%;
}
}
}
}
}
}
#go-to-cart-button {
a {
font-family: $font-family;
font-size: 12px;
font-weight: 400;
line-height: 16px;
color: $color-black2;
text-decoration: none;
margin: 10px 17px 5px 0;
@include mq(xl, min) {
font-size: 24px;
line-height: 33px;
}
&:hover { &:hover {
color: lighen($color-black, 10); text-decoration: underline;
}
}
}
}
.client-pre-email {
border-color: $color-black2;
font-family: $font-family;
.link-cart {
margin-top: 9px;
a {
font-family: $font-family-secundary;
font-size: 14px;
font-weight: 400;
line-height: 16px;
text-transform: uppercase;
color: $color-black2;
@include mq(xl, min) {
font-size: 28px;
line-height: 33px;
} }
} }
} }
@ -21,31 +149,52 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
h3 { span,
margin-bottom: 16px;
span {
color: #303030;
font-size: 24px;
}
small { small {
color: $color-gray4; font-family: $font-family-secundary;
font-size: 20px;
font-weight: 400;
line-height: 23px;
text-transform: uppercase;
color: $color-black2;
@include mq(xl, min) {
font-size: 40px;
line-height: 47px;
} }
} }
} }
.client-email { .client-email {
margin: 0 0 16px; margin: 6px 0 9px;
max-width: 562px;
@include mq(xl, min) {
max-width: 971px;
}
i {
right: 130px;
top: 6px;
}
input { input {
font-size: 12px;
font-weight: 400;
line-height: 16px;
height: 50px;
box-shadow: none; box-shadow: none;
color: $color-black; color: $color-black1;
font-family: $font-family; font-family: $font-family;
padding: 0 16px; padding: 0 15px;
border: 2px solid $color-gray3; border: 1px solid $color-black2;
box-sizing: border-box; box-sizing: border-box;
border-radius: 5px; border-radius: 5px 10px 10px 5px;
@include mq(xl, min) {
font-size: 24px;
line-height: 33px;
}
@media (max-width: 490px) { @media (max-width: 490px) {
width: auto; width: auto;
@ -53,13 +202,24 @@
} }
button { button {
background-color: $color-black; height: 50px;
border-radius: 5px; width: 126px;
background-color: $color-blue2;
border-radius: 0px 8px 8px 0px;
border: none; border: none;
font-family: $font-family;
height: 54px;
right: 0; right: 0;
top: 0; top: 0;
outline: 0;
span {
font-family: $font-family;
font-size: 14px;
font-weight: 700;
line-height: 19px;
letter-spacing: 0.05em;
color: $color-black2;
text-transform: uppercase;
}
@media (max-width: 490px) { @media (max-width: 490px) {
height: 48px; height: 48px;
@ -69,19 +229,47 @@
} }
span.help.error { span.help.error {
font-family: $font-family;
font-size: 12px;
font-weight: 700;
line-height: 16px;
color: red; color: red;
text-transform: capitalize;
margin-top: 3px;
@include mq(xl, min) {
font-size: 24px;
line-height: 33px;
}
} }
} }
.emailInfo { .emailInfo {
margin: 11px auto 0 auto;
padding: 16px; padding: 16px;
background-color: $color-white; background-color: $color-white1;
border: 1px solid $color-gray4; border: 1px solid $color-black2;
border-radius: 0; color: $color-black2;
font-family: $font-family;
font-size: 12px;
font-weight: 700;
line-height: 16px;
max-width: 400px;
border-radius: 5px;
@include mq(xl, min) {
max-width: 776px;
font-size: 24px;
line-height: 33px;
}
h3 { h3 {
color: #303030;
margin: 0 0 8px 0; margin: 0 0 8px 0;
@include mq(xl, min) {
font-size: 24px;
line-height: 33px;
}
} }
ul { ul {
@ -89,42 +277,132 @@
li { li {
span { span {
color: $color-black; color: $color-black2;
} }
i::before { i::before {
color: $color-black; color: $color-blue2;
font-size: 1rem; font-size: 1rem;
opacity: 1; opacity: 1;
width: 17px;
height: 10px;
@include mq(xl, min) {
font-size: 25px;
width: 33px;
height: 23px;
}
} }
} }
} }
i::before { i::before {
color: $color-black; color: $color-black1;
font-size: 6rem; font-size: 7rem;
opacity: 0.5; opacity: 0.5;
@include mq(xl, min) {
font-size: 150px;
} }
} }
} }
label {
margin-top: 45px;
}
}
.client-profile-data.filled {
height: 106px;
}
.shipping-data, .shipping-data,
.payment-data, .payment-data,
.client-profile-data { .client-profile-data {
#client-email {
width: 96.4%;
@include mq(xl, min) {
height: 61px;
width: 97.7%;
}
}
.accordion-group { .accordion-group {
border-radius: 0; border-radius: 8px;
border: 1px solid $color-gray4; border: 1px solid $color-gray9;
font-family: $font-family; font-family: $font-family;
padding: 16px; padding: 20px 16px;
@include mq(xl, min) {
padding: 24px 34px;
}
&:nth-child(1) {
padding: 20px 16px 24px 16px;
@include mq(xl, min) {
padding: 24px 34px;
}
}
.accordion-heading { .accordion-heading {
span {
color: #303030;
margin-bottom: 8px; margin-bottom: 8px;
.accordion-toggle {
span {
@include mq(xl, min) {
margin: 0;
}
}
}
.collapsed {
a {
padding: 8px 8px 6px 0px;
}
}
span {
display: flex;
flex-direction: row-reverse;
align-items: center;
justify-content: space-between;
padding: 0; padding: 0;
font-family: $font-family-secundary;
font-size: 16px;
font-weight: 400;
line-height: 19px;
color: $color-black2;
@include mq(xl, min) {
font-size: 32px;
line-height: 37px;
margin-bottom: 15px;
}
.link-box-edit {
background-color: transparent;
outline: 0;
opacity: 100%;
border: none;
box-shadow: none;
}
[class^="icon-"]:not(.icon-user:first-child) {
content: url("https://agenciamagma.vteximg.com.br/arquivos/lapisM3Academy.png");
cursor: pointer;
width: 20px;
height: 20px;
@include mq(xl, min) {
width: 40px;
height: 40px;
}
}
i::before { i::before {
fill: #303030; display: none;
} }
} }
@ -133,44 +411,155 @@
background-color: #303030; background-color: #303030;
border-radius: 8px; border-radius: 8px;
border: none; border: none;
color: $color-white; color: $color-white1;
display: flex; display: flex;
justify-content: center; justify-content: center;
padding: 6px 5px 6px 8px; padding: 6px 5px 6px 8px;
} }
} }
ul {
display: none;
}
.accordion-inner { .accordion-inner {
padding: 0; padding: 0;
margin-top: 8px;
@include mq(xl, min) {
font-size: 28px;
line-height: 38px;
}
.box-info {
font-family: $font-family;
font-size: 12px;
font-weight: 400;
line-height: 16px;
letter-spacing: 0em;
@include mq(xl, min) {
font-size: 28px;
line-height: 38px;
}
.client-profile-email {
margin: 15px 0 0;
}
.client-profile-summary {
.name {
display: flex;
flex-direction: column;
margin: 5px 0;
}
.tel {
margin-bottom: 20px;
}
}
br {
display: none;
}
}
/* General configurations */ /* General configurations */
.client-notice { .client-notice {
color: $color-black; display: none;
color: $color-black1;
}
.newsletter {
@include mq(xl, min) {
margin: 12px 0;
}
} }
p { p {
label { label {
color: $color-black; display: flex;
font-weight: 500; align-items: center;
font-family: $font-family;
font-size: 14px;
font-weight: 400;
line-height: 19px;
color: $color-gray2;
@include mq(xl, min) {
font-size: 28px;
line-height: 38px;
}
}
.newsletter-label {
height: 18px;
margin-top: -5px;
#opt-in-newsletter {
margin-right: 8px;
width: 18px;
height: 18px;
min-width: auto;
@include mq(xl, min) {
width: 35px;
height: 35px;
}
}
.newsletter-text {
font-family: $font-family;
font-size: 12px;
font-weight: 400;
line-height: 16px;
@include mq(xl, min) {
font-size: 24px;
line-height: 33px;
}
}
} }
select, select,
input { input {
border-radius: 0; border-radius: 5px;
border: 1px solid $color-gray4; border: 1px solid $color-gray9;
box-shadow: none; box-shadow: none;
height: 42px;
padding: 0 0 0 11px;
margin-bottom: 4px;
min-width: 143px;
@include mq(xl, min) {
min-width: 270px;
height: 61px;
font-size: 28px;
line-height: 38px;
}
} }
.help.error { .help.error {
color: red; color: red;
margin-top: 0;
@include mq(xl, min) {
font-size: 23px;
width: auto;
} }
} }
}
.client-first-name,
.client-document {
margin-right: 15px;
}
.box-client-info-pj { .box-client-info-pj {
.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-black1;
font-weight: 500; font-weight: 500;
text-decoration: underline; text-decoration: underline;
} }
@ -182,57 +571,134 @@
button.submit { button.submit {
border: none; border: none;
border-radius: 5px; border-radius: 8px;
background: $color-black; background: $color-blue2;
margin-top: 8px; margin: 44px 0 24px 0;
outline: none; outline: none;
transition: all 0.2s linear; display: block;
font-family: $font-family;
font-size: 14px;
font-weight: 700;
line-height: 19px;
letter-spacing: 0.05em;
text-transform: uppercase;
width: 100%;
&:hover { @include mq(xl, min) {
background: lighten($color-black, 5); font-size: 28px;
} line-height: 38px;
height: 61px;
&:active {
background: darken($color-black, 5);
} }
} }
/* Shipping configurations */ /* Shipping configurations */
.ship-postalCode small a { .ship-postalCode {
color: #303030; label {
font-weight: 500; font-family: $font-family;
text-decoration: underline; font-size: 12px;
font-weight: 700;
line-height: 16px;
color: $color-gray2;
} }
input {
min-width: 96%;
}
small {
margin: 1px 0 0 0;
a {
font-weight: 500;
text-decoration: underline;
font-family: $font-family;
font-size: 12px;
font-weight: 400;
line-height: 16px;
color: $color-black1;
}
}
}
.vtex-omnishipping-1-x-deliveryGroup { .vtex-omnishipping-1-x-deliveryGroup {
p { p {
color: #303030; font-family: $font-family;
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 700;
line-height: 19px;
color: $color-gray2;
margin: -7px 0 7px 0;
} }
.shp-lean { .shp-lean {
border: 1px solid $color-gray4; border: 1px solid $color-gray9;
border-radius: 0; border-radius: 8px;
label { label {
background-color: $color-white; background-color: $color-white1;
box-shadow: none; box-shadow: none;
color: #303030; color: #303030;
padding: 8px 12px; padding: 8px 12px;
svg path {
fill: #d8c8ac;
} }
.vtex-omnishipping-1-x-leanShippingOption {
svg {
background-image: url("https://agenciamagma.vteximg.com.br/arquivos/icon-radios-input-M3Academy.png");
width: 18px;
height: 18px;
border-radius: 3px;
path {
fill: transparent;
}
}
}
.vtex-omnishipping-1-x-leanShippingOptionActive {
background-color: $color-white2;
svg {
background-image: url("https://agenciamagma.vteximg.com.br/arquivos/icon-radios-input-Active-M3Academy.png");
}
path {
fill: transparent;
}
}
.vtex-omnishipping-1-x-leanShippingText {
border-right: 1px solid $color-gray9;
.shp-option-text-label,
.shp-option-text-time {
font-family: $font-family;
font-size: 12px;
font-weight: 400;
line-height: 16px;
color: $color-gray2;
}
}
.vtex-omnishipping-1-x-optionPrice {
font-family: $font-family;
font-size: 12px;
font-weight: 400;
line-height: 16px;
color: $color-gray2;
padding-left: 6px;
} }
} }
} }
.delivery-address-title { .delivery-address-title {
color: #303030; font-family: $font-family;
font-size: 14px; font-size: 12px;
font-weight: 500; font-weight: 700;
line-height: 16px;
letter-spacing: 0.05em;
text-align: left;
color: $color-gray2;
margin: -12px 0 7px 0;
} }
.shp-summary-group-info { .shp-summary-group-info {
@ -240,20 +706,36 @@
} }
.address-summary { .address-summary {
background: none; background: $color-white1;
border-color: $color-gray4; border-color: $color-gray9;
border-radius: 0; border-radius: 8;
color: #303030; padding: 12px 12px 12px 44px;
padding: 12px;
@include mq(md, max) { @include mq(md, max) {
background-position: 8px 9px; background-position: 8px 9px;
} }
span {
font-family: $font-family;
font-size: 12px;
font-weight: 400;
line-height: 16px;
color: $color-gray2;
}
a { a {
color: #303030; font-family: $font-family;
font-weight: 500; text-transform: lowercase;
text-decoration: underline; font-size: 12px;
font-weight: 400;
line-height: 16px;
color: $color-blue2;
text-decoration: none;
margin-left: 56px;
}
:nth-child(6) {
display: none;
} }
} }
@ -270,18 +752,69 @@
padding-left: 16px; padding-left: 16px;
} }
.vtex-omnishipping-1-x-address {
input {
width: 314px;
height: 35px;
margin-bottom: 2px;
}
label {
display: inline-flex;
font-family: $font-family;
font-size: 12px;
font-weight: 700;
line-height: 16px;
letter-spacing: 0.05em;
}
#ship-state {
display: block;
width: 314px;
outline: none;
}
}
.vtex-omnishipping-1-x-submitPaymentButton {
button {
margin: -11px 0 20px 0;
}
}
.vtex-omnishipping-1-x-addressFormPart1 {
.ship-country {
display: none;
}
}
.vtex-omnishipping-1-x-addressSummaryActive {
.address-summary {
background: url("https://agenciamagma.vteximg.com.br/arquivos/homeM3Academy.png")
no-repeat;
background-size: 25px;
background-position: 10px 19px;
}
}
.vtex-omnishipping-1-x-deliveryChannelsWrapper {
margin: 22px 0 25px;
}
.vtex-omnishipping-1-x-summaryChange { .vtex-omnishipping-1-x-summaryChange {
border-color: #303030; color: $color-gray6;
color: #303030; }
.vtex-omnishipping-1-x-deliveryChannelsOption {
color: $color-gray6;
} }
.vtex-omnishipping-1-x-deliveryChannelsToggle { .vtex-omnishipping-1-x-deliveryChannelsToggle {
background-color: #d8c8ac; background-color: $color-white1;
border: 1px solid #d8c8ac; border: 1px solid $color-black2;
} }
.vtex-omnishipping-1-x-deliveryOptionActive { .vtex-omnishipping-1-x-deliveryOptionActive {
text-shadow: 1.3px 1px lighten($color-black, 50); color: $color-black2;
} }
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,116 @@ body .container-main.container-order-form .orderform-template.active {
margin-right: 0; margin-right: 0;
float: right; float: right;
} }
.orderform-template-holder { .orderform-template-holder {
width: 66.1132%; width: 66.1132%;
} }
.shipping-summary-placeholder {
.address-summary-BRA {
// Alterar depois
display: grid;
grid-template-columns: repeat(3, max-content);
grid-template-rows: repeat(2, max-content);
padding: 0;
margin: 10px 0 18px 0;
.postalCode {
grid-column: 2;
}
span {
.number-delimiter {
display: none;
}
}
}
.link-change-shipping {
display: none;
}
.shp-summary-package {
padding: 0;
margin-bottom: 14px;
}
.shp-summary-group {
padding: 0;
}
.shp-summary-group-info {
border: none;
}
.shp-summary-group-price {
display: none;
}
}
.payment-data.span12 {
.accordion-heading {
display: flex;
.accordion-toggle {
flex-direction: row;
}
i {
display: none;
}
}
.accordion-inner {
.box-step-content {
.payment-group-list-btn {
margin-top: -31px;
}
.payment-group {
a {
width: 209px;
height: 50px;
border-radius: 6px;
margin: 0 1px 12px;
padding: 0 0 0 0;
border: 1px solid #000;
text-decoration: none;
span {
font-family: $font-family;
color: $color-gray10;
font-size: 14px;
font-weight: 400;
line-height: 24px;
letter-spacing: -0.01em;
text-align: center;
padding: 13px 0px;
}
}
.payment-group-item-text {
background-image: none !important;
}
.payment-group-item.active {
border: 1px solid $color-orange1;
background-color: $color-white3;
span {
color: $color-orange1;
}
}
}
.link-gift-card {
display: none !important;
}
.steps-view {
margin-top: 3px;
}
}
}
}
} }

View File

@ -1,37 +1,63 @@
.checkout-container {
.cart-template {
align-items: center;
flex-direction: column;
justify-content: center;
}
}
.empty-cart { .empty-cart {
font-family: $font-family;
&-content { &-content {
color: $color-black; h2 {
margin-bottom: 32px;
font-family: $font-family;
font-size: 24px;
font-weight: 700;
text-transform: uppercase;
color: $color-black1;
line-height: 0;
text-align: center; text-align: center;
@include mq(xl, min) {
font-size: 48px;
line-height: 65px;
}
}
@include mq(md, max) { @include mq(md, max) {
padding: 0 16px; padding: 0 16px;
} }
} }
&-message {
display: none;
}
&-title { &-title {
font-size: 20px; font-size: 20px;
} }
&-links { &-links {
.link-choose-products { .link-choose-products {
background: $color-black; background: $color-white1;
border: none; border: none;
border-radius: 5px;
transition: ease-in 0.22s all;
outline: none; outline: none;
font-family: $font-family; border: 1px solid $color-black2;
font-style: normal; border-radius: 0;
font-weight: 500; color: $color-black2;
padding: 16px 65px;
font-family: $font-family-secundary;
font-size: 14px; font-size: 14px;
font-weight: 400;
line-height: 16px; line-height: 16px;
text-align: center; text-align: center;
letter-spacing: 0.05em;
color: $color-white;
text-transform: uppercase; text-transform: uppercase;
margin-top: 0;
&:hover { @include mq(xl, min) {
background: lighten($color-black, 5); font-size: 28px;
line-height: 33px;
padding: 16px 121px;
} }
} }
} }

View File

@ -3,26 +3,21 @@
@import "./checkout-pagamento"; @import "./checkout-pagamento";
@import "./checkout-autenticacao"; @import "./checkout-autenticacao";
.transactions-container {
display: none;
}
html { html {
height: 100%; height: 100%;
min-height: 100%; min-height: 100%;
} }
footer .footerCheckout__wrapper {
width: 94.9734%;
margin: auto auto 0 auto;
}
footer .footerCheckout__prateleira,
header {
width: 79.53125%;
margin: 0 auto;
}
body { body {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
min-height: 100% !important; min-height: 100% !important;
padding-top: 0 !important; padding-top: 0 !important;
overflow-x: hidden;
@include mq(md, max) { @include mq(md, max) {
padding-left: 0; padding-left: 0;
@ -47,36 +42,49 @@ body {
padding-left: 0; padding-left: 0;
} }
} }
.container-order-form, .container-order-form,
.container-cart { .container-cart {
width: 83.5%;
@include mq(xl, min) {
margin: 0 256px;
width: 80%; width: 80%;
} }
} }
.btn-success { .container-main {
background: $color-black; min-height: max-content;
text-shadow: none; display: flex;
align-items: center;
&:hover {
background: lighten($color-black, 15%);
} }
} }
.btn-success {
background: $color-black1;
text-shadow: none;
}
.emailInfo h3 { .emailInfo h3 {
color: $color-black !important; color: $color-black1 !important;
} }
#cart-title, #cart-title,
#orderform-title { #orderform-title {
color: $color-gray2;
font-family: $font-family; font-family: $font-family;
font-weight: 500; font-size: 24px;
font-size: 36px; font-weight: 700;
line-height: 42px; line-height: 33px;
margin: 40px 0 30px; letter-spacing: 0.05em;
letter-spacing: 0.1em; color: $color-black2;
margin: 17px 0;
text-transform: uppercase; text-transform: uppercase;
@include mq(xl, min) {
font-size: 48px;
line-height: 65px;
}
@include mq(md, max) { @include mq(md, max) {
margin-left: 30px; margin-left: 30px;
} }

View File

@ -71,6 +71,11 @@
} }
img { img {
display: block; display: block;
@include mq(xl, min) {
height: 485px;
width: 485px;
}
} }
&.slick-loading img { &.slick-loading img {
display: none; display: none;
@ -100,19 +105,49 @@
font-size: 0; font-size: 0;
position: absolute; position: absolute;
} }
.slick-prev,
.slick-next {
z-index: 4;
border: none;
outline: none;
}
.slick-prev { .slick-prev {
background: url("https://agenciamagma.vteximg.com.br/arquivos/arrow-left-mini-M3Academy.svg") background: url("https://agenciamagma.vteximg.com.br/arquivos/arrow-left-mini-M3Academy.svg")
no-repeat center center; no-repeat center center;
z-index: 4;
left: 10px; left: 10px;
top: 185px;
width: 13px;
height: 29px;
@include mq(xl, min) {
width: 26px;
height: 58px;
top: 313px;
} }
}
.slick-next { .slick-next {
z-index: 4; background: url("https://agenciamagma.vteximg.com.br/arquivos/arrow-right-mini-M3Academy.svg")
right: 10px; no-repeat center center;
right: 31px;
top: 185px;
width: 13px;
height: 29px;
@include mq(xl, min) {
width: 26px;
height: 58px;
top: 313px;
} }
}
.slick-arrow.slick-hidden { .slick-arrow.slick-hidden {
display: none; display: none;
} }
.slick-dots { .slick-dots {
li { li {
margin: 0.5em; margin: 0.5em;

View File

@ -1,23 +1,52 @@
/* _footer.scss */ /* _footer.scss */
.footerCheckout { .footerCheckout {
border-top: none; figure {
color: $color-gray2; margin: 0;
}
ul {
padding: 0;
margin: 0 0 0 0;
}
p {
margin: 0;
}
&__wrapper { &__wrapper {
align-items: center; .container {
border-top: 1px solid $color-black2;
display: flex; display: flex;
align-items: center;
justify-content: space-between; justify-content: space-between;
width: 95%;
padding: 23px 32px;
@include mq(xl, min) {
padding: 29px 63px;
}
}
.container::before,
.container::after {
display: none;
}
} }
&__address { &__address {
color: $color-gray2;
font-family: $font-family; font-family: $font-family;
font-style: normal;
font-weight: normal;
font-size: 10px; font-size: 10px;
line-height: 12px; font-weight: 400;
line-height: 14px;
color: $color-black1;
text-transform: capitalize; text-transform: capitalize;
max-width: 40%; max-width: 269px;
@include mq(xl, min) {
font-size: 20px;
line-height: 27px;
max-width: 537px;
}
@include mq(md, max) { @include mq(md, max) {
margin-bottom: 24px; margin-bottom: 24px;
@ -31,40 +60,103 @@
justify-self: center; justify-self: center;
list-style: none; list-style: none;
li {
display: flex;
}
li:nth-child(1) {
display: flex;
}
li:last-child {
img {
max-width: 53px;
height: 33px;
margin: 0 0 0 10px;
@include mq(xl, min) {
max-width: 103px;
height: 64px;
}
}
}
img {
height: 20px;
max-width: 34px;
margin-right: 13px;
@include mq(xl, min) {
max-width: 69px;
height: 39px;
}
}
@include mq(md, max) { @include mq(md, max) {
align-self: center; align-self: center;
margin-bottom: 12px; margin-bottom: 12px;
} }
&__divider { &__divider {
background-color: $color-gray4;
display: inline-block;
height: 24px;
margin: 0 8px;
width: 1px; width: 1px;
height: 24px;
background-color: $color-gray6;
@include mq(xl, min) {
height: 43px;
}
} }
} }
&__developedBy { &__developedBy {
align-items: center;
display: flex; display: flex;
align-items: center;
list-style-type: none; list-style-type: none;
margin: 0; margin: 0;
li:last-child { li {
margin-left: 16px; margin-left: 16px;
img {
margin-left: 11px;
}
} }
a { li:first-child {
align-items: center; img {
color: $color-gray2; max-width: 44px;
height: 16px;
@include mq(xl, min) {
max-width: 87px;
height: 31px;
}
}
}
li:last-child {
img {
max-width: 28px;
height: 15px;
@include mq(xl, min) {
max-width: 55px;
height: 30px;
}
}
}
div {
display: flex; display: flex;
align-items: center;
font-family: $font-family; font-family: $font-family;
font-style: normal; font-size: 9px;
font-weight: normal; font-weight: 400;
font-size: 10px; color: $color-black1;
line-height: 12px;
text-decoration: none; @include mq(xl, min) {
font-size: 18px;
line-height: 25px;
}
span { span {
margin-right: 8px; margin-right: 8px;

View File

@ -1,8 +1,18 @@
/* _header.scss */ /* _header.scss */
.headerCheckout { .headerCheckout {
width: 100%;
border-bottom: 1px solid $color-black2;
.container { .container {
width: auto !important; width: auto !important;
margin: 0;
padding: 24px 131px;
@include mq(xl, min) {
padding: 29px 256px;
} }
}
&__wrapper { &__wrapper {
align-items: center; align-items: center;
display: flex; display: flex;
@ -11,26 +21,127 @@
&__logo { &__logo {
img { img {
height: 52px; width: 155px;
width: auto; height: 37px;
@include mq(xl, min) {
width: 382px;
height: 91px;
}
} }
} }
&__safeBuy { &__safeBuy {
span {
align-items: center;
display: flex; display: flex;
align-items: center;
span {
font-weight: 400;
line-height: 16px;
text-transform: uppercase; text-transform: uppercase;
font-family: $font-family; font-family: $font-family;
font-style: normal;
font-weight: normal;
font-size: 12px; font-size: 12px;
line-height: 14px; color: $color-black1;
color: $color-gray;
@include mq(xl, min) {
font-size: 24px;
line-height: 33px;
}
} }
i { img {
width: 12px;
height: 14px;
margin-right: 8px; margin-right: 8px;
@include mq(xl, min) {
width: 29px;
height: 41px;
}
}
}
.progress-bar {
display: flex;
width: 439px;
height: 35px;
justify-content: space-between;
@include mq(xl, min) {
width: 1078px;
height: 67px;
}
&__container-items {
list-style: none;
}
&__container-item {
display: flex;
flex-direction: column;
align-items: center;
position: relative;
}
&__circle1,
&__circle2,
&__circle3 {
height: 12px;
width: 12px;
border-radius: 50%;
border: 1px solid $color-black2;
@include mq(xl, min) {
height: 24px;
width: 24px;
}
}
&__line1,
&__line2 {
position: absolute;
background-color: $color-black2;
height: 1px;
bottom: 6px;
@include mq(xl, min) {
bottom: 12px;
}
}
&__line1 {
left: 59%;
width: 162px;
@include mq(xl, min) {
width: 437px;
}
}
&__line2 {
right: 60%;
width: 155px;
@include mq(xl, min) {
width: 420px;
}
}
.active {
background-color: $color-black2;
}
&__text {
font-family: $font-family-secundary;
font-size: 12px;
font-weight: 400;
line-height: 14px;
color: $color-black2;
@include mq(xl, min) {
font-size: 24px;
line-height: 28px;
}
} }
} }
} }

View File

@ -1 +1,98 @@
/* _prateleira.scss */ /* _prateleira.scss */
.footerCheckout__prateleira {
display: none;
padding: 0 110px 0 132px;
@include mq(xl, min) {
padding: 0 256px;
}
.prateleiraTitle {
font-family: $font-family-secundary;
font-size: 24px;
font-weight: 400;
line-height: 38px;
text-align: center;
@include mq(xl, min) {
font-size: 48px;
line-height: 76px;
}
}
div {
margin-right: 8px;
li {
.product-name {
font-family: $font-family;
font-size: 13px;
font-weight: 400;
line-height: 18px;
text-align: center;
margin: 20px 0;
color: $color-black2;
@include mq(xl, min) {
font-size: 26px;
line-height: 35px;
}
}
.product-variation {
display: flex;
justify-content: center;
margin-bottom: 25px;
&__item {
font-size: 13px;
font-weight: 700;
line-height: 18px;
letter-spacing: 0.05em;
text-align: center;
background-color: $color-blue2;
padding: 5px;
border-radius: 8px;
margin-right: 5px;
color: $color-white1;
font-family: $font-family;
outline: none;
border: none;
text-transform: uppercase;
&:last-child {
margin-right: 0;
}
@include mq(xl, min) {
font-size: 26px;
line-height: 35px;
}
}
}
.product-button {
width: 100%;
font-family: $font-family;
font-size: 13px;
font-weight: 700;
line-height: 18px;
letter-spacing: 0.05em;
text-align: center;
text-transform: uppercase;
padding: 12px 72px;
border-radius: 8px;
outline: none;
border: none;
color: $color-white1;
background-color: $color-blue2;
margin-bottom: 56px;
@include mq(xl, min) {
font-size: 26px;
line-height: 35px;
}
}
}
}
}

View File

@ -1,38 +1,51 @@
/* fonts */ /* Fonts */
@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-black1: #292929;
$color-black2: #000000;
$color-white: #fff; $color-white1: #fff;
$color-white2: #f2f2f2;
$color-white3: #DCDDE34D;
$color-gray: #6c6c6c; $color-gray1: #6c6c6c;
$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: #ededed;
$color-gray9: #e0e0e0;
$color-gray10: #585858;
$color-blue: #4267b2; $color-blue1: #4267b2;
$color-blue2: #00C8FF;
$color-green: #4caf50; $color-green1: #4caf50;
$color-green2: #298541;
$color-orange1: #F15A31;
/* Grid breakpoints */ /* Grid breakpoints */
$grid-breakpoints: ( $grid-breakpoints: (
xs: 0, xs: 0,
cstm: 400, cstm: 400px,
sm: 576px, sm: 600px,
md: 768px, md: 1024px,
lg: 992px, lg: 1280px,
xl: 1200px xl: 2500px,
) !default; ) !default;
/* Z-index */
$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;