feature/optimization #1

Merged
josecarloslins merged 16 commits from feature/optimization into main 2022-12-17 01:38:19 +00:00
14 changed files with 13702 additions and 11448 deletions

10970
checkout/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,3 @@
import { waitElement } from "m3-utils";
export default class Footer {
constructor() {
this.init();
@ -7,34 +5,148 @@ export default class Footer {
async init() {
await this.selectors();
// this.onUpdate();
await this.addHTMLFooter();
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 = document.querySelector(".empty-cart-content");
this.checkoutPayments = document.querySelector(".footerCheckout__stamps");
this.developBy = document.querySelector(".footerCheckout__developedBy");
this.titleMyCart = document.querySelector("#cart-title");
this.pratileira = document.querySelector(".footerCheckout__prateleira");
}
onUpdate() {
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 titleCart = this.titleMyCart;
let pratileira = this.pratileira;
let config = { attributes: true };
if (window.location.href != "https://m3academy.myvtex.com/checkout/#/cart") {
pratileira.classList.add("elementInvisible");
} else {
pratileira.classList.remove("elementInvisible");
}
window.addEventListener("hashchange", () => {
if (window.location.hash == "#/cart" && target.style.display === "block") {
this.pratileira.classList.add("elementInvisible");
titleCart.classList.add("elementInvisible");
this.api();
} else if (window.location.hash != "#/cart") {
pratileira.classList.add("elementInvisible");
} else {
pratileira.classList.remove("elementInvisible");
}
});
let observer = new MutationObserver((mutations) => {
mutations.forEach(function (mutation) {
console.log(mutation.type);
mutations.forEach((mutation) => {
if (
target.style.display === "block" ||
window.location.href != "https://m3academy.myvtex.com/checkout/#/cart"
) {
titleCart.classList.add("elementInvisible");
pratileira.classList.add("elementInvisible");
} else {
titleCart.classList.remove("elementInvisible");
pratileira.classList.remove("elementInvisible");
this.api();
}
});
});
observer.observe(target, config);
}
async addCarrossel() {
const elemento = await waitElement("#my-element");
$(elemento).slick({
slidesToShow: 4,
slidesToScroll: 1,
});
const elemento = document.querySelector(".sliderPratileira");
if (window.screen.width > 1024) {
$(elemento).slick({
slidesToShow: 4,
slidesToScroll: 1,
infinite: true,
arrows: true,
});
} else if (window.screen.width < 640) {
$(elemento).slick({
slidesToShow: 2,
slidesToScroll: 1,
infinite: true,
arrows: true,
});
} else {
$(elemento).slick({
slidesToShow: 3,
slidesToScroll: 1,
infinite: true,
arrows: true,
});
}
}
async api() {
const url =
"https://m3academy.myvtex.com/api/catalog_system/pub/products/search/?fq=productClusterIds:319";
const dados = await fetch(url);
const dataApi = await dados.json();
this.pratileira.innerHTML = `
<p class="titlePratileira">Você também pode gostar</p>
<ul class="sliderPratileira">
${dataApi.map((dataItem) => {
return `<li class="card-list-pratileira">
<figure>
<img class="image-card-pratileira" src="${
dataItem.items[0].images[0].imageUrl
}" alt="${dataItem.productName}" />
<h4 class="title-item-pratileira">${dataItem.productName}</h4>
</figure>
<ol class="wrapper-list-variables">
${dataItem.items
.map((variableItem) => {
return `<li class="variable-pratileira">${variableItem.name}</li>`;
})
.join("")}
</ol>
<button class="btn-pratileira">Ver Produto</button>
</li>`;
})}
</ul>
`;
this.addCarrossel();
}
async addHTMLFooter() {
this.checkoutPayments.children[0].innerHTML = `
<div class="footerCheckout__payments">
<img class="paymentFooter" src="https://agenciamagma.vteximg.com.br/arquivos/masterCardM3Academy.png" alt="Logo Master Card" />
<img class="paymentFooter" src="https://agenciamagma.vteximg.com.br/arquivos/visaM3Academy.png" alt="Logo Visa" />
<img class="paymentFooter" src="https://agenciamagma.vteximg.com.br/arquivos/amexM3Academy.png" alt="Logo American Express" />
<img class="paymentFooter" src="https://agenciamagma.vteximg.com.br/arquivos/eloM3Academy.png" alt="Logo Elo" />
<img class="paymentFooter" src="https://agenciamagma.vteximg.com.br/arquivos/hipercardM3Academy.png" alt="Logo HiperCard" />
<img class="paymentFooter" src="https://agenciamagma.vteximg.com.br/arquivos/payPalM3Academy.png" alt="Logo PayPal" />
<img class="paymentFooter" src="https://agenciamagma.vteximg.com.br/arquivos/boletoM3Academy.png" alt="Logo Boleto" />
</div>
`;
this.checkoutPayments.children[2].innerHTML = `
<div class="footerCheckout__payments">
<img class="vtexIcon" src="https://agenciamagma.vteximg.com.br/arquivos/vtexPCIM3Academy.png" alt="Logo VTEX PCI Certificado" />
</div>
`;
this.developBy.children[0].children[0].innerHTML = `
<span>Powered by</span><img class="logoVtexFooter" src="https://agenciamagma.vteximg.com.br/arquivos/logoVTEXM3Academy.png" alt="Logo VTEX" />
`;
this.developBy.children[1].children[0].innerHTML = `
<span>Developed by</span><img class="logoM3Footer" src="https://agenciamagma.vteximg.com.br/arquivos/logoM3M3Academy.png" alt="Logo M3" />
`;
}
}

View File

@ -6,16 +6,125 @@ export default class Header {
this.init();
}
async init() {
await this.selectors();
console.log(this.item);
async selectors() {
this.progressBar = await waitElement("#progressBar");
}
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
});
async init() {
await this.selectors();
this.progressBarHTML();
await this.progressBarDots();
}
progressBarHTML() {
if (this.progressBar && window.screen.width > 1024) {
this.progressBar.innerHTML = `<ol class="ProgressBar">
<li class="ProgressBar-step stepOne">
<span class="step-1">Meu Carrinho</span>
</li>
<li class="ProgressBar-step stepTwo">
<span class="step-2">Dados Pessoais</span>
</li>
<li class="ProgressBar-step stepThree">
<span class="step-3">Pagamento</span>
</li>
</ol>
`;
} else {
this.progressBar.innerHTML = "";
}
}
async progressBarDots() {
if (this.progressBar && window.screen.width > 1024) {
const progressBarList = document.querySelectorAll("#progressBar ol li");
progressBarList.forEach((li) => {
if (window.location.href === "https://m3academy.myvtex.com/checkout/#/cart") {
if (li.children[0].classList.contains("step-1")) {
li.children[0].classList.add("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].classList.contains("step-2")) {
li.children[0].classList.add("active");
}
} else if (
window.location.href === "https://m3academy.myvtex.com/checkout/#/payment"
) {
if (li.children[0].classList.contains("step-3")) {
li.children[0].classList.add("active");
}
}
window.addEventListener("hashchange", () => {
if (window.location.hash == "#/cart") {
if (
li.children[0].classList.contains("step-1") &&
!li.children[0].classList.contains("active")
) {
li.children[0].classList.add("active");
}
if (
li.children[0].classList.contains("step-2") &&
li.children[0].classList.contains("active")
) {
li.children[0].classList.remove("active");
}
if (
li.children[0].classList.contains("step-3") &&
li.children[0].classList.contains("active")
) {
li.children[0].classList.remove("active");
}
} else if (
window.location.hash == "#/email" ||
window.location.hash == "#/profile" ||
window.location.hash == "#/shipping"
) {
if (
li.children[0].classList.contains("step-2") &&
!li.children[0].classList.contains("active")
) {
li.children[0].classList.add("active");
}
if (
li.children[0].classList.contains("step-1") &&
li.children[0].classList.contains("active")
) {
li.children[0].classList.remove("active");
}
if (
li.children[0].classList.contains("step-3") &&
li.children[0].classList.contains("active")
) {
li.children[0].classList.remove("active");
}
} else if (window.location.hash == "#/payment") {
if (
li.children[0].classList.contains("step-3") &&
!li.children[0].classList.contains("active")
) {
li.children[0].classList.add("active");
}
if (
li.children[0].classList.contains("step-1") &&
li.children[0].classList.contains("active")
) {
li.children[0].classList.remove("active");
}
if (
li.children[0].classList.contains("step-2") &&
li.children[0].classList.contains("active")
) {
li.children[0].classList.remove("active");
}
}
});
});
}
}
}

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,147 @@ body .container-main.container-order-form .orderform-template.active {
margin-left: unset;
margin-right: 0;
float: right;
@media (max-width: 1024px) {
width: 100%;
.cart-fixed {
margin: 0 16px 0;
width: auto;
height: auto !important;
margin-bottom: 100px;
}
.cart-fixed.cart-fixed-transition.affix-top {
margin: 0 16px 0;
height: auto !important;
margin-bottom: 100px;
}
}
}
.orderform-template-holder {
width: 66.1132%;
margin-top: 0;
@media (max-width: 1024px) {
width: 100%;
.row-fluid .span6 {
width: 100%;
}
}
@media (min-width: 2500px) {
margin-bottom: 92px;
}
}
}
.cart-template.mini-cart.span4
.cart-fixed
.summary-template-holder
.row-fluid
.summary-totalizers
div
.accordion-group
.accordion-body
.accordion-inner
table {
.totalizers-list tr {
border-top: 1px solid #e0e0e0;
.monetary,
.info {
font-family: $font-family;
font-style: normal;
font-weight: 400;
font-size: 14px;
line-height: 19px;
color: $color-gray2;
padding: 25px 0;
box-sizing: border-box;
@media (min-width: 2500px) {
font-size: 28px;
line-height: 38px;
}
}
.monetary {
padding-right: 17px;
}
.info {
padding-left: 17px;
}
}
tfoot tr {
border-top: 1px solid #e0e0e0;
td {
padding: 30px 0 22px;
}
.info,
.monetary {
font-family: $font-family;
font-style: normal;
font-weight: 700;
color: $color-black;
box-sizing: border-box;
}
.info {
font-size: 18px;
line-height: 25px;
padding-left: 17px;
}
.monetary {
font-size: 14px;
line-height: 19px;
padding-right: 17px;
}
@media screen and (min-width: 2500px) {
.info {
font-size: 36px;
line-height: 49px;
}
.monetary {
font-size: 28px;
line-height: 38px;
}
}
}
}
.cart-template.mini-cart.span4 .cart-fixed .payment-confirmation-wrap {
padding: 0;
border-top: none;
.payment-submit-wrap {
margin: 0;
#payment-data-submit {
margin-top: 20px;
padding: 12px 0 11px;
font-family: $font-family;
font-style: normal;
font-weight: 700;
font-size: 14px;
line-height: 19px;
text-align: center;
letter-spacing: 0.05em;
text-transform: uppercase;
color: $color-white;
border-radius: 8px;
background: #298541;
i {
display: none;
}
@media screen and (min-width: 2500px) {
font-size: 28px;
line-height: 38px;
}
}
}
}

