Merge branch 'developer'

This commit is contained in:
Matheus Mariosa 2022-12-26 20:13:02 -03:00
commit d20cbeda5e
11 changed files with 24245 additions and 10451 deletions

32966
checkout/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -6,35 +6,197 @@ export default class Footer {
}
async init() {
this.API = await this.FechtAPI()
await this.selectors();
// this.onUpdate();
this.createHtmlCarrosel();
this.prateleiraul = await waitElement(".prateleira_carroselul");
this.createli();
this.onUpdate();
this.removeSlick();
await this.addCarrossel();
this.adicionaPayments();
await this.adicionandoDevelopBy();
}
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.payments = await waitElement(".footerCheckout__payments");
this.vtexpci = await waitElement(".footerCheckout__vtexpci");
this.devolperBy = await waitElement(".footerCheckout__developedBy");
this.prateleira = await waitElement(".footerCheckout__prateleira", {
timeout: 5000,
interval: 1000,
});
}
adicionaPayments() {
this.payments.innerHTML = `
<ul class="footerCheckout-payments-ul">
<li>
<img class="footerCheckout-payments-img" src="https://agenciamagma.vteximg.com.br/arquivos/masterCardM3Academy.png"/>
</li>
<li>
<img class="footerCheckout-payments-img" src="https://agenciamagma.vteximg.com.br/arquivos/visaM3Academy.png"/>
</li>
<li>
<img class="footerCheckout-payments-img" src="https://agenciamagma.vteximg.com.br/arquivos/amexM3Academy.png"/>
</li>
<li>
<img class="footerCheckout-payments-img" src="https://agenciamagma.vteximg.com.br/arquivos/eloM3Academy.png"/>
</li>
<li>
<img class="footerCheckout-payments-img" src="https://agenciamagma.vteximg.com.br/arquivos/hiperCardM3Academy.png"/>
</li>
<li>
<img class="footerCheckout-payments-img" src="https://agenciamagma.vteximg.com.br/arquivos/payPalM3Academy.png"/>
</li>
<li>
<img class="footerCheckout-payments-img" src="https://agenciamagma.vteximg.com.br/arquivos/boletoM3Academy.png"/>
</li>
</ul>`;
this.vtexpci.innerHTML = `
<img src="https://agenciamagma.vteximg.com.br/arquivos/vtexPCIM3Academy.png"/>
`;
}
async adicionandoDevelopBy() {
const vtex = this.devolperBy.children[0].children[0];
const m3 = this.devolperBy.children[1].children[0];
vtex.innerHTML = `
<span class="devolperByText">Powered By</span>
<img class="devolperByVTEX" src="https://agenciamagma.vteximg.com.br/arquivos/logoVTEXM3Academy.png"/>
`
m3.innerHTML = `
<span class="devolperByText">Developed By</span>
<img class="devolperByM3" src="https://agenciamagma.vteximg.com.br/arquivos/logoM3M3Academy.png"/>
`}
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;
const title = document.getElementById("cart-title");
if(localStorage.getItem('title') === '4'){
title.style.color = 'black';
title.style.marginBottom = '16px';
}else{
title.style.color = 'white';
title.style['margin-bottom'] = '110px';
}
let config = { childList: true, attributes: true };
let observer = new MutationObserver((mutations) => {
let removeClassh3 = document.getElementById("removeClassh3");
let removeClassul = document.getElementById("removeClassul");
mutations.forEach(function (mutation) {
console.log(mutation.type);
const checkoutTarget = mutation.target.attributes.style.nodeValue;
if(checkoutTarget === "display: none;"){
title.style.color = 'black';
title.style.marginBottom = '16px';
removeClassh3.classList.remove("displayNone");
removeClassul.classList.remove('displayNone');
$(removeClassul).slick("refresh");
localStorage.setItem('title', 4)
}else if(checkoutTarget === "display: block;"){
title.style.color = 'white';
title.style.marginBottom = '110px';
removeClassh3.classList.add("displayNone");
removeClassul.classList.add("displayNone");
}
});
});
observer.observe(target, config);
}
removeSlick() {
window.addEventListener("hashchange", () => {
let removeh3 = document.getElementById("removeClassh3");
let removeul = document.getElementById("removeClassul");
if(window.location.href !== 'https://m3academy.myvtex.com/checkout/#/cart'){
removeh3.classList.add("displayNone")
removeul.classList.add("displayNone")
} else {
removeh3.classList.remove("displayNone")
removeul.classList.remove('displayNone')
$(removeul).slick("refresh")
}
})
}
createHtmlCarrosel (){
if(this.prateleira){
this.prateleira.innerHTML = `
<h3 id="removeClassh3" class="prateleira-title displayNone">Você também pode gostar:</h3>
<ul id="removeClassul" class="prateleira_carroselul displayNone"></ul>
`
}
}
async FechtAPI(){
return fetch(`https://m3academy.myvtex.com/api/catalog_system/pub/products/search/?fq=productClusterIds:319`)
.then((response) => response.json())
.then((res) => {
const infoLi = res.map((response) => ({
name: response.productName,
skus: response.items.map((item) => item.name),
img: response.items[0].images[0].imageUrl,
link: response.link,
}));
return infoLi
});
}
async createli() {
let structureLi = ""
this.API.forEach((response) => {
const sku = response.skus.map((item) => `<li class="slick-skus-itens">${item}</li>`);
structureLi += `
<li class="conteiner-slick"><figure><img class="slick-img" src ="${response.img}"/></figure><figcaption class="slick-name">${response.name}</figcaption><div><ul class="slick-skus-conteiner">${sku.join('')}</ul></div><button class="slick-buttom" type="button"><a href="${response.link}">Ver Produto</a></button></li>
`;
})
this.prateleiraul.innerHTML = structureLi;
}
async addCarrossel() {
const elemento = await waitElement("#my-element");
$(elemento).slick({
slidesToShow: 4,
slidesToScroll: 1,
});
const elemento = await waitElement(".prateleira_carroselul")
if ($(elemento)) {
$(elemento).slick({
slidesToShow: 4,
slidesToScroll: 1,
arrows: true,
Infinity: false,
responsive: [
{
breakpoint: 1025,
settings: {
slidesToShow: 3,
slidesToScroll: 1,
infinite: false,
arrows: true,
}
},
{
breakpoint: 376,
settings: {
slidesToShow: 2,
slidesToScroll: 1,
infinite: false,
arrows: true,
}
},
],
});
}
}
}

