Merge pull request 'feature/template-checkout' (#1) from feature/template-checkout into main

Reviewed-on: #1
This commit is contained in:
Filipe Quintanilha Evangelista 2022-12-19 02:42:45 +00:00
commit c0cc76a6d2
17 changed files with 13347 additions and 423 deletions

View File

@ -3,10 +3,11 @@ import { Container } from "m3-utils";
import "slick-carousel";
import Header from "./components/Header";
import Footer from "./components/Footer";
import Content from "./components/CheckoutContent";
const m3Checkout = new Container({
appName: "m3-checkout",
components: [CheckoutUI, Header, Footer],
components: [CheckoutUI, Header, Footer, Content],
});
m3Checkout.start();

View File

@ -0,0 +1,68 @@
// import waitForEl from "../helpers/waitForEl";
import { waitElement } from "m3-utils";
export default class Content {
constructor() {
this.init();
}
async init() {
await this.selectors();
this.events();
// this.CriaSpan();
}
async selectors() {
this.option = await waitElement(".shp-lean ", {
//#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
});
this.div = await waitElement(".vtex-omnishipping-1-x-address", {
//#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
});
this.div.children[0].classList.add("dados-wrapper");
this.btn = await waitElement(".btn-go-to-payment", {
//#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
});
console.log(this.btn);
this.sumario = await waitElement(".shp-summary-package-time", {
//#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
});
console.log(this.sumario);
}
events() {
this.btn.addEventListener("click", this.AdicionaSpan());
}
// CriaSpan() {
// this.sumario.innerHTML += `
// <span class="forma-entrega"></span>
// `;
// console.log("criou");
// }
AdicionaSpan() {
if (this.option.children[0].classList.contains("shp-lean-option-active")) {
const span = document.createElement("span");
span.classList.add("forma-entrega");
span.innerHTML = this.option.children[0].children[2].children[0].textContent;
this.sumario.appendChild(span);
} else if (this.option.children[1].classList.contains("shp-lean-option-active")) {
const span = document.createElement("span");
span.classList.add("forma-entrega");
span.innerHTML = this.option.children[1].children[2].children[0].textContent;
this.sumario.appendChild(span);
}
}
}

View File

@ -6,35 +6,227 @@ export default class Footer {
}
async init() {
this.imgLinks = "https://agenciamagma.vteximg.com.br/arquivos/";
await this.selectors();
// this.onUpdate();
this.events();
this.pagamentos();
this.certificado();
this.desenvolvimento();
this.tiraTitulo();
this.titleCart();
this.buildSlickItems();
this.onUpdate();
}
async selectors() {
//Para verificar se o carrinho está vazio e remover a prateleira de produtos:
// vocês devem olhar a doc fornecida no Desafio para aprender a usar o waitElement
this.checkoutVazio = await waitElement(".empty-cart-content");
this.titulo = await waitElement("#cart-title");
this.payments = await waitElement(".footerCheckout__payments", {
timeout: 5000,
interval: 1000,
});
this.vtexIcon = await waitElement(".footerCheckout__stamps", {
timeout: 5000,
interval: 1000,
});
this.developed = await waitElement(".footerCheckout__developedBy", {
timeout: 5000,
interval: 1000,
});
this.checkoutVazio = await waitElement(".empty-cart-content", {
timeout: 5000,
interval: 1000,
});
this.footerPrateleira = await waitElement(".footerCheckout__prateleira");
}
events() {
window.addEventListener("hashchange", this.onUpdate.bind(this));
}
buildSlickItems() {
const slickItems = fetch(
"https://m3academy.myvtex.com/api/catalog_system/pub/products/search/?fq=productClusterIds:319"
)
.then(function (response) {
return response.json();
})
.then(function (data) {
const slickItems = data.map((item) => {
const div = document.createElement("div");
const ul = document.createElement("ul");
const items = item.items;
items.forEach((item) => {
const li = document.createElement("li");
li.classList.add("prateleira__option");
li.innerHTML = item.name;
ul.appendChild(li);
});
div.classList.add("prateleira__item");
const jpg = item.items[0].images[0].imageUrl;
div.innerHTML = `
<img class="prateleira__image" src="${jpg}" />
<h2 class="prateleira__product-name">${item.productName}</h2>
<ul class="prateleira__options">
${ul.innerHTML}
</ul>
<button class="prateleira__button">VER PRODUTO</button>
`;
return div;
});
return slickItems;
});
const buildSlickItems = () => {
slickItems.then((items) => {
items.forEach((item) => {
this.footerPrateleira.appendChild(item);
});
});
};
buildSlickItems();
}
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
this.footerPrateleira.style.display = "none";
if (
window.location.href === "https://m3academy.myvtex.com/checkout/#/cart" &&
this.checkoutVazio.style.display === "none"
)
this.footerPrateleira.style.display = "";
let target = this.checkoutVazio;
let config = { childList: true, attributes: true };
let observer = new MutationObserver((mutations) => {
mutations.forEach(function (mutation) {
console.log(mutation.type);
mutations.forEach(
function (mutation) {
if (mutation.type === "attributes" && mutation.attributeName === "style") {
if (target.style.display === "none") {
if (!this.footerPrateleira.classList.contains("slick-initialized"))
this.addCarrossel();
this.footerPrateleira.style.display = "";
} else {
this.footerPrateleira.style.display = "none";
}
}
}.bind(this)
);
});
observer.observe(target, config);
}
addCarrossel() {
const elemento = this.footerPrateleira;
$(elemento).slick({
slidesToShow: 4,
slidesToScroll: 1,
responsive: [
{
breakpoint: 1025,
settings: {
slidesToShow: 3,
slidesToScroll: 1,
},
},
{
breakpoint: 376,
settings: {
slidesToShow: 2,
slidesToScroll: 1,
},
},
],
});
}
pagamentos() {
this.payments.innerHTML = `
<ul class="lista-pagamentos" >
<li class"lista-pagamentos__items">
<img src=" https://agenciamagma.vteximg.com.br/arquivos/masterCardM3Academy.png">
</li>
<li class"lista-pagamentos__items">
<img src=" https://agenciamagma.vteximg.com.br/arquivos/visaM3Academy.png">
</li>
<li class"lista-pagamentos__items">
<img src=" https://agenciamagma.vteximg.com.br/arquivos/amexM3Academy.png">
</li>
<li class"lista-pagamentos__items">
<img src=" https://agenciamagma.vteximg.com.br/arquivos/eloM3Academy.png">
</li>
<li class"lista-pagamentos__items">
<img src=" https://agenciamagma.vteximg.com.br/arquivos/hiperCardM3Academy.png">
</li>
<li class"lista-pagamentos__items">
<img src=" https://agenciamagma.vteximg.com.br/arquivos/payPalM3Academy.png">
</li>
<li class"lista-pagamentos__items">
<img src=" https://agenciamagma.vteximg.com.br/arquivos/boletoM3Academy.png">
</li>
</ul>
`;
}
certificado() {
this.vtexIcon.children[2].children[0].innerHTML = `
<ul class="lista-certificados">
<li class="lista-certificados__items">
<img src=" https://agenciamagma.vteximg.com.br/arquivos/vtexPCIM3Academy.png">
</li>
</ul>
`;
}
desenvolvimento() {
this.developed.children[0].children[0].innerHTML = `
<a class="powered" href="https://vtex.com/br-pt/">
<span>Powered By</span>
<img src=" https://agenciamagma.vteximg.com.br/arquivos/logoVTEXM3Academy.png">
</a>
`;
this.developed.children[1].children[0].innerHTML = `
<a class="developed" href="https://agenciam3.com/">
<span>Developed By</span>
<img src=" https://agenciamagma.vteximg.com.br/arquivos/logoM3M3Academy.png">
</a>
`;
}
tiraTitulo() {
if (this.checkoutVazio.style.cssText === "display: block;") {
$(this.titulo).attr("style", "");
}
}
titleCart() {
let target = this.checkoutVazio;
let config = { childList: true, attributes: true };
let observer = new MutationObserver((mutations) => {
mutations.forEach((mutation) => {
if (mutation.type === "attributes" && mutation.attributeName === "style") {
if (target.style.display === "none") this.titulo.classList.remove("hide");
else if (target.style.display === "block") this.titulo.classList.add("hide");
}
});
});
observer.observe(target, config);
}
async addCarrossel() {
const elemento = await waitElement("#my-element");
$(elemento).slick({
slidesToShow: 4,
slidesToScroll: 1,
});
}
}

View File

@ -8,14 +8,256 @@ export default class Header {
async init() {
await this.selectors();
console.log(this.item);
this.progressBarHTML();
await this.progressBarProgress();
this.CriaSpan();
// console.log(this.item);
}
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
timeout: 5000, // vai esperar 5 segundos antes de rejeitar a promise
interval: 1000, // vai verificar a cada 1 segundo se o elemento existe
});
this.progressBar = await waitElement(".progress-bar", {
//#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>
<li>
<div class="containerLi">
<div>
<p class="progress-bar-text">Meu Carrinho</p>
<p id="progressbar-circle-1" class="progressbar-circle-1"></p>
<p class="progress-bar-line-1"></p>
</div>
</div>
</li>
<li class="central">
<div class="containerLi">
<div>
<p class="progress-bar-text">Dados Pessoais</p>
<p id="progressbar-circle-2" class="progressbar-circle-2"></p>
</div>
</div>
</li>
<li>
<div class="containerLi">
<div>
<p class="progress-bar-text">Pagamento</p>
<p id="progressbar-circle-3" class="progressbar-circle-3"></p>
<p class="progress-bar-line-2"></p>
</div>
</div>
</li>
</ul>
`;
}
if (this.progressBar && window.innerWidth <= 1024) {
this.progressBar.innerHTML = ``;
}
}
progressBarProgress() {
if (this.progressBar && window.innerWidth > 1024) {
const progressBarLista = document.querySelectorAll("#progressBar ul li");
progressBarLista.forEach((li) => {
if (window.location.href === "https://m3academy.myvtex.com/checkout/#/cart") {
if (li.children[0].children[0].children["progressbar-circle-1"]) {
li.children[0].children[0].children["progressbar-circle-1"].classList.add(
"active"
);
}
if (li.children[0].children[0].children["progressbar-circle-2"]) {
if (
li.children[0].children[0].children[
"progressbar-circle-2"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progressbar-circle-2"
].classList.remove("active");
}
}
if (li.children[0].children[0].children["progressbar-circle-3"]) {
if (
li.children[0].children[0].children[
"progressbar-circle-3"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progressbar-circle-3"
].classList.remove("active");
}
}
} else if (
window.location.href === "https://m3academy.myvtex.com/checkout/#/email" ||
window.location.href === "https://m3academy.myvtex.com/checkout/#/profile" ||
window.location.href === "https://m3academy.myvtex.com/checkout/#/shipping"
) {
if (li.children[0].children[0].children["progressbar-circle-1"]) {
if (
li.children[0].children[0].children[
"progressbar-circle-1"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progressbar-circle-1"
].classList.remove("active");
}
}
if (li.children[0].children[0].children["progressbar-circle-2"]) {
li.children[0].children[0].children["progressbar-circle-2"].classList.add(
"active"
);
}
if (li.children[0].children[0].children["progressbar-circle-3"]) {
if (
li.children[0].children[0].children[
"progressbar-circle-3"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progressbar-circle-3"
].classList.remove("active");
}
}
} else if (
window.location.href === "https://m3academy.myvtex.com/checkout/#/payment"
) {
if (li.children[0].children[0].children["progressbar-circle-1"]) {
if (
li.children[0].children[0].children[
"progressbar-circle-1"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progressbar-circle-1"
].classList.remove("active");
}
}
if (li.children[0].children[0].children["progressbar-circle-2"]) {
if (
li.children[0].children[0].children[
"progressbar-circle-2"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progressbar-circle-2"
].classList.remove("active");
}
}
if (li.children[0].children[0].children["progressbar-circle-3"]) {
li.children[0].children[0].children["progressbar-circle-3"].classList.add(
"active"
);
}
}
window.addEventListener("hashchange", () => {
if (window.location.hash == "#/cart") {
if (li.children[0].children[0].children["progressbar-circle-1"]) {
li.children[0].children[0].children[
"progressbar-circle-1"
].classList.add("active");
}
if (li.children[0].children[0].children["progressbar-circle-2"]) {
if (
li.children[0].children[0].children[
"progressbar-circle-2"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progressbar-circle-2"
].classList.remove("active");
}
}
if (li.children[0].children[0].children["progressbar-circle-3"]) {
if (
li.children[0].children[0].children[
"progressbar-circle-3"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progressbar-circle-3"
].classList.remove("active");
}
}
} else if (
window.location.hash === "#/email" ||
window.location.hash === "#/profile" ||
window.location.hash === "#/shipping"
) {
if (li.children[0].children[0].children["progressbar-circle-1"]) {
if (
li.children[0].children[0].children[
"progressbar-circle-1"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progressbar-circle-1"
].classList.remove("active");
}
}
if (li.children[0].children[0].children["progressbar-circle-2"]) {
li.children[0].children[0].children[
"progressbar-circle-2"
].classList.add("active");
}
if (li.children[0].children[0].children["progressbar-circle-3"]) {
if (
li.children[0].children[0].children[
"progressbar-circle-3"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progressbar-circle-3"
].classList.remove("active");
}
}
} else if (window.location.hash === "#/payment") {
if (li.children[0].children[0].children["progressbar-circle-1"]) {
if (
li.children[0].children[0].children[
"progressbar-circle-1"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progressbar-circle-1"
].classList.remove("active");
}
}
if (li.children[0].children[0].children["progressbar-circle-2"]) {
if (
li.children[0].children[0].children[
"progressbar-circle-2"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progressbar-circle-2"
].classList.remove("active");
}
}
if (li.children[0].children[0].children["progressbar-circle-3"]) {
li.children[0].children[0].children[
"progressbar-circle-3"
].classList.add("active");
}
}
});
});
}
}
}

View File

@ -2,4 +2,6 @@
@import "./lib/slick";
@import "./partials/header";
@import "./partials/footer";
@import "./partials/prateleira";
@import "./partials/tablet";
@import "./checkout/checkout.scss";

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -4,8 +4,32 @@ body .container-main.container-order-form .orderform-template.active {
margin-left: unset;
margin-right: 0;
float: right;
@include mq(sm, max) {
float: initial;
width: 100%;
display: flex !important;
justify-content: center !important;
border: none;
margin-top: 17px;
}
.cart-fixed {
@include mq(sm, max) {
width: 91.5%;
}
}
.payment-confirmation-wrap {
@include mq(sm, max) {
border: none;
}
}
}
.orderform-template-holder {
width: 66.1132%;
@include mq(sm, max) {
width: 100%;
}
}
}

View File

@ -1,38 +1,85 @@
.empty-cart {
font-family: $font-family;
&-content {
color: $color-black;
text-align: center;
font-family: $font-family;
&-content {
color: $color-black;
text-align: center;
@include mq(md, max) {
padding: 0 16px;
}
}
@include mq(md, max) {
padding: 0 16px;
}
&-title {
font-size: 20px;
}
@include mq(xl, min) {
padding: 170px 0 104px !important;
}
}
&-links {
.link-choose-products {
background: $color-black;
border: none;
border-radius: 5px;
transition: ease-in 0.22s all;
outline: none;
font-family: $font-family;
font-style: normal;
font-weight: 500;
font-size: 14px;
line-height: 16px;
text-align: center;
letter-spacing: 0.05em;
color: $color-white;
text-transform: uppercase;
&-title {
font-size: 20px;
&:hover {
background: lighten($color-black, 5);
}
}
}
@include mq(xl, min) {
font-size: 48px !important;
line-height: 65px !important;
}
@include mq(md, max) {
font-size: 18px !important;
line-height: 25px !important;
margin-bottom: 22px !important;
}
}
&-links {
@include mq(md, max) {
display: flex;
justify-content: center;
}
.link-choose-products {
background-color: #ffffff;
border: 1px solid #000000;
border-radius: 0px;
outline: none;
font-family: $font-family-secundary;
font-style: normal;
font-weight: 500;
font-size: 0px;
line-height: 16px;
text-align: center;
color: #000000;
text-transform: uppercase;
width: 28.1%;
margin: 0;
@include mq(sm, max) {
width: 56% !important;
}
@include mq(md, max) {
width: 25.7%;
padding: 15px 19px;
display: flex;
align-items: center;
justify-content: center;
}
@include mq(xl, min) {
width: 29.9%;
padding: 15px 19px;
}
}
.link-choose-products::after {
content: "CONTINUAR COMPRANDO";
font-size: 14px;
@include mq(xl, min) {
font-size: 28px;
line-height: 33px;
}
@include mq(md, max) {
font-size: 14px;
line-height: 16px;
}
}
}
}

View File

@ -3,26 +3,19 @@
@import "./checkout-pagamento";
@import "./checkout-autenticacao";
html {
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;
width: 100%;
margin: 0;
}
body {
display: flex;
flex-direction: column;
min-height: 100% !important;
padding-top: 0 !important;
padding: 0 !important;
margin: 0 !important;
@include mq(md, max) {
padding-left: 0;
@ -50,6 +43,10 @@ body {
.container-order-form,
.container-cart {
width: 80%;
@include mq(md, max) {
width: 100%;
}
}
}
@ -68,18 +65,45 @@ body {
#cart-title,
#orderform-title {
color: $color-gray2;
color: $color-black;
font-family: $font-family;
font-weight: 500;
font-size: 36px;
line-height: 42px;
margin: 40px 0 30px;
letter-spacing: 0.1em;
font-weight: 700;
font-size: 24px;
line-height: 33px;
margin: 17px 0 16px;
letter-spacing: 0.05em;
text-transform: uppercase;
@include mq(md, max) {
margin-left: 30px;
}
@include mq(xl, min) {
font-size: 48px;
line-height: 65px;
}
}
.show {
display: block;
}
.empty-cart-title {
font-weight: 700;
font-size: 24px;
line-height: 33px;
color: #000000;
font-family: $font-family;
text-transform: uppercase;
margin: 0 0 32px 0;
}
.empty-cart-message {
display: none;
}
.empty-cart-content {
padding: 171px 0 264px;
}
.dropdown {

View File

@ -1,28 +1,61 @@
/* _footer.scss */
.footerCheckout {
border-top: none;
color: $color-gray2;
// margin-top: 94px;
&__wrapper {
align-items: center;
display: flex;
justify-content: space-between;
width: auto !important;
padding: 16px 22px 16px 32px;
margin: 0;
border-top: 1px solid black;
@include mq(md, max) {
padding: 22px 0 16px 8px;
}
@include mq(xl, min) {
padding: 14px 63px 16px 63px;
}
.container {
align-items: center;
display: flex;
justify-content: space-between;
width: auto;
@include mq(sm, max) {
padding-top: 34px !important;
}
@include mq(md, max) {
flex-direction: column;
align-items: flex-start;
padding-top: 34px;
}
}
.container::before,
::after {
display: none !important;
}
}
&__address {
color: $color-gray2;
color: $color-black;
font-family: $font-family;
font-style: normal;
font-weight: normal;
font-size: 10px;
line-height: 12px;
line-height: 14px;
text-transform: capitalize;
max-width: 40%;
@include mq(md, max) {
margin-bottom: 24px;
max-width: 100%;
}
@include mq(xl, min) {
font-size: 20px;
line-height: 27px;
}
}
&__stamps {
@ -30,19 +63,39 @@
display: flex;
justify-self: center;
list-style: none;
margin: 0;
width: 31.56%;
@include mq(xl, min) {
width: 29.1%;
}
@include mq(md, max) {
align-self: center;
margin-bottom: 12px;
position: absolute;
align-self: flex-start;
top: -7px;
width: 342px;
}
&__divider {
background-color: $color-gray4;
display: inline-block;
height: 24px;
margin: 0 8px;
margin: 0 10px 0 13px;
width: 1px;
}
.lista-pagamentos {
list-style: none;
margin: 0;
display: flex;
gap: 13px;
}
.lista-certificados {
list-style: none;
margin: 0;
}
}
&__developedBy {
@ -51,23 +104,50 @@
list-style-type: none;
margin: 0;
@include mq(md, max) {
margin-top: 16px;
}
li:last-child {
margin-left: 16px;
}
a {
align-items: center;
color: $color-gray2;
color: $color-black;
display: flex;
font-family: $font-family;
font-style: normal;
font-weight: normal;
font-size: 10px;
font-size: 9px;
line-height: 12px;
text-decoration: none;
@include mq(xl, min) {
font-size: 18px;
line-height: 25px;
}
span {
margin-right: 8px;
margin-right: 10px;
}
.powered {
img {
width: 44px;
@include mq(xl, min) {
width: 87px;
}
}
}
.developed {
img {
width: 28px;
@include mq(xl, min) {
width: 56px;
}
}
}
}
}

View File

@ -1,22 +1,202 @@
/* _header.scss */
.headerCheckout {
width: 100%;
border-bottom: 1px solid black;
@include mq(xl, min) {
height: 149px;
}
.container {
width: auto !important;
width: 79.53125% !important;
@include mq(md, max) {
width: 100% !important;
}
.progress-bar {
@include mq(xl, min) {
width: 1083.86px;
}
ul {
list-style-type: none;
display: flex;
margin: 0;
gap: 107px;
@include mq(xl, min) {
gap: 303px;
}
li {
.containerLi {
width: 100%;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
position: relative;
.progress-bar-text {
margin-bottom: 9px;
font-family: $font-family-secundary;
font-size: 12px;
line-height: 14px;
@include mq(xl, min) {
margin-bottom: 15px;
font-size: 24px;
line-height: 28px;
font-weight: 400;
}
}
.progressbar-circle-1 {
width: 13%;
left: 41%;
height: 10px;
position: relative;
border: 1px solid black;
border-radius: 50%;
margin: 0;
@include mq(xl, min) {
width: 14%;
height: 22px;
}
}
.progress-bar-line-1 {
position: absolute;
left: 10%;
transform: translate(20%);
bottom: -2px;
width: 227%;
height: 1px;
border-top: 1px solid #000;
@include mq(xl, min) {
transform: translateY(-6px);
left: 56%;
width: 284%;
}
}
.progressbar-circle-2 {
width: 11%;
left: 41%;
height: 10px;
position: relative;
background-color: white;
border: 1px solid black;
border-radius: 50%;
margin: 0;
@include mq(xl, min) {
width: 12%;
height: 22px;
}
}
.progressbar-circle-3 {
width: 16%;
left: 41%;
height: 10px;
position: relative;
background-color: white;
border: 1px solid black;
border-radius: 50%;
margin: 0;
@include mq(xl, min) {
width: 18%;
height: 22px;
}
}
.progress-bar-line-2 {
position: absolute;
right: 31%;
transform: translate(-10%);
bottom: -2px;
width: 274%;
height: 1px;
border-top: 1px solid #000;
@include mq(xl, min) {
transform: translateY(-6px);
right: 58%;
width: 345%;
}
}
.active {
background-color: #000;
}
}
}
}
}
}
&__wrapper {
align-items: center;
display: flex;
justify-content: space-between;
padding: 29px 0;
height: 37px;
@include mq(xl, min) {
height: 91px;
}
@include mq(md, max) {
padding: 16px;
height: 32px;
}
}
&__logo {
display: flex;
align-items: center;
width: 15.3%;
height: 100%;
@include mq(xl, min) {
width: 19.25%;
}
@include mq(md, max) {
width: 15.7%;
}
@include mq(sm, max) {
width: 45.3%;
}
a {
width: 100%;
}
img {
height: 52px;
width: auto;
width: 100%;
object-fit: contain;
@include mq(xl, min) {
width: 382px;
}
@include mq(md, max) {
height: 32px;
}
@include mq(sm, max) {
height: 33px;
}
}
}
&__safeBuy {
display: flex;
gap: 8px;
span {
align-items: center;
display: flex;
@ -27,6 +207,29 @@
font-size: 12px;
line-height: 14px;
color: $color-gray;
@include mq(xl, min) {
font-size: 24px;
line-height: 33px;
}
@include mq(md, max) {
line-height: 16px;
}
}
img {
width: 12px;
height: 15px;
@include mq(xl, min) {
width: 29px;
height: 41px;
}
@include mq(md, max) {
height: 13px;
}
}
i {

View File

@ -1 +1,176 @@
/* _prateleira.scss */
.footerCheckout__prateleira {
padding: 0 132px;
display: flex;
flex-direction: column;
gap: 20px;
&::before {
content: "Você tambem pode gostar:";
font-family: $font-family-secundary;
font-weight: 400;
font-size: 24px;
line-height: 38px;
align-self: center;
color: #000000;
@include mq(sm, max) {
font-size: 14px;
line-height: 28px;
}
@include mq(xl, min) {
font-size: 48px;
line-height: 76px;
}
}
@include mq(sm, max) {
padding: 0 16px;
}
@include mq(md, max) {
padding: 0 16px;
}
@include mq(xl, min) {
padding: 0 250px;
}
.slick-arrow {
top: 50%;
transform: translateY(-50%);
}
.slick-prev {
border: none;
position: absolute;
left: 142px;
background: url("https://agenciamagma.vteximg.com.br/arquivos/arrow-left-M3Academy.svg");
background-size: 13px 29px;
width: 13px;
height: 29px;
@include mq(xl, min) {
background-size: 26px 58px;
width: 26px;
height: 58px;
left: 260px;
}
@include mq(sm, max) {
left: 15px;
}
@include mq(md, max) {
left: 26px;
}
}
.slick-next {
border: none;
position: absolute;
right: 142px;
background: url("https://agenciamagma.vteximg.com.br/arquivos/arrow-right-M3Academy.svg");
background-size: 13px 29px;
width: 13px;
height: 29px;
@include mq(xl, min) {
background-size: 26px 58px;
width: 26px;
height: 58px;
right: 274px;
}
@include mq(sm, max) {
right: 16px;
}
@include mq(md, max) {
right: 36px;
}
}
.prateleira {
&__item {
width: 95.5% !important;
margin-bottom: 56px;
display: flex !important;
flex-direction: column;
height: 100%;
@include mq(xl, min) {
width: 97% !important;
}
@include mq(md, max) {
width: 96.7% !important;
}
}
&__product-name {
font-family: $font-family;
font-style: normal;
font-weight: 400;
font-size: 13px;
line-height: 18px;
text-align: center;
color: #000000;
@include mq(xl, min) {
font-size: 26px;
line-height: 35px;
}
}
&__options {
display: flex;
justify-content: center;
width: 100%;
list-style-type: none;
margin: 0;
gap: 5px;
padding-bottom: 20px;
flex: 1;
flex-wrap: wrap;
}
&__option {
padding: 5px 6px;
background: #00c8ff;
border-radius: 8px;
font-size: 13px;
line-height: 18px;
color: #ffffff;
text-transform: uppercase;
@include mq(xl, min) {
padding: 13px 14px;
font-size: 26px;
line-height: 35px;
}
}
&__button {
font-weight: 700;
font-size: 13px;
line-height: 18px;
letter-spacing: 0.05em;
text-transform: uppercase;
border: none;
background: #00c8ff;
border-radius: 8px;
outline: none;
transition: all 0.2s linear;
width: 100%;
padding: 12px 0;
color: #ffffff;
@include mq(xl, min) {
font-size: 26px;
line-height: 35px;
}
}
}
}

View File

@ -0,0 +1,166 @@
@media screen and (min-width: 376px) and (max-width: 1024px) {
.checkout-container {
padding-bottom: 109px;
}
.orderform-template-holder {
width: 100% !important;
}
.form-page {
margin: -16px;
}
.row-fluid {
display: flex;
flex-direction: column;
width: 100%;
.summary {
width: 99.8% !important;
}
}
#client-profile-data {
width: 100%;
padding: 0 16px;
}
#client-email {
width: 98.8%;
height: 32px;
}
.client-first-name,
.client-last-name,
.client-document,
.client-phone {
width: 50%;
margin-right: 0 !important;
}
#client-first-name,
#client-document {
width: 95.7%;
height: 34px;
}
#client-last-name,
#client-phone {
width: 97%;
height: 34px;
}
.newsletter-label {
margin-top: -23px;
}
.box-step {
width: 100.2%;
}
#shipping-data {
width: 93.4%;
margin-left: 16px;
}
.shipping-data {
width: 100%;
.active {
width: 100%;
padding: 24px 17px 44px !important;
}
}
#postalCode-finished-loading {
width: 32.31%;
}
#ship-postalCode {
width: 98.51%;
max-width: 100%;
height: 35px;
}
small {
padding-top: 10px;
}
#delivery-packages-options {
width: 100%;
}
#force-shipping-fields {
float: right;
}
#ship-number {
width: 99.6%;
height: 25px;
}
#ship-complement,
#ship-receiverName {
width: 98.51% !important;
height: 25px;
}
.postalCode {
left: 149px !important;
}
#payment-data {
width: 93.4%;
margin-left: 16px;
}
.store-country-BRA {
width: 100%;
margin-bottom: 17px !important;
}
.payment-group-list-btn {
width: 97.4%;
}
.steps-view {
width: 96.85% !important;
}
.SecurityEnvironmentIcon {
display: none;
}
#creditCardpayment-card-0Number {
width: 98%;
}
.card-flags {
display: flex !important;
justify-content: center !important;
}
#creditCardpayment-card-0Brand {
width: 90%;
}
#go-to-cart-button {
width: 99.8%;
border: 1px solid #e5e5e5;
border-top: none;
border-bottom: none;
a {
float: right;
}
}
.mini-cart {
width: 100% !important;
padding: 0 16px !important;
}
#payment-data-submit {
margin-top: 5px !important;
}
}

View File

@ -2,7 +2,7 @@
@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");
$font-family: "Open Sans", sans-serif;
$font-family-secundary:"Tenor Sans", sans-serif;
$font-family-secundary: "Tenor Sans", sans-serif;
/* Colors */
$color-black: #292929;
@ -21,18 +21,18 @@ $color-green: #4caf50;
/* Grid breakpoints */
$grid-breakpoints: (
xs: 0,
cstm: 400,
sm: 576px,
md: 768px,
lg: 992px,
xl: 1200px
xs: 0,
cstm: 400,
sm: 376px,
md: 1025px,
lg: 1280px,
xl: 2500px,
) !default;
$z-index: (
level1: 5,
level2: 10,
level3: 15,
level4: 20,
level5: 25
level1: 5,
level2: 10,
level3: 15,
level4: 20,
level5: 25,
) !default;

20
package-lock.json generated
View File

@ -45,6 +45,7 @@
"jquery": "^3.6.0",
"m3-utils": "^0.1.0",
"sass": "^1.38.1",
"slick-carousel": "^1.8.1",
"terser-webpack-plugin": "^5.1.4"
},
"devDependencies": {
@ -3484,6 +3485,8 @@
},
"checkout/node_modules/core-util-is": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
"license": "MIT"
},
"checkout/node_modules/cosmiconfig": {
@ -4844,6 +4847,8 @@
},
"checkout/node_modules/get-intrinsic": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz",
"integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==",
"license": "MIT",
"dependencies": {
"function-bind": "^1.1.1",
@ -6294,6 +6299,8 @@
},
"checkout/node_modules/micromatch": {
"version": "4.0.5",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
"integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
"license": "MIT",
"dependencies": {
"braces": "^3.0.2",
@ -6305,6 +6312,8 @@
},
"checkout/node_modules/micromatch/node_modules/braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"license": "MIT",
"dependencies": {
"fill-range": "^7.0.1"
@ -19345,6 +19354,7 @@
"m3-utils": "^0.1.0",
"prettier": "^2.3.2",
"sass": "^1.38.1",
"slick-carousel": "^1.8.1",
"terser-webpack-plugin": "^5.1.4",
"webpack": "^5.51.1",
"webpack-merge": "^5.8.0"
@ -21672,7 +21682,9 @@
}
},
"core-util-is": {
"version": "1.0.3"
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
},
"cosmiconfig": {
"version": "7.1.0",
@ -22645,6 +22657,8 @@
},
"get-intrinsic": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz",
"integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==",
"requires": {
"function-bind": "^1.1.1",
"has": "^1.0.3",
@ -23679,6 +23693,8 @@
},
"micromatch": {
"version": "4.0.5",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
"integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
"requires": {
"braces": "^3.0.2",
"picomatch": "^2.3.1"
@ -23686,6 +23702,8 @@
"dependencies": {
"braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"requires": {
"fill-range": "^7.0.1"
}

9850
yarn.lock Normal file

File diff suppressed because it is too large Load Diff