View File

@ -1,38 +1,105 @@
.empty-cart {
font-family: $font-family;
&-content {
color: $color-black;
text-align: center;
&-content {
color: $color-black-neutra;
text-align: center;
margin: 170px 0 262px 0;
width: 100%;
@include mq(md, max) {
padding: 0 16px;
}
}
@include mq(md, max) {
padding: 0 16px 262px;
margin-bottom: 0;
}
}
&-title {
font-size: 20px;
}
&-title {
font-size: 0;
margin: 0;
line-height: 0;
&::before {
content: "Seu carrinho está vazio.";
font-family: "Open Sans";
font-style: normal;
font-weight: 700;
font-size: 24px;
line-height: 33px;
text-transform: uppercase;
&-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;
@media screen and (min-width: 2500px) {
font-size: 48px;
line-height: 65px;
}
}
&:hover {
background: lighten($color-black, 5);
}
}
}
@media (max-width: 1024px) {
&::before {
font-size: 18px;
line-height: 25px;
}
}
}
&-links {
.link-choose-products {
font-size: 0;
background: $color-white;
border: 1px solid $color-black-neutra;
transition: ease-in 0.22s all;
border-radius: 0;
box-sizing: border-box;
height: 48px;
margin: 32px 0 0 0;
padding: 16px 64px;
&::before {
content: "Continuar comprando";
font-family: "Tenor Sans";
font-style: normal;
font-weight: 400;
font-size: 14px;
line-height: 16px;
text-align: center;
text-transform: uppercase;
color: $color-black-neutra;
}
&:hover {
background: $color-white;
}
@media (max-width: 1024px) {
width: max-content;
padding: 16px 26px;
margin-top: 22px;
}
@media screen and (min-width: 2500px) {
height: 66px;
padding: 16px 121px;
&::before {
font-size: 28px;
line-height: 33px;
}
}
}
}
}
.empty-cart-message,
.transactions-container {
display: none !important;
}
.cart-template {
margin: 0 !important;
}
.elementInvisible {
display: none !important;
}
@media screen and (max-width: 1024px) {
.link-choose-products .link-choose-products {
padding: 16px 26px;
width: max-content;
}
}