View File

@ -8,14 +8,105 @@ export default class Header {
async init() {
await this.selectors();
console.log(this.item);
this.ProgresseBarHTML();
await this.progresseBarUrl();
}
async selectors() {
this.item = await waitElement("#my-element", {
//#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.barHTML = await waitElement(".progress-bar");
}
}
ProgresseBarHTML() {
if(window.innerWidth > 1024) {
this.barHTML.innerHTML = `
<ul class="conteir-ul">
<li class="conteiner-progressBar">
<div class="conteinerRelative">
<div class="conteinerItems">
<p class="textBar">Meu Carrinho</p>
<div id="cartCircle1" class="circle activeCircle"></div>
<div class="bar"></div>
</div>
</div>
</li>
<li class="conteiner-progressBar conteiner-progressBar-center">
<div class="conteinerRelative conteiner-Relative-Center">
<div class="conteinerItems">
<p class="textBar">Dados Pessoais</p>
<div id="cartCircle2" class="circle"></div>
</div>
</div>
</li>
<li class="conteiner-progressBar conteiner-progressBar-last">
<div class="conteinerRelative conteiner-Relative-last">
<div class="conteinerItems">
<p class="textBar">Finalização</p>
<div id="cartCircle3" class="circle"></div>
<div class="bar barLast"></div>
</div>
</div>
</li>
</ul>
`;
} else{
this.barHTML.innerHTML = ``;
};
};
async progresseBarUrl() {
if(window.innerWidth > 1024) {
this.Circle1 = await waitElement("#cartCircle1");
this.Circle2 = await waitElement("#cartCircle2");
this.Circle3 = await waitElement("#cartCircle3");
window.addEventListener("load", () => {
if(window.location.href === 'https://m3academy.myvtex.com/checkout/#/cart' && localStorage.getItem('cart') === '1')
{
this.Circle1.classList.add('activeCircle');
this.Circle2.classList.remove("activeCircle")
this.Circle3.classList.remove("activeCircle")
}
else if(window.location.href === 'https://m3academy.myvtex.com/checkout/#/email' && localStorage.getItem('profile') === '2'
|| window.location.href === 'https://m3academy.myvtex.com/checkout/#/profile' && localStorage.getItem('profile') === '2'
|| window.location.href === 'https://m3academy.myvtex.com/checkout/#/shipping' && localStorage.getItem('profile') === '2')
{
this.Circle1.classList.remove("activeCircle")
this.Circle2.classList.add("activeCircle");
this.Circle3.classList.remove("activeCircle")
} else if(window.location.href === 'https://m3academy.myvtex.com/checkout/#/payment' && localStorage.getItem('payment') === '3'){
this.Circle1.classList.remove("activeCircle")
this.Circle2.classList.remove("activeCircle")
this.Circle3.classList.add("activeCircle");
}
})
window.addEventListener("hashchange", (props) => {
const currentState = props.currentTarget.location.hash.split('/');
switch(currentState[1]) {
case 'cart':
this.Circle1.classList.add("activeCircle");
this.Circle2.classList.remove("activeCircle")
this.Circle3.classList.remove("activeCircle")
localStorage.setItem('cart', 1);
break;
case 'email':
case 'profile':
case 'shipping':
this.Circle1.classList.remove("activeCircle")
this.Circle2.classList.add("activeCircle");
this.Circle3.classList.remove("activeCircle")
localStorage.setItem('profile', 2);
break;
case 'payment':
this.Circle1.classList.remove("activeCircle")
this.Circle2.classList.remove("activeCircle")
this.Circle3.classList.add("activeCircle");
localStorage.setItem('payment', 3);
break;
};
});
} else{};
};
};

View File

@ -1,13 +1,40 @@
.checkout-container {
@media only screen and (min-width: 2500px){
height: 623px;
}
.client-pre-email {
border-color: $color-gray4;
border-color: black;
font-family: $font-family;
padding-top: 8px;
padding-top: 14px;
.link-cart {
margin: 0 !important;
height: 16px;
line-height: 16px;
@media only screen and (max-width: 1024px){
line-height: 12px;
}
@media only screen and (min-width: 2500px){
height: 33px;
line-height: 33px;
}
a {
color: $color-black;
color: black;
font-family: 'Tenor Sans';
font-size: 14px;
text-transform: uppercase;
font-weight: 400;
@media only screen and (max-width: 1024px){
font-size: 10px;
margin-right: 16px;
}
@media only screen and (min-width: 2500px){
font-size: 28px;
}
&:hover {
color: lighen($color-black, 10);
@ -22,88 +49,298 @@
justify-content: center;
h3 {
margin-bottom: 16px;
margin: 0 0 21px;
span {
color: #303030;
font-size: 24px;
}
@media only screen and (max-width: 1024px){
margin-bottom: 38px;
}
small {
color: $color-gray4;
}
}
@media only screen and (max-width: 375px){
margin-bottom: 22px;
}
@media only screen and (min-width: 2500px){
margin-bottom: 23px;
}
label{
@media only screen and (max-width: 1024px){
margin-top: 16.55%;
}
@media only screen and (max-width: 375px){
margin-top: 30.4720115%;
}
@media only screen and (min-width: 2500px){
margin-top: 4.0008371%;
}
span {
font-family: 'Tenor Sans';
color: black;
font-size: 20px;
line-height: 23px;
font-weight: 400;
text-transform: uppercase;
@media only screen and (max-width: 1024px){
font-size: 14px;
line-height: 16px;
}
@media only screen and (max-width: 375px){
font-size: 12px;
line-height: 14px;
}
@media only screen and (min-width: 2500px){
font-size: 40px;
line-height: 47px;
}
}
small {
padding: 0;
font-family: 'Tenor Sans';
color: black;
font-size: 20px;
line-height: 23px;
font-weight: 400;
text-transform: uppercase;
@media only screen and (max-width: 1024px){
font-size: 14px;
line-height: 16px;
}
@media only screen and (max-width: 375px){
font-size: 12px;
line-height: 14px;
}
@media only screen and (min-width: 2500px){
font-size: 40px;
line-height: 47px;
}
}
}
}
}
.client-email {
margin: 0 0 16px;
margin: 0 0 24.56px;
@media only screen and (max-width: 1024px){
width: 96.875%;
margin: 0 16px 22.56px;
}
@media only screen and (max-width: 375px){
width: 91.4666667%;
margin-bottom: 20.56px;;
}
@media only screen and (min-width: 2500px){
width: 48.549%;
}
input {
display: block;
box-shadow: none;
color: $color-black;
color: black;
font-family: $font-family;
padding: 0 16px;
border: 2px solid $color-gray3;
padding: 0 14.09px;
border: 1px solid black;
border-right: 0px;
box-sizing: border-box;
border-radius: 5px;
border-radius: 5px 0px 0px 5px;
width: 562px;
height: 52px;
font-weight: 400;
font-size: 12px;
line-height: 16px;
@media only screen and (max-width: 1024px){
width: 87.2217742%;
}
@media (max-width: 490px) {
width: auto;
width: auto;
}
@media only screen and (max-width: 375px){
width: 62.9737609% !important;
}
@media only screen and (min-width: 2500px){
width: 78.8285458%;
}
}
input::placeholder{
font-family: 'Open Sans';
font-weight: 400;
font-size: 12px;
line-height: 16px;
color: black;
@media only screen and (min-width: 2500px){
font-size: 24px;
line-height: 33px;
}
}
button {
background-color: $color-black;
border-radius: 5px;
background-color: #00C8FF;
border-radius: 0px 8px 8px 0px;
border: none;
font-family: $font-family;
height: 54px;
text-transform: uppercase;
color: black;
font-weight: 700;
font-size: 14px;
line-height: 19px;
letter-spacing: 0.05em;
height: 52px;
padding: 0 14.4px;
right: 0;
top: 0;
cursor: pointer;
@media (max-width: 490px) {
height: 48px;
margin: 0;
position: absolute;
}
@media only screen and (max-width: 375px){
margin: 0;
position: absolute;
}
@media only screen and (min-width: 2500px){
width: 22.5547648%;
font-size: 28px;
line-height: 38px;
}
span {
margin: 0 3.3px;
}
}
span.help.error {
font-family: $font-family;
color: red;
margin-top: 3px;
font-weight: 700;
font-size: 12px;
line-height: 16px;
@media only screen and (max-width: 375px){
margin-top: 9px;
}
@media only screen and (min-width: 2500px){
margin-top: 1px;
font-size: 24px;
line-height: 33px;
}
}
}
.emailInfo {
padding: 16px;
background-color: $color-white;
border: 1px solid $color-gray4;
border-radius: 0;
border: 1px solid black;
border-radius: 5px;
@media only screen and (max-width: 1024px){
padding-top: 19px;
width: 30.1757813%;
}
@media only screen and (max-width: 375px){
padding: 16px;
margin: 0 16px;
width: 82.4%;
}
@media only screen and (min-width: 2500px){
width: 38.8185%;
}
h3 {
font-family: $font-family;
color: #303030;
margin: 0 0 8px 0;
margin: 0 0 9.56px 0;
font-weight: 700;
font-size: 12px;
line-height: 16px;
@media only screen and (max-width: 1024px){
margin-bottom: 6.56px;
}
@media only screen and (max-width: 375px){
margin-bottom: 9.56px
}
@media only screen and (min-width: 2500px){
font-size: 24px;
line-height: 33px;
margin-bottom: 14px;
}
}
ul {
margin: 0;
margin: 0 0 10.56px;
@media only screen and (max-width: 1024px){
margin-bottom: 7.56px;
}
@media only screen and (max-width: 375px){
margin-bottom: 10.56px;
}
li {
span {
color: $color-black;
font-family: $font-family;
color: black;
font-weight: 700;
font-size: 12px;
line-height: 16px;
@media only screen and (min-width: 2500px){
font-size: 24px;
line-height: 33px;
}
}
i::before {
color: $color-black;
color: #00C8FF;
font-size: 1rem;
opacity: 1;
@media only screen and (min-width: 2500px){
font-size: 24px;
width: 33px;
height: 23.53px;
}
}
}
}
.icon-lock{
right: -1px;
bottom: -30px;
@media only screen and (max-width: 1024px){
display: none;
}
}
i::before {
color: $color-black;
font-size: 6rem;
opacity: 0.5;
@media only screen and (min-width: 2500px){
font-size: inherit;
width: 114.55px;
height: 156.94px;
}
}
}
}

View File

@ -6,17 +6,29 @@
.cart-template {
font-family: $font-family;
@include mq(md, max) {
padding: 0 0;
}
};
.item-unit-label {
display: none;
}
.cart {
border: 3px solid $color-gray3;
border: 1px solid $color-gray3;
box-sizing: border-box;
border-radius: 5px;
padding: 16px;
padding: 0 16px 16px;
height: 127px;
@media only screen and (max-width: 1024px){
border-radius: 0;
border-left: 0;
border-right: 0;
padding: 16px 16px 15px;
height: 93px;
};
@include mq(md, max) {
margin: 0px 0 25px 0;
@ -108,15 +120,27 @@
.cart-items {
.product-item {
padding: 16px 0;
@media only screen and (max-width: 1024px){
display: grid;
grid-template:
"image name remove" 25px
"image quantity price" 34px
/ 76px 498.5px 417.5px;
height: 60px;
padding: 0;
}
}
th {
color: $color-black;
padding: 0 0 16px;
padding: 0 0 7px;
font-style: normal;
font-weight: bold;
font-weight: 100;
font-size: 14px;
line-height: 16px;
font-family: 'Tenor Sans';
height: 32px;
@include mq(md, max) {
&.quantity-price,
@ -124,6 +148,28 @@
display: none;
}
}
@media only screen and (max-width: 1024px){
display: none;
}
}
td {
padding: 0;
.total-selling-price{
font-weight: 700;
}
}
.shipping-date{
font-size: 0;
}
th.shipping-date::after{
content: "Frete";
font-size: 14px;
display: flex;
flex-direction: column;
}
.product-image {
@ -135,27 +181,46 @@
width: 72px;
}
@media only screen and (max-width: 1024px){
grid-area: image;
}
img {
transform: scaleX(-1);
height: 60px;
max-width: 100%;
min-width: 60px;
max-width: 60px;
width: auto;
margin-top: 10px;
@include mq(sm, max) {
height: 72px;
width: auto;
}
@media only screen and (max-width: 1024px){
margin-top: 0;
}
}
}
.product-name {
padding-right: 0;
width: 300px;
padding: 0 0 0 16px;
@media only screen and (max-width: 1024px){
grid-area: name;
padding: 0;
}
@include mq(lg, max) {
width: 250px;
}
a {
color: $color-blue;
font-family: 'Tenor Sans';
color: black;
font-style: normal;
font-weight: normal;
font-size: 12px;
@ -179,6 +244,7 @@
}
td.shipping-date {
width: 94;
color: $color-gray2;
font-size: 12px;
line-height: 14px;
@ -186,10 +252,17 @@
@include mq(md, max) {
display: none;
}
@media only screen and (max-width: 1024px){
display: none;
}
}
.product-price {
th.product-price {
font-size: 0;
min-width: 100px;
@include mq(md, max) {
min-width: 78px;
}
@ -214,34 +287,74 @@
}
}
}
th.product-price::after {
content: "Unidade";
font-size: 14px;
display: flex;
flex-direction: column;
}
td.product-price{
font-size: initial;
top: 11.5px;
@media only screen and (max-width: 1024px){
grid-area: price;
justify-self: end;
top: 0;
}
.list-price{
height: 22px;
font-family: 'Tenor Sans';
font-weight: 400;
font-size: 12px;
line-height: 14px;
.old-product-price-label{
text-transform: lowercase;
color: #989898;
}
}
.best-price{
.new-product-price-label{
text-transform: lowercase;
}
}
}
td.quantity {
align-items: center;
border: 1px solid $color-gray3;
border-radius: 0;
border-radius: 8px;
box-sizing: border-box;
display: flex;
justify-content: center;
margin: 6px auto 0;
margin: 23px auto 0;
max-height: 38px;
max-width: 118px;
padding: 0;
width: max-content !important;
height: 34px;
@media (max-width: 490px) {
margin-left: 84px !important;
};
@media only screen and (max-width: 1024px){
grid-area: quantity;
margin: 0;
}
input {
background-color: $color-white;
border: 1px solid $color-gray3;
border: 0;
border-radius: 0;
border-width: 0 1px;
display: block;
max-height: 38px;
margin: 0 !important;
padding: 8px 0;
width: 38px;
padding: 0;
width: 25px;
color: $color-gray2;
box-shadow: none;
@ -253,24 +366,16 @@
.icon-plus-sign,
.icon-minus-sign {
&::before {
color: $color-black;
color: #00C8FF;
display: block;
font-weight: 500;
padding: 1px 12px;
}
}
.icon-minus-sign {
&:before {
content: "-";
font-size: 16px;
}
}
.icon-plus-sign {
&:before {
content: "+";
font-size: 14px;
width: 16px;
height: 16px;
border-radius: 100px;
padding: 0;
margin: 1px 10px;
cursor: pointer;
}
}
@ -297,14 +402,16 @@
}
span {
font-style: normal;
font-weight: normal;
font-size: 14px;
line-height: 16px;
color: $color-black;
color: black;
}
}
.quantity-price {
@media only screen and (max-width: 1024px){
display: none;
}
@include mq(md, max) {
display: none;
}
@ -316,11 +423,27 @@
}
.icon::before {
color: $color-gray4;
font-size: 15px;
font-size: 13px;
height: 10px;
@include mq(md, max) {
font-size: 18px;
}
}
@media only screen and (max-width: 1024px){
grid-area: remove;
justify-self: end;
height: 11px;
width: 10px;
}
.item-link-remove{
@media only screen and (max-width: 1024px){
font-size: 0;
padding: 0;
}
}
}
@ -351,12 +474,13 @@
}
.srp-main-title {
margin: 32px 0 12px;
margin: 32px 0 11px;
font-style: normal;
font-weight: normal;
font-size: 24px;
line-height: 28px;
color: $color-gray2;
line-height: 33px;
color: black;
font-family: 'Open Sans';
@include mq(md, max) {
margin-top: 0;
@ -367,14 +491,14 @@
color: $color-gray2;
font-size: 12px;
line-height: 18px;
margin: 0 0 12px;
margin: 0;
}
button.shp-open-options {
background-color: $color-gray5;
border: none;
border-radius: 5px;
color: $color-gray2;
color: black;
font-size: 16px;
letter-spacing: 0.05em;
line-height: 19px;
@ -382,6 +506,14 @@
outline: none;
padding: 12px 40px;
transition: all 0.2s linear;
margin-top: 10px;
cursor: pointer;
@media only screen and (max-width: 1024px){
width: 157px;
font-size: 14px;
line-height: 19px;
}
&:hover {
background-color: lighten($color-gray5, 5);
@ -396,6 +528,10 @@
.srp-data {
width: 280px;
@media only screen and (max-width: 1024px){
margin-top: 0;
}
@include mq(cstm, max) {
width: calc(100vw - 32px);
}
@ -405,9 +541,9 @@
}
.srp-pickup-my-location__button {
background-color: $color-black;
background-color: #00C8FF;
border: none;
border-radius: 5px;
border-radius: 8px;
color: $color-white;
outline: none;
width: 100%;
@ -415,7 +551,7 @@
font-style: normal;
font-weight: 500;
font-size: 14px;
line-height: 16px;
line-height: 19px;
letter-spacing: 0.05em;
&:hover {
@ -429,7 +565,8 @@
}
.srp-toggle {
margin: 0 0 34px;
margin: 0 0 20px;
padding-bottom: 0;
&__wrapper {
background-color: $color-white;
@ -444,12 +581,13 @@
}
&__current {
border: 1px solid $color-blue;
border: 1px solid black;
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
border-radius: 100px;
}
.blue {
color: $color-blue;
color: black;
}
label {
@ -461,73 +599,96 @@
}
}
.srp-postal-code {
.ship-postalCode {
label {
font-family: $font-family;
font-style: normal;
font-weight: normal;
font-size: 12px;
line-height: 14px;
color: $color-black;
margin-bottom: 12px;
}
.ship-country {
display: none;
}
input {
border: 1px solid $color-gray3;
border-radius: 5px;
box-shadow: none;
color: $color-gray3;
font-size: 12px;
height: 36px;
padding: 12px 8px;
width: 172px;
}
.vtex-shipping-preview-0-x-postalCodeForgotten{
margin-top: 0;
& ~ button {
background-color: $color-black;
border: none;
border-radius: 5px;
color: $color-white;
font-size: 12px;
height: 36px;
letter-spacing: 1px;
outline: none;
position: absolute;
right: -150px;
top: 36px;
transition: all 0.2s linear;
width: 96px;
text-transform: uppercase;
&:hover {
background-color: lighten($color-black, 5);
.ship-postalCode {
label {
font-family: $font-family;
font-style: normal;
font-weight: normal;
font-size: 12px;
line-height: 14px;
color: $color-black;
margin-bottom: 2px;
}
&:active {
background-color: darken($color-black, 5);
input {
border: 1px solid $color-gray3;
border-radius: 5px;
box-shadow: none;
color: $color-gray3;
font-size: 12px;
height: 36px;
padding: 12px 8px;
width: 172px;
}
}
small a {
font-family: $font-family;
font-style: normal;
font-weight: normal;
font-size: 10px;
line-height: 12px;
color: $color-blue;
margin-top: 7px;
}
& ~ button {
background-color: #00c8fe;
border: none;
border-radius: 5px;
color: $color-white;
font-weight: 700;
font-size: 14px;
line-height: 19px;
height: 36px;
letter-spacing: 1px;
outline: none;
position: absolute;
right: -150px;
top: 16px;
transition: all 0.2s linear;
width: 96px;
text-transform: uppercase;
padding: 8px 8px 9px;
span.help.error {
color: red;
font-size: 12px;
position: absolute;
left: 0;
width: 100%;
top: 17px;
&:hover {
background-color: lighten($color-black, 5);
}
&:active {
background-color: darken($color-black, 5);
}
}
small{
a {
font-family: 'Tenor Sans';
font-style: normal;
font-weight: 400;
font-size: 0px;
line-height: 12px;
color: black;
margin-top: 7px;
cursor: pointer;
};
a::before {
content: 'Não sei meu código postal';
font-size: 10px;
line-height: 12px;
text-decoration-line: underline;
}
}
span.help.error {
color: red;
font-size: 12px;
position: absolute;
left: 0;
width: 100%;
top: 17px;
}
}
}
}
.srp-result {
@ -592,23 +753,30 @@
&-totalizers {
padding: 0;
width: 346px;
width: 356px;
margin-top: 33px;
@media only screen and (max-width: 1024px){
margin: 48px 16px 7px;
width: 96.875%;
}
.coupon-data {
#cart-link-coupon-add {
text-decoration: none;
cursor: pointer;
&:hover {
text-decoration: underline;
cursor: pointer;
}
}
span {
font-family: $font-family;
font-family: 'Tenor Sans';
font-style: normal;
font-weight: normal;
font-size: 12px;
line-height: 14px;
color: $color-blue;
color: black;
text-decoration: none;
}
}
@ -629,19 +797,26 @@
text-decoration: underline;
}
.coupon-label label {
margin-bottom: 12px;
font-family: $font-family;
font-style: normal;
font-weight: normal;
font-size: 12px;
line-height: 14px;
color: $color-gray2;
cursor: none;
.coupon-label{
margin-bottom: 4px;
label {
font-family: $font-family;
font-style: normal;
font-weight: normal;
font-size: 12px;
line-height: 14px;
color: $color-gray2;
cursor: none;
display: flex;
align-items: initial;
}
}
.coupon-fields {
display: flex;
margin-bottom: 32px;
width: 362px;
@include mq(sm, max) {
span {
@ -657,14 +832,14 @@
}
input {
border: 2px solid $color-gray3;
border: 1px solid $color-gray3;
border-radius: 5px;
box-shadow: none;
color: $color-gray4;
font-size: 12px;
height: 34px;
padding: 0 12px;
max-width: 160px;
padding: 0 16px;
width: 170px;
@include mq(sm, max) {
max-width: 100%;
@ -673,18 +848,21 @@
}
button {
background: $color-black;
font-family: 'Open Sans';
background: #00C8FF;
border: none;
border-radius: 5px;
color: $color-white;
font-size: 12px;
border-radius: 8px;
color: black;
font-size: 14px;
line-height: 19px;
height: 36px;
letter-spacing: 1px;
margin-left: 6px;
margin-left: 12px;
outline: none;
transition: all 0.2s linear;
width: 94px;
width: 134px;
text-transform: uppercase;
cursor: pointer;
@include mq(md, max) {
width: 138px;
@ -717,7 +895,8 @@
font-size: 14px;
line-height: 16px;
color: $color-black;
padding: 12px 0;
padding: 10px 0;
font-family: 'Tenor Sans';
}
&.info {
@ -733,10 +912,11 @@
tfoot {
td.info,
td.monetary {
font-family: 'Open Sans';
font-style: normal;
font-weight: normal;
font-weight: 700;
font-size: 18px;
line-height: 21px;
line-height: 25px;
color: $color-black;
}
}
@ -747,7 +927,7 @@
.cart-links-bottom {
display: flex;
flex-direction: column;
width: 343px;
width: 356px;
@include mq(md, max) {
padding: 0 16px;
@ -755,6 +935,9 @@
float: none;
margin-bottom: 50px;
}
.cart-template .cart-links-bottom {
width: 354px;
}
@include mq(md, min) {
margin: 0;
@ -771,36 +954,33 @@
}
a {
font-family: $font-family;
font-family: 'Tenor Sans';
font-style: normal;
font-weight: normal;
font-size: 12px;
line-height: 14px;
color: $color-blue;
color: black;
}
}
.btn-place-order-wrapper {
a {
background: $color-green;
background: #00C8FF;
border: none;
border-radius: 5px;
border-radius: 8px;
display: block;
font-size: 0;
transition: ease-in 0.22s all;
padding: 12px 19px;
&:hover {
background-color: darken($color-green, 5);
}
padding: 10.5px 19px;
cursor: pointer;
&:after {
content: "finalizar compra";
font-family: $font-family;
font-weight: 500;
font-size: 13px;
font-weight: 700;
font-size: 14px;
letter-spacing: 0.05em;
color: $color-white;
color: black;
text-transform: uppercase;
vertical-align: middle;
line-height: 19px;
@ -809,4 +989,12 @@
}
}
}
.summary-template-holder{
.row-fluid{
@media only screen and (max-width: 1024px){
display: flex;
flex-direction: column;
}
}
}
}

View File

@ -7,32 +7,84 @@
@include mq(md, max) {
padding: 0 16px;
}
.empty-cart-message{
display: none;
}
}
&-title {
font-size: 20px;
font-family: 'Open Sans';
height: 30px;
text-transform: uppercase;
font-size: 24px;
font-weight: 700;
line-height: 33px;
text-align: center;
@media only screen and (max-width: 1024px){
font-size: 18px;
line-height: 25px;
}
@media only screen and (min-width: 2500px){
height: 60px;
font-size: 48px;
line-height: 65px;
}
}
&-links {
.link-choose-products {
background: $color-black;
border: none;
border-radius: 5px;
width: 28.614%;
background: white;
border: 1px solid black;
transition: ease-in 0.22s all;
outline: none;
font-family: $font-family;
font-style: normal;
font-weight: 500;
font-size: 14px;
line-height: 16px;
font-weight: 400;
font-size: 0px;
line-height: 16px;
text-align: center;
text-transform: uppercase;
letter-spacing: 0.05em;
color: $color-white;
color: black;
text-transform: uppercase;
margin: 22px 0 0;
padding: 15px;
cursor: pointer;
height: 16px;
border-radius: 0;
@media only screen and (max-width: 1024px){
line-height: 16px;
margin: 12px 0 0;
width: 26.8557966%
};
@media only screen and (max-width: 375px){
width: auto;
};
@media only screen and (min-width: 2500px){
width: 31.9335%;
line-height: 33px;
height: 36px;
};
&:hover {
background: lighten($color-black, 5);
}
&::after{
content: 'continuar comprando';
font-size: 14px;
@media only screen and (min-width: 2500px){
font-size: 28px;
};
}
}
}
}

View File

@ -11,9 +11,13 @@ html {
footer .footerCheckout__wrapper {
width: 94.9734%;
margin: auto auto 0 auto;
@media only screen and (max-width: 1024px){
margin: auto 8px
}
}
footer .footerCheckout__prateleira,
header {
header .container {
width: 79.53125%;
margin: 0 auto;
}
@ -50,6 +54,15 @@ body {
.container-order-form,
.container-cart {
width: 80%;
height: 488px;
@media only screen and (max-width: 1024px){
height: 478px;
width: 100%;
};
@media only screen and (min-width: 2500px){
height: 536.8px;
}
}
}
@ -68,20 +81,36 @@ body {
#cart-title,
#orderform-title {
color: $color-gray2;
font-family: $font-family;
font-weight: 500;
font-size: 36px;
line-height: 42px;
margin: 40px 0 30px;
letter-spacing: 0.1em;
color: #292929;
font-family: 'Open Sans';
font-weight: 700;
font-size: 24px;
line-height: 33px;
letter-spacing: 0.05em;
text-transform: uppercase;
margin: 17px 0 16px;
@include mq(md, max) {
margin-left: 30px;
}
@media only screen and (max-width: 1024px){
margin: 17px 16px 16px;
}
}
#orderform-title{
letter-spacing: 0;
@media only screen and (min-width: 2500px){
font-size: 48px;
line-height: 37px;
}
}
.dropdown {
&__content {
&--closed {

View File

@ -60,6 +60,8 @@
.slick-loading & {
visibility: hidden;
}
}
.slick-slide {
float: left;
@ -76,6 +78,7 @@
display: none;
}
display: none;
&.dragging img {
@ -84,6 +87,7 @@
.slick-initialized & {
display: block;
}
.slick-loading & {
@ -96,6 +100,7 @@
border: 1px solid transparent;
}
}
.slick-arrow {
font-size: 0;
position: absolute;
@ -105,10 +110,28 @@
no-repeat center center;
z-index: 4;
left: 10px;
@media only screen and (max-width: 375px){
left: 2px;
}
@media only screen and (min-width: 2500px){
background: url("https://agenciamagma.vteximg.com.br/arquivos/arrow-left-M3Academy.svg");
width: 26px !important;
height: 56px !important;
}
}
.slick-next {
background: url("https://agenciamagma.vteximg.com.br/arquivos/arrow-right-mini-M3Academy.svg");
z-index: 4;
right: 10px;
@media only screen and (min-width: 2500px){
background: url("https://agenciamagma.vteximg.com.br/arquivos/arrow-right-M3Academy.svg");
width: 26px !important;
height: 56px !important;
}
}
.slick-arrow.slick-hidden {
display: none;

View File

@ -1,28 +1,256 @@
/* _footer.scss */
.displayNone{
display: none !important;
};
.footerCheckout {
border-top: none;
margin-top: 37px;
color: $color-gray2;
.footerCheckout__prateleira{
display: flex;
flex-direction: column;
margin-bottom: 56px;
@media only screen and (max-width: 1024px){
padding: 0 16px 54px;
margin: 0;
width: 96.875%;
}
@media only screen and (max-width: 375px){
padding: 0 15.5px 54px;
}
.prateleira-title{
display: flex;
width: 100%;
margin: 0 0 20px;
font-family: 'Tenor Sans';
font-size: 24px;
line-height: 38px;
color: black;
justify-content: center;
font-weight: 400;
@media only screen and (max-width: 375px){
font-size: 14px;
line-height: 28px;
}
@media only screen and (min-width: 2500px){
font-size: 48px;
line-height: 76px;
}
}
.displayNone{
display: none !important;
};
.prateleira_carroselul{
margin: 0;
.slick-arrow{
top: 45%;
border: 0;
width: 13.64px;
height: 29.47px;
@media only screen and (max-width: 375px){
top: 47%;
right: 5%;
}
}
.conteiner-slick{
max-width: 242px;
height: 390px;
display: flex;
flex-direction: column;
align-items: center;
@media only screen and (max-width: 1024px){
max-width: max-content;
height: auto;
}
@media only screen and (max-width: 375px){
width: 164px !important;
}
@media only screen and (min-width: 2500px){
max-width: max-content;
height: auto;
}
figure{
margin: 0;
.slick-img{
width: 242px;
height: 242px;
@media only screen and (max-width: 1024px){
width: 320px;
height: 320px;
}
@media only screen and (max-width: 375px){
width: 164px;
height: 164px;
}
@media only screen and (min-width: 2500px){
height: 485.07px;
width: 485.07px;
}
}
}
.slick-name{
display: flex;
justify-content: center;
font-family: 'Open Sans';
font-size: 13px;
line-height: 18px;
color: black;
margin-top: 20px;
@media only screen and (max-width: 375px){
text-align: center;
}
@media only screen and (min-width: 2500px){
font-size: 26px;
line-height: 35px;
margin-top: 21.93px;
}
}
.slick-skus-conteiner{
list-style: none;
display: flex;
justify-content: center;
margin: 20px 0;
@media only screen and (max-width: 375px){
margin: 20px 0 10px;
height: 61px;
flex-wrap: wrap;
align-content: center;
}
.slick-skus-itens{
padding: 5px;
background-color: #00C8FF;
color: white;
font-family: 'Open Sans';
border-radius: 8px;
font-size: 13px;
line-height: 18px;
margin: 0 2.5px;
text-transform: uppercase;
font-weight: 700;
@media only screen and (max-width: 375px){
margin-bottom: 5px;
height: 18px;
};
@media only screen and (min-width: 2500px){
font-size: 26px;
line-height: 35px;
}
}
}
.slick-buttom{
width: 100%;
background-color: #00C8FF;
border-radius: 8px;
padding: 12px 0;
border: 0;
@media only screen and (max-width: 375px){
width: 164px;
}
a {
color: white;
font-family: 'Open Sans';
font-size: 13px;
line-height: 18px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
@media only screen and (min-width: 2500px){
font-size: 26px;
line-height: 35px;
}
};
};
};
};
};
&__wrapper {
border-top: 1px solid black;
align-items: center;
display: flex;
margin: 0;
padding: 0 auto ;
justify-content: space-between;
.container {
display: flex;
align-items: center;
padding: 16px 0;
margin: 0;
justify-content: space-between;
width: 100%;
@media only screen and (max-width: 1024px){
flex-direction: column;
align-items: normal;
justify-content: normal;
padding: 22px 0;
}
@media only screen and (max-width: 375px){
margin-top: 16px;
}
}
}
&__address {
color: $color-gray2;
color: #292929;
font-family: $font-family;
font-style: normal;
font-weight: normal;
font-size: 10px;
line-height: 12px;
line-height: 13.62px;
text-transform: capitalize;
width: 22.1278976%;
max-width: 40%;
margin-right: 11.2695984%;
@include mq(md, max) {
margin-bottom: 24px;
max-width: 100%;
}
@media only screen and (min-width: 2500px){
font-size: 20px;
line-height: 27px;
width: 36.7682673%;
margin-right: 0;
}
@media only screen and (max-width: 1024px){
order: 2;
width: 100%;
margin: 16px 0;
line-height: 14px;
margin-left: 8px;
}
}
&__stamps {
@ -30,17 +258,71 @@
display: flex;
justify-self: center;
list-style: none;
width: 33.2329763%;
margin: 0 15.5471102% 0 0;
@include mq(md, max) {
align-self: center;
margin-bottom: 12px;
}
@media only screen and (min-width: 2500px){
margin: 0;
width: 46.876382%;
}
@media only screen and (max-width: 1024px){
order: 1;
}
@media only screen and (max-width: 375px){
width: 100%;
margin-bottom: 0;
align-self: normal;
}
.footerCheckout__payments{
.footerCheckout-payments-ul{
display: flex;
list-style-type: none;
margin: 0;
li{
margin-right: 13.35px;
@media only screen and (max-width: 1024px){
margin-right: 5px;
}
}
img{
height: 20px;
@media only screen and (min-width: 2500px){
height: 39.06px;
width: 69.63px;
}
@media only screen and (max-width: 1024px){
min-width: 35px;
}
}
}
}
.footerCheckout__vtexpci{
img{
min-width: 53px;
height: 33px;
@media only screen and (min-width: 2500px){
width: 103.52px;
height: 64.46px;
}
}
}
&__divider {
background-color: $color-gray4;
display: inline-block;
height: 24px;
margin: 0 8px;
margin-right: 10px;
width: 1px;
}
}
@ -50,9 +332,37 @@
display: flex;
list-style-type: none;
margin: 0;
width: 17.8598%;
@media only screen and (min-width: 2500px){
width: 16.3827269%;
}
@media only screen and (max-width: 1024px){
order: 3;
width: 100%;
margin-left: 8px;
}
li:last-child {
margin-left: 16px;
margin-left: 10.73px;
@media only screen and (min-width: 2500px){
margin-left: 10.23px
}
@media only screen and (max-width: 1024px){
margin-left: 10.45px;
}
.devolperByM3{
height: 15.65px;
width: 28.66px;
@media only screen and (min-width: 2500px){
height: 30.56px;
width: 55.98px;
}
}
}
a {
@ -67,7 +377,25 @@
text-decoration: none;
span {
margin-right: 8px;
margin-right: 10.12px;
font-family: 'Open Sans';
font-size: 9px;
line-height: 12px;
color: #292929;
@media only screen and (min-width: 2500px){
font-size: 18px;
line-height: 25px;
}
}
.devolperByVTEX{
height: 16px;
width: 44.92px;
@media only screen and (min-width: 2500px){
height: 31.25px;
width: 87.73px;
}
}
}
}

View File

@ -1,22 +1,185 @@
/* _header.scss */
.headerCheckout {
.container {
width: auto !important;
border-bottom: 1px solid #000;
@media only screen and (max-width: 1024px) {
border-bottom: 1px solid #000;
padding: 16px;
.container {
width: 100%;
margin: 0;
}
};
@media only screen and (min-width: 2500px){
height: 149.2px;
}
&__wrapper {
align-items: center;
display: flex;
justify-content: space-between;
}
padding: 29px 0;
@media only screen and (max-width: 1024px) {
padding: 0;
.progress-bar{
width: 0;
height: 0;
}
}
.progress-bar{
width: 43.1237721021611%;
height: 35px;
@media only screen and (max-width: 1024px) {
display: none;
}
.conteir-ul{
display: flex;
margin: 0;
width: 100%;
height: 100%;
.conteiner-progressBar{
display: flex;
width: 39.41%;
height: 100%;
align-items: center;
.conteinerRelative {
display: flex;
position: relative;
width: 100%;
.conteinerItems {
display: flex;
flex-direction: column;
align-items: center;
.textBar{
font-family: 'Tenor Sans';
font-size: 12px;
line-height: 14px;
margin-bottom: 9px;
};
.circle{
width: 12px;
height: 12px;
border: 1px solid black;
border-radius: 50%;
};
.activeCircle {
background-color: black;
};
.bar{
position: absolute;
width: 100%;
border-top: 1px solid black;
margin-bottom: 8px;
left: 25%;
bottom: -4%;
};
.barLast{
left: -22%;
}
@media only screen and (min-width: 2500px){
display: flex;
.textBar{
font-size: 24px;
line-height: 28px;
margin-bottom: 15px;
};
.circle{
width: 24px;
height: 24px;
};
.bar{
left: 17%;
bottom: 6%;
}
.barLast{
left: -17%;
}
}
};
.conteinerItems-last{
align-content: flex-end
}
};
.conteiner-Relative-Center{
justify-content: center;
}
.conteiner-Relative-last{
justify-content: flex-end;
}
};
.conteiner-progressBar-center{
width: 20.504%;
margin-left: 3.49px
}
};
@media only screen and (min-width: 2500px){
width: 54.2609693%;
height: 67px;
.conteir-ul{
display: flex;
.conteiner-progressBar{
width: 41.7042063%;
}
.conteiner-progressBar-center{
width: 16.5915874%;
margin: 0;
}
}
}
};
};
&__logo {
img {
height: 52px;
width: auto;
height: 37.14px;
width: 155.58px;
};
@media only screen and (max-width: 1024px) {
img{
height: 32.12px;
}
}
}
@media only screen and (min-width: 2500px){
img{
width: 382.07px;
height: 91.2px;
}
}
};
&__safeBuy {
display: flex;
@media only screen and (max-width: 1024px) {
align-items: center;
justify-content: center;
span{
font-size: 12px;
line-height: 15.11px;
}
img{
width: 12px;
height: 13.33px;
}
}
span {
align-items: center;
display: flex;
@ -25,12 +188,29 @@
font-style: normal;
font-weight: normal;
font-size: 12px;
line-height: 14px;
line-height: 16.34px;
color: $color-gray;
}
};
i {
margin-right: 8px;
};
img {
width: 12px;
height: 15px;
margin-right: 8px;
};
@media only screen and (min-width: 2500px){
img{
width: 29.47px;
height: 41.46px;
};
span{
font-size: 24px;
line-height: 33px;
}
}
}
}
};
};

2
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": {
@ -19345,6 +19346,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"