Merge pull request 'Develop' (#2) from Develop into main

Reviewed-on: #2
This commit is contained in:
Gustavo Rallenson Gonçalves Da Silva 2022-12-19 02:52:06 +00:00
commit 468c1403f4
14 changed files with 1220 additions and 69 deletions

View File

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

View File

@ -7,34 +7,207 @@ export default class Footer {
async init() {
await this.selectors();
// this.onUpdate();
await this.addCarrossel();
await this.empytStart()
await 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.checkoutVazio = await waitElement(".empty-cart-content", {
//#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.prateleira = await waitElement(".footerCheckout__prateleira");
this.Footer = await waitElement(".footerCheckout");
this.Fds = document.createElement("div")
this.MeuCarrinho = await waitElement("#cart-title", {
//#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
});
}
onUpdate() {
async empytStart(){
let target2 = this.prateleira;
let Footer = this.Footer;
const MeuCarrinho = this.MeuCarrinho
let ExistsAtt = document.querySelector('.empty-cart-content[style="display: flex;"]');
if(window.location.href == "https://m3academy.myvtex.com/checkout/#/cart"){
if(!!ExistsAtt){
console.log(!!ExistsAtt,"empyt cart existe"); //true
MeuCarrinho.classList.add('hide');
target2.classList.add('hide');
Footer.classList.remove('footerCheckout__ComSlick');
}else{
console.log(!!ExistsAtt,"empyt cart não existe"); //false
MeuCarrinho.classList.remove('hide');
target2.classList.remove('hide');
Footer.classList.add('footerCheckout__ComSlick');
}
}
}
async 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 config = { childList: true, attributes: true };
let target2 = this.prateleira;
let Footer = this.Footer;
const MeuCarrinho = this.MeuCarrinho
let config = {
childList: false,
attributes: true,
attributeOldValue:true,
attributeFilter:["style"],
subtree:false,
characterData:true,
characterDataOldValue:true};
let observer = new MutationObserver((mutations) => {
mutations.forEach(function (mutation) {
console.log(mutation.type);
console.log("mutation is ->",mutation.type, mutation.attributeName,mutation.oldValue,mutation);
if(window.location.href == "https://m3academy.myvtex.com/checkout/#/cart"){
if(mutation.oldValue == "display: none;"){
console.log("entrei no if",mutation.oldValue)
MeuCarrinho.classList.add('hide');
target2.classList.add('hide')
Footer.classList.remove('footerCheckout__ComSlick')
}else{
console.log("entrei no else",mutation.oldValue)
MeuCarrinho.classList.remove('hide');
target2.classList.remove('hide')
Footer.classList.add('footerCheckout__ComSlick')
}
}
});
});
observer.observe(target, config);
}
async addCarrossel() {
const elemento = await waitElement("#my-element");
$(elemento).slick({
let target2 = this.prateleira;
let divRegua = this.Fds;
console.log(this.Fds)
divRegua.classList.add('Regua')
this.Footer.appendChild(divRegua)
target2.classList.add('hide')
this.prateleira.innerHTML =
`
<svg class="Fakebutton-Prev" width="14" height="30" viewBox="0 0 14 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M-1.85934e-05 14.6557L13.3144 29.4724L13.6447 27.1103L2.80736 14.6557L13.6447 2.36209L13.3144 -1.58741e-06L-1.85934e-05 14.6557Z" fill="#858585"/>
</svg>
<h2 class="SLick_title">Você também pode gostar:</h2>
<ul class="slick">
<li class="quadrado">
<img type="image"
src="https://agenciamagma.vteximg.com.br/arquivos/ids/164491/azul-1.jpg?v=637781133812700000"
alt="Sandália Azul Spike Amarração" placeholder="Imagem"
disabled
/>
<p>Sandália Azul Spike Amarração</p>
<div class="quadrado__btn">
<button>34</button>
<button>35</button>
<button>36</button>
<button>37</button>
<button>38</button>
<button class="cor">ROSA</button>
</div>
<button class="Ver__produto">Ver Produto</button>
</li>
<li class="quadrado">
<img type="image"
src="https://agenciamagma.vteximg.com.br/arquivos/ids/164493/roxo-1.jpg?v=637781136320600000"
alt="Sandália Roxo Spike Amarração" placeholder="Imagem"
disabled
/>
<p>Sandália Roxo Spike Amarração</p>
<div class="quadrado__btn">
<button>34</button>
<button>35</button>
<button>36</button>
<button>37</button>
<button>38</button>
</div>
<button class="Ver__produto" >Ver Produto</button>
</li>
<li class="quadrado">
<img type="image"
src="https://agenciamagma.vteximg.com.br/arquivos/ids/164495/verde-1.jpg?v=63778113885273000"
alt="Sandália Verde Spike Amarração" placeholder="Imagem"
disabled
/>
<p>Sandália Verde Spike Amarração</p>
<div class="quadrado__btn">
<button>34</button>
<button>35</button>
<button>36</button>
<button>37</button>
<button>38</button>
</div>
<button class="Ver__produto" >Ver Produto</button>
</li>
<li class="quadrado">
<img class="imago" type="image"
src="https://agenciamagma.vteximg.com.br/arquivos/ids/162369/Rectangle-64.png?v=637363001466570000"
alt="Jaqueta Masculina Thermoball Eco" placeholder="Imagem"
disabled
/>
<p>Jaqueta Masculina Thermoball Eco</p>
<div class="quadrado__btn">
<button class="verde">VERDE</button>
<button class="azul">AZUL</button>
<button class="jaq__azul">JAQUETA AZUL</button>
</div>
<button class="Ver__produto" >Ver Produto</button>
</li>
<li class="quadrado">
<img type="image"
src="https://agenciamagma.vteximg.com.br/arquivos/ids/165591/SANDALIA-AMARELA.png?v=63797"
alt="Sandália Amarela Spike Amarração" placeholder="Imagem"
disabled
/>
<p>Sandália Amarela Spike Amarração</p>
<div class="quadrado__btn">
<button class="numbers">34</button>
</div>
<button class="Ver__produto" >Ver Produto</button>
</li>
</ul>
<svg class="Fakebutton-Next" width="14" height="30" viewBox="0 0 14 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M13.6447 14.8168L0.33028 4.58192e-05L-5.61424e-07 2.36213L10.8373 14.8168L-6.44363e-06 27.1104L0.330273 29.4725L13.6447 14.8168Z" fill="#858585"/>
</svg>
`
$('.slick').slick({
infinite: true,
slidesToShow: 4,
slidesToScroll: 1,
});
variableWidth:false,
prevArrow: $(".Fakebutton-Prev"),
nextArrow: $(".Fakebutton-Next"),
responsive:[{
breakpoint: 1024,
settings: {
infinite: true,
slidesToShow: 2,
slidesToScroll: 1,
variableWidth:false,
prevArrow: $(".Fakebutton-Prev"),
nextArrow: $(".Fakebutton-Next"),
}
},
{
breakpoint: 1280,
settings: {
infinite: true,
slidesToShow: 3,
slidesToScroll: 1,
variableWidth:false,
prevArrow: $(".Fakebutton-Prev"),
nextArrow: $(".Fakebutton-Next"),
}
}],
});
}
}

View File

@ -4,18 +4,97 @@ import { waitElement } from "m3-utils";
export default class Header {
constructor() {
this.init();
console.log("header.js funcionando")
}
async init() {
await this.selectors();
window.addEventListener("hashchange", this.stepProgress.bind(this));
await this.event();
await this.progress();
console.log(this.item);
}
async selectors() {
this.item = await waitElement("#my-element", {
this.item = await waitElement("#progressBar", {
//#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.MeuCarrinho = await waitElement("#cart-title");
this.Finalizar_Pedido = await waitElement("#orderform-title");
this.step = document.querySelector('.completed');
this.prateleira = await waitElement(".footerCheckout__prateleira");
this.Footer = await waitElement(".footerCheckout");
this.pay__Wrapper = document.createElement("div");
}
async event(){
}
async progress(){
this.item.innerHTML =`
<ul class="stepProgressBar">
<li class="step">
<p class="step-text"> Meu Carrinho</p>
<div id="step_1" class="step-bullet
"></div>
</li>
<li class="step">
<p class="step-text">Dados Pessoais</p>
<div id="step_2" class="step-bullet"></div>
</li>
<li class="step">
<p class="step-text">Pagamento</p>
<div id="step_3" class="step-bullet completed"></div>
</li>
</ul>
`
await this.stepProgress();
}
async stepProgress(){
const progressList = document.querySelectorAll("#progressBar ul li")
const step1 = document.getElementById("step_1")
const step2 = document.getElementById("step_2")
const step3 = document.getElementById("step_3")
let target2 = this.prateleira;
let Footer = this.Footer;
const MeuCarrinho = this.MeuCarrinho
progressList.forEach((li) => {
if(window.location.href == "https://m3academy.myvtex.com/checkout/#/cart"){
MeuCarrinho.classList.remove('hide');
this.Finalizar_Pedido.classList.add('hide')
if(li.children[1].id === "step_1"){
step2.classList.remove('completed');
step3.classList.remove('completed');
li.children[1].classList.add('completed');
target2.classList.toggle('hide')
Footer.classList.add('footerCheckout__ComSlick')
}
}
if(window.location.href == "https://m3academy.myvtex.com/checkout/#/email"
|| window.location.href == "https://m3academy.myvtex.com/checkout/#/shipping"
|| window.location.href == "https://m3academy.myvtex.com/checkout/#/profile"){
MeuCarrinho.classList.add('hide');
this.Finalizar_Pedido.classList.remove('hide')
if(li.children[1].id === "step_2"){
step1.classList.remove('completed');
step3.classList.remove('completed');
li.children[1].classList.add('completed');
target2.classList.add('hide');
Footer.classList.remove('footerCheckout__ComSlick');
}
}
if(window.location.href =="https://m3academy.myvtex.com/checkout/#/payment"){
MeuCarrinho.classList.add('hide');
this.Finalizar_Pedido.classList.remove('hide')
if(li.children[1].id === "step_3"){
step1.classList.remove('completed');
step2.classList.remove('completed');
li.children[1].classList.add('completed');
target2.classList.add('hide');
Footer.classList.remove('footerCheckout__ComSlick');
}
}
})
}
}

View File

@ -0,0 +1,163 @@
import { waitElement } from "m3-utils";
export default class Footer {
constructor() {
this.init();
console.log("app.js funcionando")
}
async init() {
await this.selectors();
await this.event();
await this.TextTransfer();
}
async selectors() {
this.buttonText = await waitElement("#cart-choose-products", {
//#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.IconPayFot = await waitElement(".footerCheckout__payments", {
//#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.IconPayFotInfo = await waitElement(".footerCheckout__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.IconVtex = await waitElement(".footerCheckout__vtexpci", {
//#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.table = await waitElement(".cart-items", {
//#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.Footer = await waitElement(".footerCheckout__wrapper", {
//#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.tbody = await waitElement(".accordion-inner");
this.LapisAzul = await waitElement(".icon-edit");
this.btnCep = await waitElement("#shipping-calculate-link");
this.Dados_profile = document.querySelectorAll(".accordion-group")[1];
this.pay__Wrapper = document.createElement("div");
this.Finalizar_btn = document.createElement("button");
this.more = document.createElement("p");
this.wrapper = document.createElement("tr");
}
async event() {
this.btnCep.addEventListener("click",this.nonExist.bind(this))
}
async nonExist(){
this.cep = await waitElement('.ship-postalCode small a');
let ExistsAtt = this.cep
if(!!ExistsAtt){
this.cep.innerHTML =`
Não sei meu código postal
`
console.log(!!ExistsAtt,""); //true
}else{
console.log(!!ExistsAtt,"cep n existe"); //false
}
}
async TextTransfer(){
const dadosProfile =this.Dados_profile.children[0].children[0].children[1]
const tbodywrapper = this.wrapper;
const tbody = this.tbody.children[1].children[3];
const table = this.table.children[0].children[0].children[1];
const table_2 = this.table.children[0].children[0].children[2];
tbodywrapper.classList.add("flex")
tbodywrapper.appendChild(this.more)
tbodywrapper.appendChild(this.Finalizar_btn)
tbody.appendChild(tbodywrapper)
console.log(this.LapisAzul,"lapis azul")
const IconDev = document.querySelector(".footerCheckout__developedBy")
this.Finalizar_btn.innerHTML =`
FINALIZAR COMPRA
`
dadosProfile.innerHTML =`
Identificação
`
this.more.innerHTML =`
Escolher mais produtos
`
table.innerHTML=
`
Frete
`
table_2.innerHTML=
`
Unidade
`
IconDev.children[0].children[0].innerHTML=`
<span>Powered by</span>
<img class="VtexM3"
src="https://agenciamagma.vteximg.com.br/arquivos/logoVTEXM3Academy.png"
alt="M3 Academy"/>
`
IconDev.children[1].children[0].innerHTML=`
<span>Developed by</span>
<img class="VtexM3_2"
src="https://agenciamagma.vteximg.com.br/arquivos/logoM3M3Academy.png"
alt="M3 Academy"/>
`
this.IconVtex.innerHTML=`
<img
src="https://agenciamagma.vteximg.com.br/arquivos/vtex-pci-200.png"
alt="M3 Academy"/>
`
this.IconPayFot.innerHTML=`
<ol class="footerCheckout__payments__images">
<li id="img-1" class="images_pay-card">
<img
src="https://agenciamagma.vteximg.com.br/arquivos/Master.png"
alt="M3 Academy"/>
</li>
<li id="img-2" class="images_pay-card">
<img
src="https://agenciamagma.vteximg.com.br/arquivos/Visa.png"
alt="M3 Academy"/>
</li>
<li id="img-3" class="images_pay-card">
<img
src="https://agenciamagma.vteximg.com.br/arquivos/americanexpress.png"
alt="M3 Academy"/>
</li>
<li id="img-4" class="images_pay-card">
<img
src="https://agenciamagma.vteximg.com.br/arquivos/Elo.png"
alt="M3 Academy"/>
</li>
<li id="img-5" class="images_pay-card">
<img
src="https://agenciamagma.vteximg.com.br/arquivos/Hiper.png"
alt="M3 Academy"/>
</li>
<li id="img-6" class="images_pay-card">
<img
src="https://agenciamagma.vteximg.com.br/arquivos/paypal.png"
alt="M3 Academy"/>
</li>
<li id="img-7" class="images_pay-card">
<img
src="https://agenciamagma.vteximg.com.br/arquivos/Boleto.png"
alt="M3 Academy"/>
</li>
</ol>`
this.buttonText.innerHTML =`
CONTINUAR COMPRANDO
`
}
}

View File

@ -10,6 +10,7 @@ export default class HashRouter {
}
hashChange(e) {
console.log("mudou o hash")
const from = new URL(e.oldURL).hash || "/";
const to = new URL(e.newURL).hash || "/";

View File

@ -1,3 +1,12 @@
#orderform-title{
font-weight: 700 !important;
color: $color-black !important;
}
#btn-client-pre-email{
background: $color-blue-100 !important;
color: $color-black;
font-weight: 700 !important;
}
.checkout-container {
.client-pre-email {
border-color: $color-gray4;
@ -25,12 +34,27 @@
margin-bottom: 16px;
span {
color: #303030;
font-size: 24px;
color: $color-black;
font-family: $font-family-secundary;
font-style: normal;
font-weight: 400;
font-size: 20px;
line-height: 23px;
text-align: center;
text-transform: uppercase;
height: 22px;
}
small {
color: $color-gray4;
color: $color-black;
font-family: $font-family-secundary;
font-style: normal;
font-weight: 400;
font-size: 20px;
line-height: 23px;
text-align: center;
text-transform: uppercase;
height: 22px;
}
}
}
@ -90,10 +114,11 @@
li {
span {
color: $color-black;
font-weight: 700;
}
i::before {
color: $color-black;
color: $color-blue-100;
font-size: 1rem;
opacity: 1;
}

View File

@ -1,11 +1,53 @@
@import url("https://fonts.googleapis.com/css2?family=Tenor+Sans&display=swap");
.container {
@include mq(md, max) {
width: 100%;
}
}
.totalizers-list{
td{
height: 0;
}
}
.coupon{
&-fieldset{
div{
margin-top: 35px;
.coupon-label{
position: relative;
text-align: initial;
left: 47px;
}
#cart-coupon-add{
display: inline-flex;
align-items: center;
justify-content: center;
background: $color-blue-100;
color: $color-black;
letter-spacing: 0.05em;
text-transform: uppercase;
font-size: 14px;
line-height: 19px;
font-weight: 400;
font-family: $font-family;
}
.coupon-value{
width: 204px;
}
}
}
}
.cart-template {
font-family: $font-family;
.summary-template-holder{
div{
border: 0 !important;
@include mq(xll, max) {
width: 100%;
}
}
}
@include mq(md, max) {
padding: 0 0;
}
@ -17,6 +59,7 @@
box-sizing: border-box;
border-radius: 5px;
padding: 16px;
margin-top: 44px;
@include mq(md, max) {
margin: 0px 0 25px 0;
@ -24,6 +67,9 @@
border-right: none;
border-radius: 0;
}
@include mq(xll, max) {
margin: 30px 0 25px 0;
}
}
.cart-fixed.affix {
position: relative !important;
@ -111,12 +157,13 @@
}
th {
color: $color-black;
color: $color-black-100;
padding: 0 0 16px;
font-style: normal;
font-weight: bold;
font-weight: 400;
font-size: 14px;
line-height: 16px;
font-family: $font-family-secundary;
@include mq(md, max) {
&.quantity-price,
@ -155,12 +202,13 @@
}
a {
color: $color-blue;
color: $color-black;
font-style: normal;
font-weight: normal;
font-size: 12px;
line-height: 14px;
transition: ease-in 0.22s all;
font-family: $font-family-secundary;
&:hover {
color: darken($color-blue, 10);
@ -201,6 +249,7 @@
span.list-price {
color: $color-gray2;
font-weight: 400;
font-size: 12px;
line-height: 14px;
text-decoration-line: line-through;
@ -213,18 +262,19 @@
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;
max-height: 38px;
max-width: 118px;
max-width: 1018px;
padding: 0;
width: max-content !important;
@ -236,7 +286,7 @@
background-color: $color-white;
border: 1px solid $color-gray3;
border-radius: 0;
border-width: 0 1px;
border-width: 0;
display: block;
max-height: 38px;
margin: 0 !important;
@ -252,29 +302,41 @@
.icon-plus-sign,
.icon-minus-sign {
&::before {
&::after {
color: $color-black;
display: block;
font-weight: 500;
padding: 1px 12px;
padding: 5px 12px;
}
&::before{
background:$color-blue-100;
border-radius: 50%;
color: $color-white;
width: 16px;
height: 16px;
}
}
.icon-minus-sign {
&:before {
&::before{
content: "-";
font-size: 16px;
font-size: 14px;
width: 16px;
height: 16px;
}
}
.icon-plus-sign {
&:before {
&::before{
content: "+";
font-size: 14px;
width: 16px;
height: 16px;
}
}
.item-quantity-change {
width: 30px;
@media (max-width: 979px) and (min-width: 768px) {
position: inherit;
bottom: inherit;
@ -297,12 +359,17 @@
}
span {
font-style: normal;
font-weight: normal;
font-weight: bold;
font-size: 14px;
line-height: 16px;
color: $color-black;
}
}
.best-price{
span{
font-weight: 400 !important;
}
}
.quantity-price {
@include mq(md, max) {
@ -353,10 +420,10 @@
.srp-main-title {
margin: 32px 0 12px;
font-style: normal;
font-weight: normal;
font-weight: 400;
font-size: 24px;
line-height: 28px;
color: $color-gray2;
line-height: 33px;
color: $color-black;
@include mq(md, max) {
margin-top: 0;
@ -374,7 +441,7 @@
background-color: $color-gray5;
border: none;
border-radius: 5px;
color: $color-gray2;
color: $color-black;
font-size: 16px;
letter-spacing: 0.05em;
line-height: 19px;
@ -470,7 +537,6 @@
font-size: 12px;
line-height: 14px;
color: $color-black;
margin-bottom: 12px;
}
input {
@ -495,7 +561,7 @@
outline: none;
position: absolute;
right: -150px;
top: 36px;
top: 24px;
transition: all 0.2s linear;
width: 96px;
text-transform: uppercase;
@ -515,8 +581,7 @@
font-weight: normal;
font-size: 10px;
line-height: 12px;
color: $color-blue;
margin-top: 7px;
color: $color-black;
}
span.help.error {
@ -528,8 +593,15 @@
top: 17px;
}
}
&__form{
.ship-country{
display: none;
}
}
}
#cart-shipping-calculate{
background: $color-blue-100;
}
.srp-result {
strong,
.srp-items {
@ -595,17 +667,20 @@
width: 346px;
.coupon-data {
margin-top: 33px;
span{
color: $color-black !important;
}
#cart-link-coupon-add {
text-decoration: none;
&:hover {
text-decoration: underline;
cursor: pointer;
}
}
span {
font-family: $font-family;
font-style: normal;
font-weight: normal;
font-weight: 400;
font-size: 12px;
line-height: 14px;
color: $color-blue;
@ -734,11 +809,45 @@
td.info,
td.monetary {
font-style: normal;
font-weight: normal;
font-weight: bold;
font-size: 18px;
line-height: 21px;
color: $color-black;
}
button{
top: 121px;
width: 140%;
height: 42px;
background: $color-blue-100;
border-radius: 8px;
font-weight: 700;
line-height: 20px;
font-size: 14px;
letter-spacing: 0.05em;
font-family:$font-family;
margin-bottom: 44px;
border: 0;
@include mq(xll, max) {
height: 48px;
white-space: nowrap;
}
}
.flex{
display: flex;
flex-direction: column;
align-items: center;
flex-wrap: wrap;
p{
margin-bottom: 14px;
margin-top: 17px;
font-family: $font-family-secundary;
font-style: normal;
font-weight: 400 !important;
font-size: 12px;
line-height: 14px;
color:$color-black
}
}
}
}
}
@ -810,3 +919,11 @@
}
}
}
#find-pickup-link{
background: $color-blue-100 !important;
width: 280px;
height: 42px;
}
// #cart-shipping-calculate{
// top: 24px;
// }

View File

@ -9,3 +9,186 @@ body .container-main.container-order-form .orderform-template.active {
width: 66.1132%;
}
}
#is-corporate-client{
display: none;
}
#postalCode-finished-loading{
.shipping-method-toggle{
background: transparent !important;
border-radius: 16px !important;
border: 1px solid $color-black !important;
}
div{
background: transparent !important;
border-radius: 16px !important;
}
span{
color: $color-black;
text-shadow: none !important;
text-transform: uppercase;
}
}
#ship-number{
width: 296px;
height: 35px;
}
#ship-complement{
width: 296px;
height: 35px;
}
#ship-receiverName{
width: 296px;
height: 35px;
}
.ship-country{
display: none;
}
.input-small{
width: 142px !important;
height: 42px !important;
}
.box-client-info-pf{
.client-notice{
display: none;
}
label,span{
color: #7D7D7D !important;
font-family: $font-family;
font-style: normal;
font-weight: 400;
font-size: 14px;
line-height: 19px;
}
.help, .error{
color: red !important;
}
.input-xlarge{
width: 298px;
height: 42px;
}
}
.accordion-group{
width: 332px;
border-radius: 4px!important;
border: 1px solid $color-gray3;
border: 1px solid $color-gray6 !important;
.newsletter-text,
p,
label{
color: #7D7D7D !important;
}
input,
.cart{
border-radius: 4px!important;
border: 1px solid $color-gray6 !important;
}
div{
border-radius: 4px!important;
}
.vtex-omnishipping-1-x-deliveryGroup{
#delivery-packages-options{
border-radius: 8px!important;
border: 1px solid $color-gray6 !important;
path{
border: $color-gray3 !important;
fill: $color-blue-100;
}
}
}
.icon-user,
.icon-home,
.icon-credit-card{
display: none;
}
a{
background: transparent !important;
border: none !important;
box-shadow: none !important;
}
.icon-edit{
&::before{
content: "";
width: 20px !important;
height: 20px !important;
background-image: url(https://agenciamagma.vteximg.com.br/arquivos/lapisM3Academy.png);
background-size: 20px;
fill: transparent !important;
}
}
#go-to-shipping,
#btn-go-to-payment,
#go-to-payment{
width: 100% !important;
background: $color-blue-100 !important;
text-transform: uppercase !important;
height: 42px !important;
}
}
#payment-data-submit{
width: 100% !important;
background: $color-green_2 !important;
text-transform: uppercase !important;
height: 42px !important;
border-radius: 8px !important;
filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
}
#payment-data{
width: 719px !important;
#payment-group-custom204PaymentGroupPaymentGroup,
#payment-group-SPEIPaymentGroup,
#payment-group-MercadoPagoPaymentGroup,
#payment-group-custom201PaymentGroupPaymentGroup,
#payment-group-PSEPaymentGroup,
#payment-group-customPrivate_502PaymentGroup,
#payment-group-instantPaymentPaymentGroup,
#payment-group-custom203PaymentGroupPaymentGroup,
#payment-group-promissoryPaymentGroup,
#show-gift-card-group,
#payment-group-custom205PaymentGroupPaymentGroup,
#payment-group-creditDirectSalePaymentGroup{
display: none;
}
.form-step{
display: flex;
height: 452px;
}
.accordion-group{
width: 680px !important;
height: 452px !important;
}
// h3{
// display: block !important;
// }
span,
a{
width: 210px;
height: 50px;
}
a{
background: $color-gray3 !important;
border: 1px solid #58595B !important;
padding: 0;
margin-bottom: 12px;
border-radius: 4px;
color: #58595B;
text-align: center;
text-decoration: none;
&:hover{
border: 1px solid orangered !important;
color: orangered;
}
}
.payment-group-item-text{
background-image: none;
}
.steps-view{
position: absolute;
right: 0;
top: -2px;
}
}
.PaymentCardHolderDocument{
display: none !important;
}

View File

@ -1,22 +1,51 @@
#cart-choose-products{
width: 326px;
height: 48px;
border-radius: 0 !important;
display: grid;
align-content: center;
padding: 0 0 0 0;
@include mq(xll, max) {
width: 250px;
height: 48px;
}
}
.empty-cart {
font-family: $font-family;
&-content {
color: $color-black;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
color: $color-black;
text-align: center;
@include mq(md, max) {
padding: 0 16px;
}
p{
display: none;
}
}
&-title {
font-size: 20px;
font-size: 24px;
line-height: 33px;
text-align: center;
text-transform: uppercase;
@include mq(xll, max) {
font-size: 18px;
line-height: 25px;
white-space: nowrap;
}
}
&-links {
.link-choose-products {
background: $color-black;
border: none;
background: transparent;
border: 1px solid $color-black;
border-radius: 5px;
transition: ease-in 0.22s all;
outline: none;
@ -27,11 +56,12 @@
line-height: 16px;
text-align: center;
letter-spacing: 0.05em;
color: $color-white;
color: $color-black;
text-transform: uppercase;
&:hover {
background: lighten($color-black, 5);
color: $color-white;
}
}
}

View File

@ -49,7 +49,14 @@ body {
}
.container-order-form,
.container-cart {
width: 80%;
width: 86%;
}
.container-cart{
display: flex;
align-items: center;
align-content: center;
flex-wrap: wrap;
flex-direction: column-reverse
}
}
@ -65,7 +72,9 @@ body {
.emailInfo h3 {
color: $color-black !important;
}
.hide{
display: none !important;
}
#cart-title,
#orderform-title {
color: $color-gray2;
@ -81,6 +90,25 @@ body {
margin-left: 30px;
}
}
#cart-title{
position: absolute;
color:$color-black;
font-family: "Open Sans",sans-serif;
font-weight: 700;
font-size: 36px;
line-height: 42px;
margin: 16px 0 16px;
letter-spacing: .1em;
text-transform: uppercase;
top: 0;
left: 0;
letter-spacing: 0.05em;
@include mq(xll, max) {
font-size: 24px;
line-height: 33px;
white-space: nowrap;
}
}
.dropdown {
&__content {

View File

@ -1,12 +1,41 @@
@import url('https://fonts.googleapis.com/css2?family=Tenor+Sans&display=swap');
/* _footer.scss */
.footerCheckout {
border-top: none;
position: relative;
border-top: 1px solid;
color: $color-gray2;
margin-top: 100px;
&__ComSlick{
margin-top: 450px !important;
}
&__payments{
&__images{
list-style: none;
display: flex;
align-items: center;
.images_pay-card{
margin-right: 15px;
}
}
}
&__wrapper {
align-items: center;
display: flex;
justify-content: space-between;
position: relative;
width: 100% !important;
height: 70px;
display: inline-flex;
align-items: flex-end;
.container{
width: 100%;
display: flex;
align-items: baseline;
justify-content: space-between;
flex-direction: row;
position: relative;
@include mq(md, max) {
flex-direction: column-reverse;
}
}
}
&__address {
@ -23,6 +52,18 @@
margin-bottom: 24px;
max-width: 100%;
}
@include mq(xll, max) {
position: absolute;
top: 0;
margin: 16px 0 0 16px !important;
}
span{
@include mq(IVK, min) {
font-weight: 400;
font-size: 18px;
line-height: 25px;
}
}
}
&__stamps {
@ -35,6 +76,12 @@
align-self: center;
margin-bottom: 12px;
}
@include mq(xll, max) {
position: absolute;
bottom: 13px;
width: 100%;
right: 0;
}
&__divider {
background-color: $color-gray4;
@ -50,7 +97,28 @@
display: flex;
list-style-type: none;
margin: 0;
@include mq(xll, max) {
margin: 16px;
top: 41px;
position: absolute;
}
.VtexM3{
width: 44px;
height: 16px;
@include mq(IVK, min) {
width: 88px;
height: 30px;
}
}
.VtexM3_2{
width: 28px;
height: 16px;
@include mq(IVK, min) {
width: 56px;
height: 32px;
}
}
li:last-child {
margin-left: 16px;
}
@ -67,8 +135,153 @@
text-decoration: none;
span {
color: $color-black;
margin-right: 8px;
@include mq(IVK, min) {
font-weight: 400;
font-size: 18px;
line-height: 25px;
}
}
}
}
&__prateleira{
// background: gray;
position: absolute;
display: inline-flex;
width: 100% !important;
height: 390px;
// margin-bottom: 54px !important;
top: -505px;
align-items: center;
justify-content: center;
flex-direction: column;
.slick{
display: flex;
width: 100%;
height: 100%;
}
.SLick_title{
font-family: 'Tenor Sans', sans-serif;
color: $color-black;
margin-bottom: 20px;
@include mq(xll, max) {
font-size: 14px;
line-height: 28px;
}
}
.Fakebutton-Prev{
left: 161px;
top: 227px;
z-index: map-get($map:$z-index, $key: level5);
position: absolute;
@include mq(xll, max) {
left: 29px;
}
}
.Fakebutton-Next{
position: absolute;
display: inline;
right: 161px;
z-index: map-get($map:$z-index, $key: level5);
top: 227px;
@include mq(xll, max) {
right: 22px;
}
}
.quadrado{
display: flex !important;
justify-content: space-between;
align-items: center;
text-align: center;
width: 242px !important;
height: 390px;
margin-right: 16px;
background: transparent;
flex-direction: column;
&__btn{
button{
display: inline-flex;
align-items: center;
justify-content: center;
color: $color-white;
border-radius: 8px;
border: 0;
background-color: $color-blue-100;
text-align: center;
width: 26px;
height: 28px;
@include mq(xll, max) {
width: 16px ;
height: 18px;
border-radius: 4px;
}
}
.cor{
width: 54px !important;
height: 28px !important;
@include mq(xll, max) {
width: 46px ;
height: 28px;
}
}
.verde{
width: 54px !important;
height: 28px !important;
}
.azul{
width: 46px !important;
height: 28px !important;
}
.jaq__azul{
width: 112px !important;
height: 28px !important;
white-space: nowrap;
@include mq(xll, max) {
width: 164px ;
height: 42px;
}
}
}
.Ver__produto{
width: 100%;
height: 42px;
color: $color-white;
border-radius: 8px;
border: 0;
background-color: $color-blue-100;
@include mq(xll, max) {
width: 106px;
height: 42px;
}
}
.imago{
background: #eeeeee;
}
@include mq(xll, max) {
width: 112px !important;
height: 394px !important;
}
}
.slick-slide{
position: relative;
@include mq(xll, max) {
img{
width: 164px;
height: 164px;
}
}
}
.slick-list {
// width: 1016px;
// left: -49px;
position: absolute;
top: 0px;
left: 10.78125%;
width: 79.375%;
height: 466px !important;
}
}
}