View File

@ -3,19 +3,24 @@
@import "./checkout-pagamento";
@import "./checkout-autenticacao";
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
height: 100%;
min-height: 100%;
}
footer .footerCheckout__wrapper {
width: 94.9734%;
margin: auto auto 0 auto;
border-top: 1px solid #000000;
}
footer .footerCheckout__prateleira,
header {
width: 79.53125%;
margin: 0 auto;
width: 100%;
border-bottom: 1px solid #000000;
}
body {
@ -24,32 +29,23 @@ body {
min-height: 100% !important;
padding-top: 0 !important;
@include mq(md, max) {
padding-left: 0;
}
&.body-cart {
font-family: $font-family;
}
&.body-cart,
&.body-order-form {
@include mq(xl, min) {
padding-top: 0;
}
@include mq(lg, max) {
padding-bottom: 0 !important;
}
@include mq(md, max) {
padding-right: 0;
padding-left: 0;
}
}
.container-order-form,
.container-cart {
width: 80%;
@media screen and (max-width: 1024px) {
width: 100%;
}
}
@media screen and (max-width: 1024px) {
width: 100%;
padding: 0;
margin: 0;
}
}
@ -63,22 +59,31 @@ body {
}
.emailInfo h3 {
color: $color-black !important;
color: $color-black;
}
#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 17px;
letter-spacing: 0.05em;
text-transform: uppercase;
@include mq(md, max) {
margin-left: 30px;
@media screen and (max-width: 1024px) {
padding: 0 16px;
}
@media screen and (max-width: 300px) {
font-size: 22px;
}
@media screen and (min-width: 2500px) {
font-size: 48px;
line-height: 65px;
}
}

View File

@ -99,16 +99,39 @@
.slick-arrow {
font-size: 0;
position: absolute;
border: 0;
width: 13.64px;
height: 29.47px;
}
.slick-prev {
background: url("https://agenciamagma.vteximg.com.br/arquivos/arrow-left-mini-M3Academy.svg")
no-repeat center center;
z-index: 4;
left: 10px;
left: 20px;
}
.slick-next {
background: url("https://agenciamagma.vteximg.com.br/arquivos/arrow-right-mini-M3Academy.svg")
no-repeat center center;
z-index: 4;
right: 10px;
right: 20px;
}
@media (max-width: 1024px) {
.slick-next {
right: 27px;
}
.slick-prev {
left: 29px;
}
}
@media (max-width: 480px) {
.slick-next {
right: 14px;
}
.slick-prev {
left: 21px;
}
}
.slick-arrow.slick-hidden {
display: none;
@ -134,3 +157,18 @@
}
}
}
@media screen and (min-width: 2500px) {
.slick-arrow {
width: 26px;
height: 58px;
}
.slick-prev {
background: url("https://agenciamagma.vteximg.com.br/arquivos/arrow-left-M3Academy.svg")
no-repeat center center;
}
.slick-next {
background: url("https://agenciamagma.vteximg.com.br/arquivos/arrow-right-M3Academy.svg")
no-repeat center center;
}
}

