develop #1

Merged
matheusbrollodauter merged 25 commits from develop into main 2022-12-19 02:35:49 +00:00
13 changed files with 10621 additions and 476 deletions

View File

@ -1,3 +1,4 @@
import { data } from "jquery";
import { waitElement } from "m3-utils";
export default class Footer {
@ -7,13 +8,180 @@ export default class Footer {
async init() {
await this.selectors();
// this.onUpdate();
this.createPaymentsIcons();
this.createVtexpciIcon();
this.createDevIcons();
this.onUpdate();
this.events();
}
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.cartTitulo = await waitElement("#cart-title");
this.titleSlick = await waitElement(".transactions-container");
this.list = await waitElement(".footerCheckout__prateleira", {
timeout: 5000,
interval: 1000,
});
this.payments = await waitElement(".footerCheckout__payments");
this.vtexpci = await waitElement(".footerCheckout__vtexpci");
this.devIncons = await waitElement(".footerCheckout__developedBy");
this.cartTitle = await waitElement("#cart-title");
}
fetchApiData() {
this.list.innerHTML = `
<h3>Você também pode gostar:</h3>
<ul class="ulProduct"></ul>
`;
fetch(
"https://m3academy.myvtex.com/api/catalog_system/pub/products/search/?fq=productClusterIds:319"
)
.then((response) => response.json())
.then((data) => {
//const list = document.querySelector(".footerCheckout__prateleira");
const ul = document.createElement("ul");
ul.classList.add("slick-test");
this.list.appendChild(ul);
data.map((item) => {
let colors = "";
for (let i = 0; i < item.items.length; i++) {
colors += `<p>${item.items[i].name}</p>`;
}
const li = document.createElement("li");
li.setAttribute("name", item.itemId);
li.classList.add("itemList");
li.innerHTML = `<img class="imgSlick" src="${item.items[0].images[0].imageUrl}">
<p class="nameSlick">${item.productName}</p>
<div class="skuSlick">
${colors}
</div>
<a class="linkSlick" type="button" href="${item.link}"><p>VER PRODUTO</p></a>`;
ul.appendChild(li);
this.list.classList.add("fetch");
ul.style.width = "100%";
});
})
.then(() => {
this.addCarrossel();
});
}
events() {
window.addEventListener("hashchange", () => {
if (window.location.hash == "#/cart" && this.checkoutVazio.style.display == "none") {
this.list.style.display = "block";
}
if (window.location.hash != "#/cart") {
this.list.style.display = "none";
}
});
addEventListener("resize", () => {
this.addCarrossel();
});
}
createPaymentsIcons() {
this.payments.innerHTML = `
<ul class="payments-icons-wrapper">
<li>
<figure>
<img
src="https://agenciamagma.vteximg.com.br/arquivos/masterCardM3Academy.png"
alt=""
/>
</figure>
</li>
<li>
<figure>
<img
src="https://agenciamagma.vteximg.com.br/arquivos/visaM3Academy.png"
alt=""
/>
</figure>
</li>
<li>
<figure>
<img
src="https://agenciamagma.vteximg.com.br/arquivos/amexM3Academy.png"
alt=""
/>
</figure>
</li>
<li>
<figure>
<img
src="https://agenciamagma.vteximg.com.br/arquivos/eloM3Academy.png"
alt=""
/>
</figure>
</li>
<li>
<figure>
<img
src="https://agenciamagma.vteximg.com.br/arquivos/hiperCardM3Academy.png"
alt=""
/>
</figure>
</li>
<li>
<figure>
<img
src="https://agenciamagma.vteximg.com.br/arquivos/payPalM3Academy.png"
alt=""
/>
</figure>
</li>
<li>
<figure>
<img
src="https://agenciamagma.vteximg.com.br/arquivos/boletoM3Academy.png"
alt=""
/>
</figure>
</li>
</ul>
</div>
`;
}
createVtexpciIcon() {
this.vtexpci.innerHTML = `
<figure class="vtex-icon">
<img class="vtex-icon"
src="https://agenciamagma.vteximg.com.br/arquivos/vtexPCIM3Academy.png"
alt=""
/>
</figure>
`;
}
createDevIcons() {
this.devIncons.innerHTML = `
<li>
<a href="https://vtex.com/br-pt/">
<span>Powered By</span>
<figure>
<img class="vtex-icon" src="https://agenciamagma.vteximg.com.br/arquivos/logoVTEXM3Academy.png" alt="">
</figure>
</a>
</li>
<li>
<a href="https://agenciam3.com/">
<span>Developed By</span>
<figure>
<img class="m3-icon" src="https://agenciamagma.vteximg.com.br/arquivos/logoM3M3Academy.png" alt="">
</figure>
</a>
</li>
`;
}
onUpdate() {
@ -21,20 +189,56 @@ export default class Footer {
// 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 lista = this.list;
let cartTitle = this.cartTitulo;
let slickTitle = this.titleSlick;
if (target.style.display == "none" && window.location.hash == "#/cart") {
lista.style.display = "block";
this.fetchApiData();
} else {
this.cartTitulo.style.display = "none";
lista.style.display = "none";
}
let config = { childList: true, attributes: true };
let observer = new MutationObserver((mutations) => {
if (!this.list.classList.contains("fetch")) {
this.fetchApiData();
}
mutations.forEach(function (mutation) {
console.log(mutation.type);
if (target.style.display != "none") {
lista.style.display = "none";
cartTitle.style.display = "none";
} else {
cartTitle.style.display = "block";
lista.style.display = "block";
}
});
});
observer.observe(target, config);
}
async addCarrossel() {
const elemento = await waitElement("#my-element");
$(elemento).slick({
const elemento = await waitElement(".slick-test");
if ($(elemento).hasClass("slick-initialized")) {
$(elemento).slick("unslick");
}
if (window.innerWidth > 1024) {
$(elemento).not(".slick-initialized").slick({
slidesToShow: 4,
slidesToScroll: 1,
});
} else if (window.innerWidth > 375) {
$(elemento).not(".slick-initialized").slick({
slidesToShow: 3,
slidesToScroll: 1,
});
} else if (window.innerWidth <= 375) {
$(elemento).not(".slick-initialized").slick({
slidesToShow: 2,
slidesToScroll: 1,
});
}
}
}

View File

@ -1,4 +1,3 @@
// import waitForEl from "../helpers/waitForEl";
import { waitElement } from "m3-utils";
export default class Header {
@ -8,14 +7,227 @@ export default class Header {
async init() {
await this.selectors();
console.log(this.item);
this.progressBarHTML();
await this.progressBarProgress();
}
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.header = await waitElement(".headerCheckout");
this.progressBar = await waitElement("#progressBar");
}
progressBarHTML() {
if (this.progressBar && window.innerWidth > 1024) {
this.progressBar.innerHTML = `
<ul>
<li><div class="containerLi"><div><p class="progress-bar-text">Meu Carrinho</p><p id="progress-bar-circle-1" class="progress-bar-circle-1"></p><p class="progress-bar-line-1"></p></div></div></li>
<li class="central"><div class="containerLi"><div><p class="progress-bar-text">Dados Pessoais</p><p id="progress-bar-circle-2" class="progress-bar-circle-2"></p></div></div></li>
<li><div class="containerLi"><div><p class="progress-bar-text">Pagamento</p><p id="progress-bar-circle-3" class="progress-bar-circle-3"></p><p class="progress-bar-line-2"></p></div></div></li>
</ul>
`;
}
if (this.progressBar && window.innerHTML <= 1024) {
this.progressBar.innerHTML = ``;
}
}
async progressBarProgress() {
if (this.progressBar && window.innerWidth > 1024) {
const progressBarLista = document.querySelectorAll("#progressBar ul li");
progressBarLista.forEach((li) => {
if (window.location.href === "https://m3academy.myvtex.com/checkout/#/cart") {
if (li.children[0].children[0].children["progress-bar-circle-1"]) {
li.children[0].children[0].children["progress-bar-circle-1"].classList.add(
"active"
);
}
if (li.children[0].children[0].children["progress-bar-circle-2"]) {
if (
li.children[0].children[0].children[
"progress-bar-circle-2"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progress-bar-circle-2"
].classList.remove("active");
}
}
if (li.children[0].children[0].children["progress-bar-circle-3"]) {
if (
li.children[0].children[0].children[
"progress-bar-circle-3"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progress-bar-circle-3"
].classList.remove("active");
}
}
} else if (
window.location.href === "http://m3academy.myvtex.com/checkout/#/email" ||
window.location.href == "http://m3academy.myvtex.com/checkout/#/profile" ||
window.location.href === "http://m3academy.myvtex.com/checkout/#/shipping"
) {
if (li.children[0].children[0].children["progress-bar-circle-1"]) {
if (
li.children[0].children[0].children[
"progress-bar-circle-1"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progress-bar-circle-3"
].classList.remove("active");
}
}
if (li.children[0].children[0].children["progress-bar-circle-2"]) {
li.children[0].children[0].children["progress-bar-circle-2"].classList.add(
"active"
);
}
if (li.children[0].children[0].children["progress-bar-circle-3"]) {
if (
li.children[0].children[0].children[
"progress-bar-circle-3"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progress-bar-circle-3"
].classList.remove("active");
}
}
} else if (
window.location.href === "http://m3academy.myvtex.com/checkout/#/payment"
) {
if (li.children[0].children[0].children["progress-bar-circle-1"]) {
if (
li.children[0].children[0].children[
"progress-bar-circle-1"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progress-bar-circle-3"
].classList.remove("active");
}
}
if (li.children[0].children[0].children["progress-bar-circle-2"]) {
if (
li.children[0].children[0].children[
"progress-bar-circle-2"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progress-bar-circle-2"
].classList.remove("active");
}
}
if (li.children[0].children[0].children["progress-bar-circle-3"]) {
li.children[0].children[0].children["progress-bar-circle-3"].classList.add(
"active"
);
}
}
window.addEventListener("hashchange", () => {
if (window.location.hash == "#/cart") {
if (li.children[0].children[0].children["progress-bar-circle-1"]) {
li.children[0].children[0].children[
"progress-bar-circle-1"
].classList.add("active");
}
if (li.children[0].children[0].children["progress-bar-circle-2"]) {
if (
li.children[0].children[0].children[
"progress-bar-circle-2"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progress-bar-circle-2"
].classList.remove("active");
}
}
if (li.children[0].children[0].children["progress-bar-circle-3"]) {
if (
li.children[0].children[0].children[
"progress-bar-circle-3"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progress-bar-circle-3"
].classList.remove("active");
}
}
} else if (
window.location.hash == "#/email" ||
window.location.hash == "#/profile" ||
window.location.hash == "#/shipping"
) {
if (li.children[0].children[0].children["progress-bar-circle-1"]) {
if (
li.children[0].children[0].children[
"progress-bar-circle-1"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progress-bar-circle-3"
].classList.remove("active");
}
}
if (li.children[0].children[0].children["progress-bar-circle-2"]) {
li.children[0].children[0].children[
"progress-bar-circle-2"
].classList.add("active");
}
if (li.children[0].children[0].children["progress-bar-circle-3"]) {
if (
li.children[0].children[0].children[
"progress-bar-circle-3"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progress-bar-circle-3"
].classList.remove("active");
}
} else if (window.location.hash == "#/payment") {
if (li.children[0].children[0].children["progress-bar-circle-1"]) {
if (
li.children[0].children[0].children[
"progress-bar-circle-1"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progress-bar-circle-3"
].classList.remove("active");
}
}
if (li.children[0].children[0].children["progress-bar-circle-2"]) {
if (
li.children[0].children[0].children[
"progress-bar-circle-2"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progress-bar-circle-2"
].classList.remove("active");
}
}
if (li.children[0].children[0].children["progress-bar-circle-3"]) {
li.children[0].children[0].children[
"progress-bar-circle-3"
].classList.add("active");
}
}
}
});
});
}
}
}

View File

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

View File

@ -1,16 +1,23 @@
.checkout-container {
.client-pre-email {
border-color: $color-gray4;
border-color: $black;
font-family: $font-family;
padding-top: 8px;
.link-cart {
a {
color: $color-black;
font-family: $font-family-secundary;
font-style: normal;
font-weight: 400;
font-size: 14px;
line-height: 16px;
text-transform: uppercase;
color: $black;
&:hover {
color: lighen($color-black, 10);
color: $black;
text-decoration: none;
}
}
}
@ -25,12 +32,27 @@
margin-bottom: 16px;
span {
color: #303030;
font-size: 24px;
font-family: $font-family-secundary;
font-style: normal;
font-weight: 400;
font-size: 20px;
line-height: 23px;
text-align: center;
text-transform: uppercase;
color: $black;
}
small {
color: $color-gray4;
font-family: $font-family-secundary;
font-style: normal;
font-weight: 400;
font-size: 20px;
line-height: 23px;
text-align: center;
text-transform: uppercase;
color: $black;
}
}
}
@ -39,13 +61,21 @@
margin: 0 0 16px;
input {
width: 80%;
height: 50px;
box-shadow: none;
color: $color-black;
font-family: $font-family;
padding: 0 16px;
border: 2px solid $color-gray3;
border: 1px solid $black;
border-radius: 5px 0px 0px 5px;
box-sizing: border-box;
border-radius: 5px;
font-family: "Open Sans";
font-style: normal;
font-weight: 400;
font-size: 12px;
line-height: 16px;
@media (max-width: 490px) {
width: auto;
@ -53,12 +83,13 @@
}
button {
background-color: $color-black;
border-radius: 5px;
background: $blue;
border-radius: 0px 8px 8px 0px;
border: none;
font-family: $font-family;
height: 54px;
right: 0;
color: $black;
height: 50px;
right: 64px;
top: 0;
@media (max-width: 490px) {
@ -69,19 +100,27 @@
}
span.help.error {
font-family: "Open Sans";
font-style: normal;
font-weight: 700;
font-size: 12px;
line-height: 16px;
color: red;
}
}
.emailInfo {
padding: 16px;
padding-bottom: 23px;
background-color: $color-white;
border: 1px solid $color-gray4;
border-radius: 0;
border: 1px solid $black;
border-radius: 5px;
h3 {
color: #303030;
margin: 0 0 8px 0;
font-family: "Open Sans";
font-style: normal;
font-weight: 700;
font-size: 12px;
line-height: 16px;
}
ul {
@ -89,11 +128,17 @@
li {
span {
color: $color-black;
color: $black;
font-family: "Open Sans";
font-style: normal;
font-weight: 700;
font-size: 12px;
line-height: 16px;
}
i::before {
color: $color-black;
color: $blue;
font-size: 1rem;
opacity: 1;
}
@ -104,6 +149,7 @@
color: $color-black;
font-size: 6rem;
opacity: 0.5;
padding-right: 5px;
}
}
}
@ -112,19 +158,50 @@
.payment-data,
.client-profile-data {
.accordion-group {
border-radius: 0;
border: 1px solid $color-gray4;
position: relative;
border-radius: 8px;
border: 1px solid $gray-100;
font-family: $font-family;
padding: 16px;
.accordion-heading {
span {
color: #303030;
margin-bottom: 8px;
margin: 4px 0 26px 0;
padding: 0;
font-family: 'Tenor Sans';
font-style: normal;
font-weight: 400;
font-size: 16px;
line-height: 19px;
color: $black;
i::before {
fill: #303030;
background-image: url(https://agenciamagma.vteximg.com.br/arquivos/lapisM3Academy.png);
background-size: 19.2px 18px;
width: 19.2px;
height: 18px;
right: 5px;
cursor: pointer;
position: absolute;
fill: transparent;
color: transparent;
}
span[data-i18n="clientProfileData.identification"] {
color: $white;
}
span[data-i18n="clientProfileData.identification"]::before {
content: "Identificação";
color: $black;
font-family: "Tenor Sans";
font-style: normal;
font-weight: 400;
font-size: 16px;
line-height: 19px;
}
}
@ -147,19 +224,26 @@
.client-notice {
color: $color-black;
display: none;
}
p {
label {
color: $color-black;
font-weight: 500;
font-family: "Open Sans";
font-style: normal;
font-weight: 400;
font-size: 14px;
line-height: 19px;
color: $color-gray2;
}
select,
input {
border-radius: 0;
border: 1px solid $color-gray4;
border: 1px solid $color-gray6;
border-radius: 3px;
box-shadow: none;
padding: 9px;
}
.help.error {
@ -168,11 +252,13 @@
}
.box-client-info-pj {
display: none;
.link a#is-corporate-client,
.link a#not-corporate-client {
color: $color-black;
font-weight: 500;
text-decoration: underline;
display: none;
}
}
@ -182,12 +268,21 @@
button.submit {
border: none;
border-radius: 5px;
background: $color-black;
margin-top: 8px;
border-radius: 8px;
background: $blue;
margin-top: 56px;
outline: none;
width: 100%;
transition: all 0.2s linear;
font-family: "Open Sans";
font-style: normal;
font-weight: 700;
font-size: 14px;
line-height: 19px;
letter-spacing: 0.05em;
text-transform: uppercase;
&:hover {
background: lighten($color-black, 5);
}
@ -213,7 +308,7 @@
}
.shp-lean {
border: 1px solid $color-gray4;
border: 1px solid $color-gray3;
border-radius: 0;
label {
@ -236,12 +331,12 @@
}
.shp-summary-group-info {
border-color: $color-gray4;
border-color: $color-gray3;
}
.address-summary {
background: none;
border-color: $color-gray4;
border-color: $color-gray3;
border-radius: 0;
color: #303030;
padding: 12px;
@ -259,7 +354,7 @@
.shp-summary-group-price,
.shp-summary-package {
color: $color-gray4;
color: $gray-500;
}
.shp-summary-group-price {
@ -276,12 +371,42 @@
}
.vtex-omnishipping-1-x-deliveryChannelsToggle {
background-color: #d8c8ac;
border: 1px solid #d8c8ac;
background-color: $white;
border: 1px solid $gray-500;
}
.vtex-omnishipping-1-x-deliveryOptionActive {
text-shadow: 1.3px 1px lighten($color-black, 50);
text-shadow: none;
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-size: 14px;
line-height: 19px;
color: $gray-500;
text-transform: uppercase;
}
.vtex-omnishipping-1-x-deliveryOptionInactive {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-size: 14px;
line-height: 19px;
color: $gray-125;
text-transform: uppercase;
}
.vtex-omnishipping-1-x-addressFormPart1 {
p.ship-country {
display: none;
}
input {
width: 94%;
max-width: 94%;
}
}
}
}

View File

@ -5,7 +5,16 @@
}
.cart-template {
font-family: $font-family;
font-family: $font-family-secundary;
.cart-template-holder {
margin-bottom: 48px;
}
.empty-cart-message {
display: none;
}
@include mq(md, max) {
padding: 0 0;
}
@ -13,10 +22,7 @@
display: none;
}
.cart {
border: 3px solid $color-gray3;
box-sizing: border-box;
border-radius: 5px;
padding: 16px;
padding: 0 0 19px 0;
@include mq(md, max) {
margin: 0px 0 25px 0;
@ -30,13 +36,21 @@
}
.cart-fixed {
font-family: $font-family;
border: 1px solid $color-gray5;
width: 100%;
h2 {
background: $color-white;
background: $white;
border: none;
font-family: 'Tenor Sans';
font-style: normal;
font-weight: 400;
font-size: 16px;
line-height: 19px;
color: #303030;
font-size: 14px;
font-weight: 500;
padding: 7px 0 34px 0px;
text-align: left;
}
.item-unavailable {
@ -48,7 +62,6 @@
}
.cart {
border: 1px solid $color-gray4;
ul li {
border-top: none;
@ -63,6 +76,9 @@
.shipping-date,
.price {
font-weight: 400;
font-size: 14px;
line-height: 16px;
color: #7d7d7d;
}
}
@ -70,7 +86,7 @@
.summary-template-holder {
border-top: none;
background: $color-white;
background: $white;
}
#go-to-cart-button a {
@ -85,24 +101,17 @@
}
#payment-data-submit {
background: $color-black;
background: $black;
border: none;
border-radius: 0;
color: $color-white;
color: $white;
outline: none;
transition: all 0.2s linear;
&:hover {
background: lighten($color-black, 5);
}
&:active {
background: darken($color-black, 5);
}
}
}
.lookatme {
background-color: $color-white;
background-color: $white;
}
.cart-items {
@ -111,10 +120,11 @@
}
th {
color: $color-black;
// text-align: initial;
color: $black;
padding: 0 0 16px;
font-style: normal;
font-weight: bold;
font-weight: 400;
font-size: 14px;
line-height: 16px;
@ -149,24 +159,26 @@
.product-name {
padding-right: 0;
font-family: 'Tenor Sans';
font-style: normal;
font-weight: 400;
font-size: 12px;
line-height: 14px;
color: $black;
@include mq(lg, max) {
width: 250px;
}
a {
color: $color-blue;
color: $black;
font-style: normal;
font-weight: normal;
font-size: 12px;
line-height: 14px;
transition: ease-in 0.22s all;
&:hover {
color: darken($color-blue, 10);
text-decoration: none;
}
@media (max-width: 490px) {
margin-left: 23px;
}
@ -176,10 +188,14 @@
.seller {
display: none !important;
}
span[data-bind="text: quantityLabel"] {
display: none;
}
}
td.shipping-date {
color: $color-gray2;
color: $gray-150;
font-size: 12px;
line-height: 14px;
@ -200,7 +216,7 @@
}
span.list-price {
color: $color-gray2;
color: $gray-150;
font-size: 12px;
line-height: 14px;
text-decoration-line: line-through;
@ -218,7 +234,7 @@
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;
@ -233,8 +249,8 @@
}
input {
background-color: $color-white;
border: 1px solid $color-gray3;
background-color: $white;
border: 1px solid $white;
border-radius: 0;
border-width: 0 1px;
display: block;
@ -242,7 +258,7 @@
margin: 0 !important;
padding: 8px 0;
width: 38px;
color: $color-gray2;
color: $black;
box-shadow: none;
@include mq(lg, max) {
@ -253,7 +269,7 @@
.icon-plus-sign,
.icon-minus-sign {
&::before {
color: $color-black;
color: $black;
display: block;
font-weight: 500;
padding: 1px 12px;
@ -262,14 +278,14 @@
.icon-minus-sign {
&:before {
content: "-";
color: $blue;
font-size: 16px;
}
}
.icon-plus-sign {
&:before {
content: "+";
color: $blue;
font-size: 14px;
}
}
@ -297,10 +313,10 @@
}
span {
font-style: normal;
font-weight: normal;
font-weight: 700;
font-size: 14px;
line-height: 16px;
color: $color-black;
color: $gray-500;
}
}
@ -315,7 +331,7 @@
top: 0;
}
.icon::before {
color: $color-gray4;
color: $gray-200;
font-size: 15px;
@include mq(md, max) {
@ -326,7 +342,7 @@
.item-unavailable-message {
background-color: #d8c8ac;
color: $color-white;
color: $white;
.icon-warning-sign {
color: #bb4f4f;
@ -351,12 +367,13 @@
}
.srp-main-title {
margin: 32px 0 12px;
margin: 0 0 11px 0;
font-family: "Open Sans";
font-style: normal;
font-weight: normal;
font-weight: 400;
font-size: 24px;
line-height: 28px;
color: $color-gray2;
line-height: 33px;
color: $black;
@include mq(md, max) {
margin-top: 0;
@ -364,32 +381,26 @@
}
.srp-description {
color: $color-gray2;
color: $gray-150;
font-family: "Open Sans";
font-size: 12px;
line-height: 18px;
margin: 0 0 12px;
}
button.shp-open-options {
background-color: $color-gray5;
background-color: $gray-50;
border: none;
border-radius: 5px;
color: $color-gray2;
color: $black;
font-size: 16px;
letter-spacing: 0.05em;
font-family: "Open Sans";
line-height: 19px;
font-weight: 500;
outline: none;
padding: 12px 40px;
transition: all 0.2s linear;
&:hover {
background-color: lighten($color-gray5, 5);
}
&:active {
background-color: darken($color-gray5, 5);
}
}
}
@ -405,34 +416,28 @@
}
.srp-pickup-my-location__button {
background-color: $color-black;
background-color: $blue;
border: none;
border-radius: 5px;
color: $color-white;
border-radius: 8px;
color: $white;
outline: none;
width: 100%;
font-family: 'Open Sans';
font-style: normal;
font-weight: 500;
font-weight: 700;
font-size: 14px;
line-height: 16px;
letter-spacing: 0.05em;
line-height: 19px;
&:hover {
background-color: lighten($color-black, 5);
}
&:active {
background-color: darken($color-black, 5);
}
padding: 11px 0;
}
}
.srp-toggle {
margin: 0 0 34px;
margin: 0 0 20px;
&__wrapper {
background-color: $color-white;
background-color: $white;
border-radius: 100px;
width: 100%;
font-family: $font-family;
@ -444,12 +449,12 @@
}
&__current {
border: 1px solid $color-blue;
border: 1px solid $black;
border-radius: 100px;
}
.blue {
color: $color-blue;
color: $black;
}
label {
@ -469,12 +474,13 @@
font-weight: normal;
font-size: 12px;
line-height: 14px;
color: $color-black;
margin-bottom: 12px;
color: $black;
margin-top: 12px;
margin-bottom: 2px !important;
}
input {
border: 1px solid $color-gray3;
border: 1px solid $gray-125;
border-radius: 5px;
box-shadow: none;
color: $color-gray3;
@ -485,38 +491,38 @@
}
& ~ button {
background-color: $color-black;
font-family: "Open Sans";
font-style: normal;
font-weight: 700;
font-size: 14px;
line-height: 19px;
text-shadow: none;
background-color: $blue;
border: none;
border-radius: 5px;
color: $color-white;
border-radius: 8px;
color: $white;
font-size: 12px;
height: 36px;
letter-spacing: 1px;
outline: none;
position: absolute;
right: -150px;
top: 36px;
top: 88px;
transition: all 0.2s linear;
width: 96px;
width: 100px;
text-transform: uppercase;
&:hover {
background-color: lighten($color-black, 5);
}
&:active {
background-color: darken($color-black, 5);
}
}
small a {
font-family: $font-family;
font-family: $font-family-secundary;
font-style: normal;
font-weight: normal;
font-weight: 400;
font-size: 10px;
line-height: 12px;
color: $color-blue;
color: $black;
margin-top: 7px;
text-decoration-line: underline;
}
span.help.error {
@ -525,7 +531,7 @@
position: absolute;
left: 0;
width: 100%;
top: 17px;
top: 44px;
}
}
}
@ -542,14 +548,10 @@
color: #303030;
font-size: 16px;
font-weight: 500;
&:hover {
text-decoration: underline;
}
}
.srp-shipping-current-single {
border: 1px solid $color-gray4;
border: 1px solid $gray-200;
border-radius: 0;
color: #303030;
margin: 16px 0 0;
@ -561,11 +563,11 @@
}
.srp-delivery-select {
border: 1px solid $color-gray4;
border: 1px solid $gray-200;
}
.srp-delivery-select-container {
border: 1px solid $color-gray4;
border: 1px solid $gray-200;
border-radius: 0;
.srp-shipping-current-many {
@ -583,7 +585,7 @@
}
&__arrow svg {
fill: $color-gray4;
fill: $gray-200;
}
}
}
@ -597,18 +599,14 @@
.coupon-data {
#cart-link-coupon-add {
text-decoration: none;
&:hover {
text-decoration: underline;
cursor: pointer;
}
}
span {
font-family: $font-family;
font-family: $font-family-secundary;
font-style: normal;
font-weight: normal;
font-weight: 400;
font-size: 12px;
line-height: 14px;
color: $color-blue;
color: $black;
text-decoration: none;
}
}
@ -630,19 +628,23 @@
}
.coupon-label label {
margin-bottom: 12px;
font-family: $font-family;
text-align: left;
font-family: "Tenor Sans";
font-style: normal;
font-weight: normal;
font-weight: 400;
font-size: 12px;
line-height: 14px;
color: $color-gray2;
cursor: none;
color: $gray-150;
cursor: default;
}
.coupon-fields {
margin-bottom: 32px;
text-align: left;
@include mq(sm, max) {
span {
display: flex;
@ -660,43 +662,47 @@
border: 2px solid $color-gray3;
border-radius: 5px;
box-shadow: none;
color: $color-gray4;
color: $gray-200;
font-size: 12px;
height: 34px;
padding: 0 12px;
max-width: 160px;
width: 204.32px;
@include mq(sm, max) {
max-width: 100%;
width: 100%;
}
&::placeholder {
font-family: "Tenor Sans";
font-style: normal;
font-weight: 400;
font-size: 12px;
line-height: 14px;
text-align: left;
color: $gray-125;
}
}
button {
background: $color-black;
background: $blue;
border: none;
border-radius: 5px;
color: $color-white;
color: $black;
font-size: 12px;
height: 36px;
letter-spacing: 1px;
margin-left: 6px;
outline: none;
transition: all 0.2s linear;
width: 94px;
width: 102px;
text-transform: uppercase;
text-shadow: none;
@include mq(md, max) {
width: 138px;
}
&:hover {
background-color: lighten($color-black, 5);
}
&:active {
background-color: darken($color-black, 5);
}
}
}
}
@ -716,7 +722,7 @@
font-weight: normal;
font-size: 14px;
line-height: 16px;
color: $color-black;
color: $gray-500;
padding: 12px 0;
}
@ -733,11 +739,12 @@
tfoot {
td.info,
td.monetary {
font-family: $font-family;
font-style: normal;
font-weight: normal;
font-weight: 700;
font-size: 18px;
line-height: 21px;
color: $color-black;
line-height: 25px;
color: $gray-500;
}
}
}
@ -771,39 +778,36 @@
}
a {
font-family: $font-family;
font-family: $font-family-secundary;
font-style: normal;
font-weight: normal;
font-weight: 400;
font-size: 12px;
line-height: 14px;
color: $color-blue;
color: $black;
}
}
.btn-place-order-wrapper {
a {
background: $color-green;
background: $blue;
border: none;
border-radius: 5px;
display: block;
font-size: 0;
transition: ease-in 0.22s all;
padding: 12px 19px;
&:hover {
background-color: darken($color-green, 5);
}
cursor: pointer;
&:after {
content: "finalizar compra";
font-family: $font-family;
font-weight: 500;
font-size: 13px;
font-weight: 700;
font-size: 14px;
line-height: 19px;
letter-spacing: 0.05em;
color: $color-white;
color: $black;
text-transform: uppercase;
vertical-align: middle;
line-height: 19px;
text-shadow: none;
}
}

View File

@ -1,8 +1,9 @@
.empty-cart {
font-family: $font-family;
&-content {
color: $color-black;
color: $white;
text-align: center;
margin-top: 170px;
@include mq(md, max) {
padding: 0 16px;
@ -10,28 +11,51 @@
}
&-title {
font-size: 20px;
font-family: $font-family;
font-style: normal;
font-weight: 700;
font-size: 24px;
line-height: 33px;
text-align: center;
text-transform: uppercase;
margin: 0;
color: $black;
}
&-links {
.link-choose-products {
background: $color-black;
border: none;
border-radius: 5px;
transition: ease-in 0.22s all;
outline: none;
font-family: $font-family;
a {
font-family: $font-family-secundary;
font-style: normal;
font-weight: 500;
font-weight: 400;
font-size: 14px;
line-height: 16px;
text-align: center;
letter-spacing: 0.05em;
color: $color-white;
text-transform: uppercase;
letter-spacing: 0.05em;
color: transparent;
}
a::after {
content: "Continuar comprando";
color: $black;
position: absolute;
left: 0;
right: 0;
}
.link-choose-products {
width: 327px;
background: $white;
border: 1px solid $black;
border-radius: 0px;
padding: 15px 0;
transition: ease-in 0.22s all;
outline: none;
&:hover {
background: lighten($color-black, 5);
background: $white;
}
}
}

View File

@ -8,8 +8,12 @@ html {
min-height: 100%;
}
footer {
margin-top: auto;
}
footer .footerCheckout__wrapper {
width: 94.9734%;
width: 100%;
margin: auto auto 0 auto;
}
footer .footerCheckout__prateleira,
@ -66,14 +70,28 @@ body {
color: $color-black !important;
}
#cart-title {
font-family: $font-family;
font-style: normal;
font-weight: 700;
font-size: 24px;
line-height: 33px;
letter-spacing: 0.05em;
text-transform: uppercase;
color: $black;
}
#cart-title,
#orderform-title {
color: $color-gray2;
color: $black;
font-family: $font-family;
font-weight: 500;
font-size: 36px;
line-height: 42px;
margin: 40px 0 30px;
font-style: normal;
font-weight: 700;
font-size: 24px;
line-height: 33px;
margin: 17px 0 28px;
letter-spacing: 0.1em;
text-transform: uppercase;
@ -96,7 +114,7 @@ body {
&::before,
&::after {
content: "";
background: $color-gray2;
background: $gray-500;
display: block;
float: right;
height: 2px;

View File

@ -62,6 +62,7 @@
}
}
.slick-slide {
margin: 0 8px 0 8px;
float: left;
height: 100%;
min-height: 1px;
@ -104,11 +105,19 @@
background: url("https://agenciamagma.vteximg.com.br/arquivos/arrow-left-mini-M3Academy.svg")
no-repeat center center;
z-index: 4;
left: 10px;
left: 22px;
top: 40%;
border: none;
height: 30px;
}
.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;
top: 40%;
border: none;
height: 30px;
}
.slick-arrow.slick-hidden {
display: none;

View File

@ -1,47 +1,130 @@
/* _footer.scss */
.footerCheckout {
border-top: none;
color: $color-gray2;
.container {
display: flex;
flex-direction: column;
width: 100%;
padding: 7px 0;
margin: 0;
@include mq(dt, min) {
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 15px 0 15px 0;
}
@include mq(tv, min) {
padding: 26px 0 26px 0;
}
}
&__wrapper {
align-items: center;
display: flex;
justify-content: space-between;
border-top: 1px solid $black;
@media screen and (max-width: 490px) {
padding: 7px 0;
}
}
&__address {
color: $color-gray2;
color: $gray-500;
font-family: $font-family;
font-style: normal;
font-weight: normal;
font-weight: 400;
line-height: 14px;
font-size: 10px;
line-height: 12px;
text-transform: capitalize;
max-width: 40%;
@include mq(md, max) {
margin-bottom: 24px;
max-width: 100%;
@include mq(dt, max) {
display: flex;
width: 100%;
order: 2;
margin-top: 17px;
span {
margin-left: 16px;
}
}
@include mq(dt, min) {
min-width: 269px;
margin-left: 32px;
}
@include mq(tv, min) {
font-size: 20px;
line-height: 27px;
min-width: 537px;
margin-left: 0;
}
}
&__stamps {
align-items: center;
display: flex;
justify-self: center;
height: 33px;
align-items: center;
list-style: none;
margin: 0 0 0 5px;
@include mq(md, max) {
align-self: center;
margin-bottom: 12px;
li {
height: 33px;
}
&__divider {
background-color: $color-gray4;
display: inline-block;
height: 24px;
margin: 0 8px;
width: 1px;
@include mq(dt, min) {
justify-content: center;
min-width: 404px;
margin: 0;
}
@include mq(tv, min) {
min-width: 690.52px;
}
.payments-icons-wrapper {
display: flex;
width: 100%;
list-style: none;
margin: 0;
gap: 4px;
figure {
padding: 6px 0 7px;
width: 35.65px;
height: 20px;
margin: 0;
@include mq(tv, min) {
width: 69.63px;
}
@include mq(Gf, max) {
width: 28px;
}
}
}
.footerCheckout__stamps__divider {
border-left: 1px solid $gray-125;
margin: 0 10px;
height: 33px;
padding: 0 0 9px;
@include mq(dt, min) {
margin-left: 11.35px;
}
}
.footerCheckout__vtexpci {
.vtex-icon {
width: 53px;
margin: 0;
}
@include mq(tv, min) {
.vtex-icon {
width: 103.52px;
height: 64.46px;
}
}
}
}
@ -51,18 +134,43 @@
list-style-type: none;
margin: 0;
li:last-child {
@include mq(dt, max) {
display: flex;
width: 100%;
order: 3;
margin-top: 17px;
}
@include mq(dt, min) {
min-width: 217px;
margin-right: 22.5px;
}
li {
margin-left: 16px;
figure {
margin: 0;
}
}
.vtex-icon {
width: 44.92px;
margin: 0;
}
.m3-icon {
width: 28.66px;
margin: 0;
}
a {
align-items: center;
color: $color-gray2;
color: $gray-500;
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;
@ -70,5 +178,38 @@
margin-right: 8px;
}
}
@include mq(tv, min) {
min-width: 388.98px;
margin-right: 0;
a {
font-size: 18px;
line-height: 25px;
}
li {
margin-left: 10px;
}
.vtex-icon {
width: 87.73px;
}
.m3-icon {
width: 55.98px;
}
}
}
.footerCheckout::after,
::before {
display: none;
content: none;
}
.footerCheckout::before,
::after {
display: none;
content: none;
}
}

View File

@ -1,17 +1,31 @@
/* _header.scss */
.headerCheckout {
width: 100%;
border-bottom: 1px solid black;
.container {
width: auto !important;
}
.headerCheckout__safeBuy {
display: flex;
}
.headerCheckout__wrapper {
margin-top: 20px;
margin-bottom: 22px;
}
&__wrapper {
align-items: center;
display: flex;
justify-content: space-between;
justify-content: space-evenly;
margin-top: 30px;
}
&__logo {
img {
height: 52px;
height: 37.14px;
width: auto;
}
}
@ -29,8 +43,104 @@
color: $color-gray;
}
img {
height: 15px;
margin-right: 8px;
}
i {
margin-right: 8px;
}
span {
transform: translateY(1px);
}
}
#progressBar {
width: 446px;
ul {
list-style-type: none;
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 !important;
}
li .containerLi {
width: 100%;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
position: relative;
}
li.central .containerLi {
align-items: center;
margin-left: 7px;
}
li:last-child .containerLi {
align-items: flex-end;
}
li .containerLi div {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
li {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-family: $font-family-secundary, sans-serif;
font-size: 12px;
font-weight: 400;
line-height: 28px;
color: #000;
width: 39.9183%;
@media (min-width: 2500px) {
font-size: 24px;
}
}
li.central {
width: auto;
}
li #progress-bar-circle-1,
li #progress-bar-circle-2,
li #progress-bar-circle-3 {
width: 12px;
height: 12px;
border: 1px solid $black;
border-radius: 50%;
@media (min-width: 2500px) {
width: 24px;
height: 24px;
}
}
li #progress-bar-circle-1.active,
li #progress-bar-circle-2.active,
li #progress-bar-circle-3.active {
border: none;
background-color: $black;
}
li .progress-bar-line-1 {
display: flex;
position: absolute;
left: 25%;
transform: translateY(-50%);
bottom: 5px;
width: 100%;
height: 1px;
border-top: 1px solid $black;
}
li .progress-bar-line-2 {
position: absolute;
right: 21%;
transform: translateY(-50%);
bottom: 5px;
width: 100%;
height: 1px;
border-top: 1px solid $black;
}
}
}

View File

@ -1 +1,85 @@
/* _prateleira.scss */
.footerCheckout__prateleira {
padding-bottom: 56px;
ul {
margin: 0;
}
h3 {
font-family: $font-family-secundary;
font-style: normal;
font-weight: 400;
font-size: 24px;
line-height: 38px;
color: $black;
text-align: center;
}
.imgSlick {
background: $gray-600;
}
.nameSlick {
font-family: $font-family;
font-style: normal;
font-weight: 400;
font-size: 13px;
line-height: 18px;
color: $black;
text-align: center;
margin: 20px 0 20px 0;
}
.skuSlick {
display: flex;
align-items: center;
text-align: center;
justify-content: center;
gap: 5px;
p {
font-family: $font-family;
font-style: normal;
font-weight: 700;
font-size: 13px;
line-height: 18px;
letter-spacing: 0.05em;
text-transform: uppercase;
padding: 5px;
color: $white;
background: $blue;
border-radius: 8px;
}
}
a:hover {
text-decoration: none;
}
.linkSlick {
display: flex;
align-items: center;
text-align: center;
justify-content: center;
p {
font-family: $font-family;
font-style: normal;
font-weight: 700;
font-size: 13px;
line-height: 18px;
letter-spacing: 0.05em;
text-transform: uppercase;
padding: 12px 0;
width: 100%;
color: $white;
background: $blue;
border-radius: 8px;
}
}
}

View File

@ -2,18 +2,32 @@
@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 */
$black: #000;
$white: #FFFFFF;
$color-black: #292929;
$color-white: #fff;
$gray-50: #e5e5e5;
$gray-100: #f0f0f0;
$gray-125: #c4c4c4;
$gray-150: #989898;
$gray-200: #8d8d8d;
$gray-500: #292929;
$gray-600: #ededed;
$color-gray: #6c6c6c;
$color-gray2: #7d7d7d;
$color-gray3: #f0f0f0;
$color-gray4: #8d8d8d;
$color-gray5: #e5e5e5;
$color-gray6: #828282;
$blue: #00c8ff;
$color-blue: #4267b2;
@ -22,11 +36,14 @@ $color-green: #4caf50;
/* Grid breakpoints */
$grid-breakpoints: (
xs: 0,
Gf: 328px,
cstm: 400,
sm: 576px,
md: 768px,
lg: 992px,
xl: 1200px
dt: 1025px,
xl: 1200px,
tv: 2500px,
) !default;
$z-index: (
@ -34,5 +51,5 @@ $z-index: (
level2: 10,
level3: 15,
level4: 20,
level5: 25
level5: 25,
) !default;

9196
yarn.lock Normal file

File diff suppressed because it is too large Load Diff