View File

@ -1,7 +1,106 @@
@import url('https://fonts.googleapis.com/css2?family=Tenor+Sans&display=swap');
/* _header.scss */
.headerCheckout {
// position: relative;
@include mq(desc,max){
margin: 0 16px 0 16px;
width: 92% !important;
}
&::after{
content: '';
position: absolute;
right: 0;
width: 100%;
border-bottom: 1px solid $color-black;
}
.container {
margin: 30px 0 30px 0;
width: auto !important;
@include mq(desc,max){
margin: 16px 0 16px 0;
}
.progress-bar{
position: relative;
width:440px;
height: 35px;
.stepProgressBar{
position: absolute;
display: flex;
justify-content: space-between;
align-items: center;
align-content: center;
top: 0;
left: -28%;
&::after{
content: "";
position: absolute;
right: 179px;
bottom: 27px;
width: 68%;
border-bottom: 1px solid #000;
}
.step{
display: flex;
flex-direction: column;
align-items: center;
border: 0px;
margin-right: 140px;
&-text{
width: 100%;
height: 14px;
font-family: 'Tenor Sans', sans-serif;
font-weight: 400;
font-size: 12px;
line-height: 14px;
margin-bottom: 10px;
color: $color-black;
white-space: nowrap;
@include mq(IVK,min){
width: 100%;
height: 28px;
font-size: 24px;
line-height: 28px;
margin-bottom: 15px;
}
}
&-bullet{
height: 12px;
width: 12px;
border-radius: 50%;
border: 1px solid ;
background-color: white;
position: relative;
z-index: map-get($map:$z-index, $key: level1);
display: inline-block;
transition: background-color 500ms;
&.completed {
color: black;
background-color: $color-black;
}
@include mq(IVK,min){
height: 24px;
width: 24px;
}
}
}
}
@include mq(xll,max){
display: none;
}
@include mq(IVK,min){
width:1078px;
height: 68px;
.stepProgressBar{
left: -1%;
&::after{
content: "";
right: 216px;
bottom: 32px;
width: 68%;
}
}
}
}
}
&__wrapper {
align-items: center;
@ -13,10 +112,22 @@
img {
height: 52px;
width: auto;
@include mq(xll,max){
height: 33px;
width: 155px;
}
@include mq(IVK,min){
height: 91px;
width: 382px;
}
}
}
&__safeBuy {
display: flex;
img{
margin-right: 8px;
}
span {
align-items: center;
display: flex;
@ -32,5 +143,20 @@
i {
margin-right: 8px;
}
@include mq(desc,max){
height: 16px;
span{
font-weight: 400;
white-space: nowrap;
}
}
@include mq(IVK,min){
height: 42px;
width: 236px;
span{
font-size: 24px;
white-space: nowrap;
}
}
}
}

View File

@ -5,7 +5,8 @@ $font-family: "Open Sans", sans-serif;
$font-family-secundary:"Tenor Sans", sans-serif;
/* Colors */
$color-black: #292929;
$color-black: #000000;
$color-black-100: #292929;
$color-white: #fff;
@ -14,10 +15,13 @@ $color-gray2: #7d7d7d;
$color-gray3: #f0f0f0;
$color-gray4: #8d8d8d;
$color-gray5: #e5e5e5;
$color-gray6: #E0E0E0;
$color-blue: #4267b2;
$color-blue-100: #00C8FF;
$color-green: #4caf50;
$color-green_2: #035505;
/* Grid breakpoints */
$grid-breakpoints: (
@ -26,7 +30,10 @@ $grid-breakpoints: (
sm: 576px,
md: 768px,
lg: 992px,
xl: 1200px
xl: 1200px,
xll:1280px,
desc: 1280px,
IVK : 2500px
) !default;
$z-index: (

View File

@ -1,20 +1,24 @@
<!-- Esse arquivo é só um demonstrativo de como está o html do header do checkout atualmente,
MODIFICA-LO NÃO CAUSARÁ EFEITO ALGUM, todo html que for modificado no header, deverá ser feito através de javaScript. -->
<header class="headerCheckout">
<div class="container">
<div class="headerCheckout__wrapper">
<div class="headerCheckout__logo">
<a href="/">
<img src="https://agenciamagma.vteximg.com.br/arquivos/LogoM3Academy.png" alt="M3 Academy"/>
</a>
</div>
<div id="progressBar" class="progress-bar"> Aqui entra a barra de progresso
</div>
<div class="headerCheckout__safeBuy">
<img src="https://agenciamagma.vteximg.com.br/arquivos/cadeadoCompraSegM3Academy.png" alt="Cadeado"/>
<span>Compra segura</span>
</div>
<header class="headerCheckout">
<div class="container">
<div class="headerCheckout__wrapper">
<div class="headerCheckout__logo">
<a href="/">
<img
src="https://agenciamagma.vteximg.com.br/arquivos/LogoM3Academy.png"
alt="M3 Academy"/>
</a>
</div>
<div id="progressBar" class="progress-bar"> Aqui entra a barra de
progresso
</div>
<div class="headerCheckout__safeBuy">
<img
src="https://agenciamagma.vteximg.com.br/arquivos/cadeadoCompraSegM3Academy.png"
alt="Cadeado"/>
<span>Compra segura</span>
</div>
</div>
</header>
</div>
</header>