View File

@ -1,27 +1,60 @@
/* _footer.scss */
.footerCheckout {
border-top: none;
color: $color-gray2;
&__wrapper {
align-items: center;
display: flex;
justify-content: space-between;
margin: 0;
.container {
display: flex;
justify-content: space-between;
align-items: center;
width: 94.9734%;
margin: auto auto 0 auto;
padding: 16px 0 !important;
&::before,
&::after {
display: none;
}
@media (max-width: 1024px) {
display: grid;
grid-template-areas:
"stamps"
"address"
"develop";
width: 100%;
gap: 16px;
}
@media (max-width: 360px) {
padding-right: 16px !important;
}
}
}
&__address {
color: $color-gray2;
color: $color-black;
font-family: $font-family;
font-style: normal;
font-weight: normal;
font-weight: 400;
font-size: 10px;
line-height: 12px;
line-height: 13.62px;
text-transform: capitalize;
max-width: 40%;
@include mq(md, max) {
margin-bottom: 24px;
@media (max-width: 1024px) {
max-width: 100%;
margin-left: 16px;
}
@media screen and (min-width: 2500px) {
font-size: 20px;
line-height: 27px;
}
}
@ -30,17 +63,117 @@
display: flex;
justify-self: center;
list-style: none;
margin: 0;
width: 33.2329%;
@include mq(md, max) {
align-self: center;
margin-bottom: 12px;
li:first-child {
width: 80.067%;
div.footerCheckout__payments {
display: flex;
height: auto;
gap: 4.0154%;
img.paymentFooter {
min-width: 10.4683%;
height: auto;
}
}
}
li:nth-child(2) {
margin: 0 10px;
}
li:last-child {
width: 13.12%;
div.footerCheckout__payments {
display: flex;
width: 100%;
justify-content: flex-start;
img.vtexIcon {
min-width: 74.8814%;
height: auto;
}
}
}
@media (max-width: 1024px) {
grid-area: stamps;
margin: 0 0 0 8px;
justify-self: auto;
width: max-content;
li:first-child {
width: auto;
div.footerCheckout__payments {
gap: 10px;
img.paymentFooter {
min-width: 35px;
height: 20px;
}
}
}
li:last-child {
width: auto;
div.footerCheckout__payments {
img.vtexIcon {
width: 53px;
height: 33px;
}
}
}
}
@media (max-width: 640px) {
li:first-child {
width: max-content;
div.footerCheckout__payments {
gap: 4px;
}
}
li:nth-child(2) {
margin: 0 10px 0 4px;
}
li:last-child {
width: max-content;
}
}
@media (max-width: 350px) {
display: block;
li:first-child {
width: max-content;
div.footerCheckout__payments {
gap: 4px;
}
}
li:nth-child(2) {
display: none;
}
li:last-child {
margin-top: 16px;
width: max-content;
}
}
&__divider {
background-color: $color-gray4;
display: inline-block;
display: block;
align-items: center;
height: 24px;
margin: 0 8px;
width: 1px;
}
}
@ -50,24 +183,373 @@
display: flex;
list-style-type: none;
margin: 0;
width: 17.8453%;
gap: 11px;
li:first-child {
width: 48.6151%;
display: flex;
a {
.logoVtexFooter {
min-width: 29.8571%;
height: auto;
}
}
}
li:last-child {
margin-left: 16px;
display: flex;
width: 44.4541%;
a {
.logoM3Footer {
min-width: 29.1684%;
height: auto;
}
}
}
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-weight: 400;
font-size: 9px;
line-height: 12px;
text-decoration: none;
span {
margin-right: 8px;
margin-right: 11px;
white-space: nowrap;
}
}
@media screen and (min-width: 2500px) {
width: 16.3437%;
white-space: nowrap;
li:first-child {
width: 50.6151%;
display: flex;
a {
.logoVtexFooter {
min-width: 29.8571%;
height: auto;
}
}
}
li:last-child {
display: flex;
width: 46.4541%;
a {
.logoM3Footer {
min-width: 29.1684%;
height: auto;
}
}
}
a {
font-size: 18px;
line-height: 24px;
}
}
@media (max-width: 1024px) {
margin-left: 16px;
width: max-content;
li:first-child {
width: max-content;
a {
.logoVtexFooter {
min-width: 45px;
height: 16px;
}
}
}
li:last-child {
width: max-content;
margin-left: 11px;
a {
.logoM3Footer {
min-width: 29px;
height: 16px;
}
}
}
}
}
&__prateleira {
padding-bottom: 56px;
.titlePratileira {
font-family: $font-family-secundary;
font-weight: 400;
font-style: normal;
font-weight: 400;
font-size: 24px;
line-height: 38px;
text-align: center;
color: $color-black-neutra;
margin-bottom: 20px;
@media (max-width: 440px) {
font-size: 14px;
line-height: 28px;
}
}
.sliderPratileira {
width: 80%;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto;
.card-list-pratileira {
list-style-type: none;
width: 242px;
height: max-content;
display: flex;
align-items: center;
flex-direction: column;
@media (min-width: 1280px) and (max-width: 1281px) {
width: 242px !important;
}
figure {
width: 100%;
margin: 0;
.image-card-pratileira {
width: 100%;
height: 242px;
}
.title-item-pratileira {
font-family: $font-family;
font-style: normal;
font-weight: 400;
font-size: 13px;
line-height: 18px;
height: 18px;
text-align: center;
color: $color-black-neutra;
margin: 20px 0;
overflow-y: scroll;
word-wrap: break-word;
@media (max-width: 640px) {
height: 36px;
word-wrap: normal;
}
}
}
.wrapper-list-variables {
list-style-type: none;
display: flex;
justify-content: center;
margin: 0;
margin-bottom: 20px;
.variable-pratileira {
padding: 5px;
margin-right: 5px;
background: $color-blue-light;
border-radius: 8px;
color: $color-white;
font-family: $font-family;
font-style: normal;
font-weight: 700;
font-size: 13px;
line-height: 18px;
letter-spacing: 0.05em;
text-transform: uppercase;
overflow-y: scroll;
word-wrap: break-word;
max-height: 28px;
min-width: 2.2ch;
&::-webkit-scrollbar {
display: none;
}
}
}
.btn-pratileira {
width: 100%;
background: $color-blue-light;
border: 0;
border-radius: 8px;
padding: 12px 0;
font-family: $font-family;
font-style: normal;
font-weight: 700;
font-size: 13px;
line-height: 18px;
text-align: center;
letter-spacing: 0.05em;
text-transform: uppercase;
color: $color-white;
}
}
font-size: 0;
@media (min-width: 1025px) and (max-width: 1220px) {
.card-list-pratileira {
.wrapper-list-variables {
width: 100%;
height: 61px;
display: inline-block;
text-align: center;
.variable-pratileira {
display: inherit;
word-wrap: normal;
max-height: auto;
min-width: max-content;
}
}
}
}
@media (max-width: 1024px) {
width: 100%;
padding: 0 8px;
.slick-track {
gap: 15px;
}
.card-list-pratileira {
figure {
.image-card-pratileira {
width: 100%;
height: 320px;
}
}
}
}
@media (max-width: 640px) {
.slick-track {
gap: 16px;
}
.card-list-pratileira {
.wrapper-list-variables {
width: 100%;
height: 61px;
display: inline-block;
text-align: center;
@media (max-width: 300px) {
height: 100px;
}
.variable-pratileira {
display: inherit;
word-wrap: normal;
max-height: auto;
min-width: max-content;
}
}
figure {
.image-card-pratileira {
height: 295px;
}
}
}
}
@media (max-width: 480px) {
padding: 0 16px;
.card-list-pratileira {
@media (min-width: 375px) and (max-width: 376px) {
width: 164px !important;
}
figure {
.image-card-pratileira {
height: 164px;
@media (max-width: 300px) {
height: 100px;
}
}
}
}
}
@media (max-width: 340px) {
padding: 0 8px;
}
}
.slick-track {
display: flex;
gap: 16px;
justify-content: center;
left: -0.2%;
@media (min-width: 375px) and (max-width: 376px) {
left: 7%;
}
}
@media screen and (min-width: 2500px) {
.titlePratileira {
font-size: 48px;
line-height: 76px;
}
.sliderPratileira {
.card-list-pratileira {
@media (min-width: 2500px) and (max-width: 2501px) {
width: 485px !important;
}
figure {
.image-card-pratileira {
height: 485px;
}
.title-item-pratileira {
font-size: 26px;
line-height: 35px;
height: 35px;
}
}
.wrapper-list-variables {
.variable-pratileira {
font-size: 26px;
line-height: 35px;
max-height: 45px;
}
}
.btn-pratileira {
font-size: 26px;
line-height: 35px;
}
}
}
}
}

View File

@ -1,22 +1,98 @@
/* _header.scss */
.headerCheckout {
.container {
width: auto !important;
width: 79.53125%;
display: flex;
align-items: center;
}
&__wrapper {
width: 100%;
align-items: center;
display: flex;
justify-content: space-between;
padding: 29px 0;
#progressBar {
width: 439px;
position: relative;
}
.ProgressBar {
width: 100%;
display: grid;
grid-template-columns: 1fr max-content 1fr;
margin: 0;
&::after {
content: "";
position: absolute;
width: 81%;
height: 1px;
background-color: #000000;
top: 29px;
left: 51%;
transform: translate(-50%, -50%);
z-index: -1;
}
.ProgressBar-step {
list-style: none;
position: relative;
&:first-child::after {
content: none;
}
span {
display: grid;
grid-template-areas:
"texto"
"dot";
width: max-content;
white-space: nowrap;
font-family: "Tenor Sans";
font-style: normal;
font-weight: 400;
font-size: 12px;
line-height: 14px;
&::before {
grid-area: dot;
justify-self: center;
content: "";
width: 12px;
height: 12px;
border: 1px solid #000000;
border-radius: 100%;
display: block;
background-color: #ffffff;
margin-top: 9px;
box-sizing: border-box;
}
}
.active {
&::before {
background-color: #000000;
}
}
}
.stepThree {
justify-self: end;
}
}
}
&__logo {
width: 15.2829%;
img {
height: 52px;
width: auto;
width: 100%;
}
}
&__safeBuy {
display: flex;
align-items: center;
span {
align-items: center;
display: flex;
@ -26,11 +102,105 @@
font-weight: normal;
font-size: 12px;
line-height: 14px;
color: $color-gray;
color: $color-black;
}
i {
img {
width: 10.1694%;
margin-right: 8px;
}
}
}
@media screen and (max-width: 1024px) {
.headerCheckout {
box-sizing: border-box;
.container {
width: 100%;
padding: 0 16px !important;
box-sizing: border-box;
}
.headerCheckout__safeBuy {
white-space: nowrap;
img {
width: 12px;
height: 13.33px;
}
}
&__wrapper {
padding: 16px 0;
#progressBar {
display: none;
}
}
&__logo {
width: 155.58px;
img {
width: 100%;
}
}
}
}
@media screen and (min-width: 2500px) {
.headerCheckout {
&__wrapper {
#progressBar {
width: 1078px;
}
}
&__logo {
width: 19.2152%;
img {
width: 100%;
}
}
.ProgressBar {
&::after {
width: 86%;
height: 1px;
top: 49px;
left: 51%;
}
.ProgressBar-step {
span {
width: max-content;
font-size: 24px;
line-height: 28px;
&::before {
width: 24px;
height: 24px;
border: 1px solid #000000;
margin-top: 9px;
}
}
}
}
&__safeBuy {
span {
font-size: 24px;
line-height: 32px;
white-space: nowrap;
}
img {
min-width: 12.6637%;
margin-right: 8px;
@media screen and (min-width: 2500px) and (max-width: 2501px) {
height: 41px;
}
}
}
}
}

View File

@ -2,37 +2,38 @@
@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;
$color-black-neutra: #000000;
$color-white: #fff;
$color-white: #ffffff;
$color-gray: #6c6c6c;
$color-gray2: #7d7d7d;
$color-gray3: #f0f0f0;
$color-gray4: #8d8d8d;
$color-gray5: #e5e5e5;
$color-gray6: #989898;
$color-gray7: #c4c4c4;
$color-blue: #4267b2;
$color-blue-light: #00c8ff;
$color-green: #4caf50;
/* Grid breakpoints */
$grid-breakpoints: (
xs: 0,
cstm: 400,
sm: 576px,
md: 768px,
lg: 992px,
xl: 1200px
sm: 375px,
md: 1024px,
// lg: 992px,
// xl: 1200px,,
) !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"
}

9828
yarn.lock Normal file

File diff suppressed because it is too large Load Diff