feature/m3-academy-template-checkout #1

Merged
EleonoraOtz merged 13 commits from feature/m3-academy-template-checkout into main 2022-12-18 23:54:09 +00:00
15 changed files with 2208 additions and 11817 deletions

10970
checkout/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -32,13 +32,12 @@ export default class CheckoutUI {
toggleFooterDropdown(event) { toggleFooterDropdown(event) {
event.target.classList.toggle("closed"); event.target.classList.toggle("closed");
event.target.nextElementSibling.classList.toggle( event.target.nextElementSibling.classList.toggle("dropdown__content--closed");
"dropdown__content--closed"
);
} }
init() { init() {
this.configThumb(); this.configThumb();
this.hideTitle();
waitForEl(".product-image img", this.resizeImages.bind(this)); waitForEl(".product-image img", this.resizeImages.bind(this));
$(window).on("orderFormUpdated.vtex", this.resizeImages.bind(this)); $(window).on("orderFormUpdated.vtex", this.resizeImages.bind(this));
} }
@ -56,14 +55,28 @@ export default class CheckoutUI {
resizeImages() { resizeImages() {
$(".product-image img").each((i, el) => { $(".product-image img").each((i, el) => {
const $el = $(el); const $el = $(el);
$el.attr( $el.attr("src", alterarTamanhoImagemSrcVtex($el.attr("src"), this.width, this.height));
"src",
alterarTamanhoImagemSrcVtex(
$el.attr("src"),
this.width,
this.height
)
);
}); });
} }
async hideTitle() {
const order = await window.vtexjs.checkout.getOrderForm();
const formItem = order.items.length;
const cartTitle = document.querySelector("#cart-title");
$(window).on("orderFormUpdated.vtex", (evento, orderForm) => {
if (orderForm.items.length <= 0) {
cartTitle.style.display = "none";
} else {
cartTitle.style.display = "block";
}
if (window.location.hash === "#/shipping" || window.location.hash === "#/payment") {
cartTitle.style.display = "none";
}
});
if (formItem === 0) {
cartTitle.style.display = "none";
}
}
} }

View File

@ -6,14 +6,26 @@ export default class Footer {
} }
async init() { async init() {
this.list = await this.fetchPrateleira();
await this.selectors(); await this.selectors();
// this.onUpdate(); // this.onUpdate();
this.createPrateleira();
this.prateleira = await waitElement(".footerCheckout__carrossel-itens");
this.itensPrateleira();
this.addCarrossel();
this.creditCardIconsHTML();
this.developedByIconsHTML();
} }
async selectors() { async selectors() {
//Para verificar se o carrinho está vazio e remover a prateleira de produtos: this.itensP = await waitElement(".footerCheckout__prateleira", {
// vocês devem olhar a doc fornecida no Desafio para aprender a usar o waitElement timeout: 5000,
this.checkoutVazio = await waitElement(".empty-cart-content"); interval: 1000,
});
this.creditCardIcons = await waitElement(".footerCheckout__stamps");
this.developedByIcons = await waitElement(".footerCheckout__developedBy");
} }
onUpdate() { onUpdate() {
@ -30,11 +42,110 @@ export default class Footer {
observer.observe(target, config); observer.observe(target, config);
} }
async addCarrossel() {
const elemento = await waitElement("#my-element"); createPrateleira() {
$(elemento).slick({ if (this.itensP) {
slidesToShow: 4, this.itensP.innerHTML = `
slidesToScroll: 1, <h2>Você também pode gostar:</h2>
<ul class="footerCheckout__carrossel-itens"></ul>
`;
}
}
async itensPrateleira() {
let structure = "";
this.list.forEach((response) => {
const tipo = response.skus.map((item) => `<li class= "variation">${item}</li>`);
structure += `
<li class= "product-info">
<figure><img src ="${response.img}"/></figure>
<figcaption>${response.name}</figcaption>
<div><ul>${tipo}</ul></div>
<button class= "show-product" type="button"><a href="${response.link}">Ver Produto</a></button>
</li>
`;
}); });
this.prateleira.innerHTML = structure;
}
async fetchPrateleira() {
const api =
"https://m3academy.myvtex.com/api/catalog_system/pub/products/search/?fq=productClusterIds:319";
return fetch(api)
.then((response) => response.json())
.then((data) => {
const prodInfo = data.map((response) => ({
name: response.productName,
skus: response.items.map((item) => item.name),
img: response.items[0].images[0].imageUrl,
link: response.link,
}));
return prodInfo;
});
}
async addCarrossel() {
const elemento = await waitElement(".footerCheckout__carrossel-itens");
if (window.innerWidth > 1024) {
$(elemento).slick({
slidesToShow: 4,
slidesToScroll: 1,
arrows: true,
infinite: false,
});
} else if (window.innerWidth <= 1024 && window.innerWidth > 375) {
$(elemento).slick({
slidesToShow: 3,
slidesToScroll: 1,
arrows: true,
infinite: false,
});
} else if (window.innerWidth <= 375) {
$(elemento).slick({
slidesToShow: 2,
slidesToScroll: 1,
arrows: true,
infinite: false,
});
}
}
creditCardIconsHTML() {
this.creditCardIcons.innerHTML = `
<li><img src="https://agenciamagma.vteximg.com.br/arquivos/masterCardM3Academy.png" alt="Mastercard"></li>
<li><img src="https://agenciamagma.vteximg.com.br/arquivos/visaM3Academy.png" alt=""></li>
<li><img src="https://agenciamagma.vteximg.com.br/arquivos/amexM3Academy.png" alt="American Express"></li>
<li><img src="https://agenciamagma.vteximg.com.br/arquivos/eloM3Academy.png" alt="Elo"></li>
<li><img src="https://agenciamagma.vteximg.com.br/arquivos/hiperCardM3Academy.png" alt="Hipercard"></li>
<li><img src="https://agenciamagma.vteximg.com.br/arquivos/payPalM3Academy.png" alt="PayPal"></li>
<li><img src="https://agenciamagma.vteximg.com.br/arquivos/boletoM3Academy.png" alt="Boleto"></li>
<li><span class="footerCheckout__stamps__divider"></span></li>
<li class="vtex-pci"><img src="https://agenciamagma.vteximg.com.br/arquivos/vtexPCIM3Academy.png" alt="PCI VTEX"></li>
`;
}
developedByIconsHTML() {
this.developedByIcons.innerHTML = `
<li>
<div class="by-vtex">
<a href="https://vtex.com.br-pt/">
<span>Powered By</span>
</a>
<img class="vtex-logo" src="https://agenciamagma.vteximg.com.br/arquivos/logoVTEXM3Academy.png" alt="VTEX" />
</div>
</li>
<li>
<div class="by-m3">
<a href="https://vtex.com.br-pt/">
<span>Developed By</span>
</a>
<img class="m3-logo" src="https://agenciamagma.vteximg.com.br/arquivos/logoM3M3Academy.png" alt="M3" />
</div>
</li>
`;
} }
} }

View File

@ -1,4 +1,4 @@
// import waitForEl from "../helpers/waitForEl"; import waitForEl from "../helpers/waitForEl";
import { waitElement } from "m3-utils"; import { waitElement } from "m3-utils";
export default class Header { export default class Header {
@ -8,14 +8,136 @@ export default class Header {
async init() { async init() {
await this.selectors(); await this.selectors();
console.log(this.item); this.progressBarHTML();
await this.progressBarProgress();
} }
async selectors() { async selectors() {
this.item = await waitElement("#my-element", { this.header = await waitElement(".headerCheckout");
//#my-element pode ser a class ou o id do elemento html qeu vocÊ quer pegar this.progressBar = await waitElement("#progressBar");
timeout: 5000, // vai esperar 5 segundos antes de rejeitar a promise }
interval: 1000, // vai verificar a cada 1 segundo se o elemento existe
}); progressBarHTML() {
if (this.progressBar && window.innerWidth > 1024){
this.progressBar.innerHTML = `
<ul>
<li><div class="container-list"><div><p class="progress-bar-text">Meu Carrinho</p><p id="progress-bar-circle-1" class="progress-bar-circle-1 active"></p><p class="progress-bar-line-1"></p></div></div></li>
<li class="central"><div class="container-list"><div><p class="progress-bar-text">Dados Pessoais</p><p id="progress-bar-circle-2" class="progress-bar-circle-2 active"></p></div></div></li>
<li><div class="container-list"><div><p class="progress-bar-text">Pagamento</p><p id="progress-bar-circle-3" class="progress-bar-circle-3 active"></p><p class="progress-bar-line-2"></p></div></div></li>
</ul>
`;
}
if (this.progressBar && window.innerWidth <= 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 === "https://m3academy.myvtex.com/checkout/#/email" ||
window.location.href === "https://m3academy.myvtex.com/checkout/#/profile" ||
window.location.href === "https://m3academy.myvtex.com/checkout/#/shipping"
) {
if (li.children[0].children[0].children["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-1"].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 === "https://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-1"].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-1"].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-1"].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

@ -3,3 +3,4 @@
@import "./partials/header"; @import "./partials/header";
@import "./partials/footer"; @import "./partials/footer";
@import "./checkout/checkout.scss"; @import "./checkout/checkout.scss";
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&family=Tenor+Sans&display=swap');

View File

@ -1,289 +1,530 @@
.checkout-container { .checkout-container {
.client-pre-email { .client-pre-email {
border-color: $color-gray4; border-color: $black-500;
font-family: $font-family; padding-top: 8px;
padding-top: 8px;
.link-cart { @media (max-width: 375px) {
a { width: 91.47%;
color: $color-black; }
font-size: 14px;
&:hover { label {
color: lighen($color-black, 10); font-family: $font-family-secundary;
} text-transform: uppercase;
} color: $black-500;
} }
.pre-email { .link-cart {
flex-direction: column; a {
display: flex; color: $black-500;
align-items: center; font-family: $font-family-secundary;
justify-content: center; font-size: 14px;
line-height: 16px;
text-transform: uppercase;
h3 { @media (max-width: 375px) {
margin-bottom: 16px; font-size: 10px;
line-height: 12px;
}
span { &:hover {
color: #303030; color: $black-400;
font-size: 24px; }
} }
}
small { .pre-email {
color: $color-gray4; flex-direction: column;
} display: flex;
} align-items: center;
} justify-content: center;
.client-email { h3 {
margin: 0 0 16px; margin-bottom: 16px;
input { span {
box-shadow: none; color: $black-500;
color: $color-black; font-size: 20px;
font-family: $font-family;
padding: 0 16px;
border: 2px solid $color-gray3;
box-sizing: border-box;
border-radius: 5px;
@media (max-width: 490px) { @media (max-width: 375px) {
width: auto; font-size: 12px;
} line-height: 14px;
} }
}
button { small {
background-color: $color-black; color: $black-500;
border-radius: 5px; }
border: none; }
font-family: $font-family; }
height: 54px;
right: 0;
top: 0;
@media (max-width: 490px) { .client-email {
height: 48px; margin: 0 0 16px;
margin: 0;
position: absolute;
}
}
span.help.error { input {
color: red; height: 50px;
} box-shadow: none;
} color: $black-500;
font-family: $font-family;
font-size: 12px;
line-height: 16px;
padding: 0 16px;
border: 1px solid $black-500;
box-sizing: border-box;
border-radius: 5px;
.emailInfo { &::placeholder {
padding: 16px; color: $black-500;
background-color: $color-white; }
border: 1px solid $color-gray4;
border-radius: 0;
h3 { @media (max-width: 490px) {
color: #303030; width: auto;
margin: 0 0 8px 0; }
} }
ul { button {
margin: 0; background: $vivid-blue;
border-radius: 0 8px 8px 0;
border: none;
font-family: $font-family;
color: $black-500;
letter-spacing: 0.05em;
height: 50px;
right: -4px;
top: 0;
transition: all 0.2s linear;
li { &:hover {
span { background-color: $vivid-blue-lighten;
color: $color-black; }
}
i::before { &:active {
color: $color-black; background-color: $vivid-blue-darker;
font-size: 1rem; }
opacity: 1;
}
}
}
i::before { @media (max-width: 375px) {
color: $color-black; right: -3px;
font-size: 6rem; margin: 0;
opacity: 0.5; position: absolute;
} }
} }
}
.shipping-data, span.help.error {
.payment-data, color: red;
.client-profile-data { font-family: $font-family;
.accordion-group { font-weight: 700;
border-radius: 0; font-size: 12px;
border: 1px solid $color-gray4; line-height: 16px;
font-family: $font-family; }
padding: 16px; }
.accordion-heading { .emailInfo {
span { padding: 16px;
color: #303030; background-color: #fff;
margin-bottom: 8px; border: 1px solid $black-500;
padding: 0; border-radius: 5px;
margin-top: 47px;
i::before { h3 {
fill: #303030; font-family: $font-family;
} font-weight: 700;
} margin: 0 0 8px 0;
}
a { ul {
align-items: center; margin: 0;
background-color: #303030;
border-radius: 8px;
border: none;
color: $color-white;
display: flex;
justify-content: center;
padding: 6px 5px 6px 8px;
}
}
.accordion-inner { li {
padding: 0; span {
color: $black-500;
font-family: $font-family;
font-weight: 700;
font-size: 12px;
line-height: 16px;
}
/* General configurations */ i::before {
color: $vivid-blue;
font-size: 1rem;
opacity: 1;
}
}
}
.client-notice { i::before {
color: $color-black; color: #292929;
} font-size: 6rem;
opacity: 0.5;
}
}
}
p { .shipping-data,
label { .payment-data,
color: $color-black; .client-profile-data {
font-weight: 500; .accordion-group {
} border-radius: 8px;
border: 1px solid $gray-300;
font-family: $font-family;
font-size: 14px;
padding: 24px 17px 38px 17px;
margin-bottom: 17px;
select, .accordion-heading {
input { span {
border-radius: 0; font-family: $font-family-secundary;
border: 1px solid $color-gray4; font-size: 16px;
box-shadow: none; line-height: 19px;
} color: $black-400;
margin-bottom: 25px;
padding: 0;
.help.error { i::before {
color: red; display: none;
} }
} }
.box-client-info-pj { a {
.link a#is-corporate-client, display: block !important;
.link a#not-corporate-client { background: transparent;
color: $color-black; border: none;
font-weight: 500; box-shadow: none;
text-decoration: underline; width: 6.11%;
} cursor: pointer;
}
.state-inscription-box span { .icon-edit {
font-weight: 500; content: url("https://agenciamagma.vteximg.com.br/arquivos/lapisM3Academy.png");
} width: 100%;
}
}
}
button.submit { .accordion-inner {
border: none; padding: 0;
border-radius: 5px;
background: $color-black;
margin-top: 8px;
outline: none;
transition: all 0.2s linear;
&:hover { tr {
background: lighten($color-black, 5); td.info {
} border-bottom: 1px solid $gray-700;
}
}
&:active { /* General configurations */
background: darken($color-black, 5);
}
}
/* Shipping configurations */ .box-step {
.link-gift-card {
display: none;
}
}
.ship-postalCode small a { .box-info {
color: #303030; font-size: 12px;
font-weight: 500; line-height: 16px;
text-decoration: underline; color: $gray-700;
} }
.vtex-omnishipping-1-x-deliveryGroup { .client-notice {
p { display: none;
color: #303030; }
font-size: 14px;
font-weight: 500;
}
.shp-lean { p {
border: 1px solid $color-gray4; position: relative;
border-radius: 0; margin-bottom: 6px;
color: $gray-700;
label { label {
background-color: $color-white; // color: $gray-800;
box-shadow: none; font-size: 14px;
color: #303030; font-weight: 700;
padding: 8px 12px; margin-bottom: 1px;
}
svg path { select,
fill: #d8c8ac; input {
} // padding: 13px 7px;
} border-radius: 5px;
} border: 1px solid $gray-50;
} color: $black-500;
box-shadow: none;
// margin-bottom: 16px;
// max-width: 77%;
}
.delivery-address-title { .help.error {
color: #303030; color: red;
font-size: 14px; font-size: 9px;
font-weight: 500; margin: 0;
} }
}
.shp-summary-group-info { .box-client-info-pj {
border-color: $color-gray4; display: none;
} .link a#is-corporate-client,
.link a#not-corporate-client {
display: none;
// color: #292929;
// font-weight: 500;
// text-decoration: underline;
}
.address-summary { .link {
background: none; display: none;
border-color: $color-gray4; }
border-radius: 0; }
color: #303030;
padding: 12px;
@include mq(md, max) { .state-inscription-box span {
background-position: 8px 9px; font-weight: 500;
} }
a { button.submit {
color: #303030; width: 100%;
font-weight: 500; border: none;
text-decoration: underline; border-radius: 8px;
} outline: none;
} font-family: $font-family;
font-weight: 700;
font-size: 14px;
line-height: 19px;
text-transform: uppercase;
background: $vivid-blue;
color: $white;
margin-top: 36px;
text-shadow: none;
transition: all 0.2s linear;
.shp-summary-group-price, &:hover {
.shp-summary-package { background: $vivid-blue-lighten;
color: $color-gray4; }
}
.shp-summary-group-price { &:active {
padding-right: 16px; background: $vivid-blue-darker;
} }
}
.shp-summary-package { /* Shipping configurations */
padding-left: 16px;
}
.vtex-omnishipping-1-x-summaryChange { .ship-country {
border-color: #303030; display: none;
color: #303030; }
}
.vtex-omnishipping-1-x-deliveryChannelsToggle { .ship-postalCode {
background-color: #d8c8ac; display: flex;
border: 1px solid #d8c8ac; flex-direction: column;
}
.vtex-omnishipping-1-x-deliveryOptionActive { label {
text-shadow: 1.3px 1px lighten($color-black, 50); font-size: 12px;
} line-height: 16px;
}
} &::after {
} content: ":";
}
}
input {
width: 100%;
}
small a {
color: $black-400;
font-size: 12px;
line-height: 16px;
font-weight: 400;
text-decoration: underline;
}
}
.vtex-omnishipping-1-x-SummaryItemContent {
display: block;
}
.vtex-omnishipping-1-x-deliveryGroup {
p {
color: $gray-700;
font-size: 14px;
line-height: 19px;
font-weight: 700;
}
.shp-lean {
border: 1px solid $gray-50;
border-radius: 8px;
label {
background-color: $white;
box-shadow: none;
color: $gray-700;
font-family: $font-family;
font-size: 14px;
line-height: 19px;
padding: 8px 12px;
&::after {
background-color: $gray-25;
}
}
.shp-lean-option {
&::before {
position: relative;
content: "";
border: 1px solid $gray-900;
border-radius: 3px;
width: 16px;
height: 16px;
top: 0;
left: 0;
}
}
.vtex-omnishipping-1-x-leanShippingOptionActive {
&::after {
content: "";
width: 12px;
display: block;
position: absolute;
// right: 94.5%;
left: 37.1%;
border-radius: 3px;
height: 12px;
background-color: $vivid-blue;
}
}
// .vtex-omnishipping-1-x-addressSummaryActive {
// .address-summary {
// .line1-delimiter {
// border: 1px solid $gray-50;
// }
// }
// }
.vtex-omnishipping-1-x-leanShippingText,
.vtex-omnishipping-1-x-leanShippingTextLabel {
color: $gray-700;
font-family: $font-family;
font-style: normal;
font-weight: 400;
font-size: 12px;
line-height: 16px;
letter-spacing: 0.05em;
}
.vtex-omnishipping-1-x-svg {
display: none;
opacity: 0;
&::before {
border: 1px solid $gray-800;
width: 16px;
height: 16px;
}
}
}
}
.delivery-address-title {
color: $gray-700;
font-size: 14px;
font-weight: 700;
}
.shp-summary-group-info {
border-style: none;
// border-color: #8d8d8d;
}
.address-summary {
background: none;
color: $gray-700;
// border: 1px solid $gray-50;
border-radius: 8px;
font-family: $font-family;
font-style: normal;
font-weight: 400;
font-size: 12px;
line-height: 16px;
padding: 0;
a {
font-family: $font-family;
font-style: normal;
font-weight: 400;
font-size: 12px;
line-height: 16px;
text-transform: lowercase;
color: $vivid-blue;
// text-align: end;
}
// div {
// display: flex !important;
// flex-direction: column;
// }
@include mq(md, max) {
background-position: 8px 9px;
}
// a {
// color: #303030;
// font-weight: 500;
// text-decoration: underline;
// }
}
.shp-summary-group-price,
.shp-summary-package {
padding: 0;
color: $gray-700;
}
// .shp-summary-group-price {
// padding-right: 16px;
// }
.shp-summary-package {
margin-top: 25px;
}
.vtex-omnishipping-1-x-summaryChange {
display: none;
}
.vtex-omnishipping-1-x-SummaryItemGroup {
padding: 0;
margin: 0;
}
.vtex-omnishipping-1-x-deliveryChannelsToggle {
background-color: $white;
border: 1px solid $black-400;
}
.vtex-omnishipping-1-x-deliveryChannelsOption {
color: $gray-400;
font-family: "Open Sans";
font-style: normal;
font-weight: 400;
font-size: 14px;
line-height: 19px;
text-transform: uppercase;
}
.vtex-omnishipping-1-x-deliveryOptionActive {
color: $black-400;
font-family: "Open Sans";
font-style: normal;
font-weight: 400;
font-size: 14px;
line-height: 19px;
text-transform: uppercase;
}
}
}
}
.payment-data {
.box-step {
.link-gift-card {
display: none;
}
}
}
} }

File diff suppressed because it is too large Load Diff

View File

@ -4,8 +4,21 @@ body .container-main.container-order-form .orderform-template.active {
margin-left: unset; margin-left: unset;
margin-right: 0; margin-right: 0;
float: right; float: right;
@media (max-width: 1024px) {
width: 100%;
}
.quantity {
background-color: $vivid-blue;
color: $white;
}
} }
.orderform-template-holder { .orderform-template-holder {
width: 66.1132%; width: 66.1132%;
@media (max-width: 1024px) {
width: 100%;
}
} }
} }

View File

@ -1,38 +1,75 @@
.empty-cart { .empty-cart {
font-family: $font-family; font-family: $font-family;
&-content { &-content {
color: $color-black; color: #292929;
text-align: center; text-align: center;
align-items: center;
margin: 170px 0 264px 0;
@include mq(md, max) { @include mq(md, max) {
padding: 0 16px; padding: 0 16px;
} }
}
&-title { @media (max-width: 1024px) {
font-size: 20px; margin-bottom: 262px;
} }
}
&-links { &-title {
.link-choose-products { align-items: center;
background: $color-black; font-family: $font-family;
border: none; font-weight: 700;
border-radius: 5px; font-size: 24px;
transition: ease-in 0.22s all; line-height: 33px;
outline: none; text-transform: uppercase;
font-family: $font-family; margin-bottom: 35px;
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;
&:hover { @media (max-width: 1024px) {
background: lighten($color-black, 5); font-size: 18px;
} line-height: 25px;
} margin: 235px 0 22px;
} }
}
&-message {
display: none;
}
&-links {
.link-choose-products {
font-size: 0;
padding: 0;
// &:before {
// padding: 0;
// }
&:after {
content: "Continuar comprando";
font-family: $font-family-secundary;
font-style: normal;
font-weight: 400;
font-size: 14px;
line-height: 16.38px;
text-align: center;
text-transform: uppercase;
background-color: $white;
border-style: border-box;
border: 1px solid $black-500;
border-radius: 0;
transition: ease-in 0.22s all;
outline: none;
letter-spacing: 0.05em;
padding: 15px 65px;
color: $black-500;
@media (max-width: 1024px) {
padding: 16px 26px;
}
}
&:hover {
background: lighten(#292929, 5);
}
}
}
} }

View File

@ -8,14 +8,30 @@ html {
min-height: 100%; min-height: 100%;
} }
footer .footerCheckout__wrapper { footer .footerCheckout__wrapper {
width: 94.9734%; width: 100%;
margin: auto auto 0 auto;
} }
footer .footerCheckout__prateleira,
footer .footerCheckout__wrapper .container {
display: flex;
align-items: center;
justify-content: space-between;
}
header { header {
border-bottom: 1px solid $black-500;
}
footer .footerCheckout__prateleira,
.headerCheckout .container {
width: 79.53125%; width: 79.53125%;
margin: 0 auto; margin: 0 auto;
@media (max-width: 1024px) {
width: 91.47%;
}
} }
body { body {
@ -50,35 +66,49 @@ body {
.container-order-form, .container-order-form,
.container-cart { .container-cart {
width: 80%; width: 80%;
@media (max-width: 1024px) {
width: 100%;
}
} }
} }
.btn-success { .btn-success {
background: $color-black; border: none;
text-shadow: none; border-radius: 8px;
color: $white;
outline: none;
font-family: "Open Sans",sans-serif;
font-style: normal;
font-weight: 700;
font-size: 14px;
line-height: 16px;
letter-spacing: .05em;
text-transform: uppercase;
&:hover { &:hover {
background: lighten($color-black, 15%); background: lighten(#292929, 15%);
} }
} }
.emailInfo h3 { .emailInfo h3 {
color: $color-black !important; color: #292929 !important;
} }
#cart-title, #cart-title,
#orderform-title { #orderform-title {
color: $color-gray2; color: $black-400;
font-family: $font-family; font-family: $font-family;
font-weight: 500; font-weight: 700;
font-size: 36px; font-size: 24px;
line-height: 42px; line-height: 33px;
margin: 40px 0 30px; margin: 17px 0 16px;
letter-spacing: 0.1em; letter-spacing: 0.05em;
text-transform: uppercase; text-transform: uppercase;
@include mq(md, max) { @media (max-width: 1024px) {
margin-left: 30px; text-align: left;
margin-left: 16px;
} }
} }
@ -96,7 +126,7 @@ body {
&::before, &::before,
&::after { &::after {
content: ""; content: "";
background: $color-gray2; background: #7d7d7d;
display: block; display: block;
float: right; float: right;
height: 2px; height: 2px;

View File

@ -66,11 +66,22 @@
height: 100%; height: 100%;
min-height: 1px; min-height: 1px;
outline: none; outline: none;
// width: 258px !important;
// .slick-active {
// gap: 16px;
// }
[dir="rtl"] & { [dir="rtl"] & {
float: right; float: right;
} }
// ul #text {
// font-size: 0;
// }
img { img {
display: block; display: block;
} }
&.slick-loading img { &.slick-loading img {
display: none; display: none;
@ -104,11 +115,15 @@
background: url("https://agenciamagma.vteximg.com.br/arquivos/arrow-left-mini-M3Academy.svg") background: url("https://agenciamagma.vteximg.com.br/arquivos/arrow-left-mini-M3Academy.svg")
no-repeat center center; no-repeat center center;
z-index: 4; z-index: 4;
left: 10px; border: none;
left: 20px;
} }
.slick-next { .slick-next {
background: url("https://agenciamagma.vteximg.com.br/arquivos/arrow-right-mini-M3Academy.svg")
no-repeat center center;
z-index: 4; z-index: 4;
right: 10px; border: none;
right: 20px;
} }
.slick-arrow.slick-hidden { .slick-arrow.slick-hidden {
display: none; display: none;

View File

@ -1,47 +1,202 @@
/* _footer.scss */ /* _footer.scss */
.footerCheckout { .footerCheckout {
border-top: none; border-top: none;
color: $color-gray2; color: $black-400;
.container {
width: 100%;
border-top: 1px solid $black-500;
@media (max-width: 1024px) {
flex-direction: column;
align-items: flex-start !important;
}
}
&__prateleira {
width: 1016px;
h2 {
font-family: $font-family-secundary;
font-style: normal;
font-weight: 400;
font-size: 24px;
line-height: 38px;
text-align: center;
color: $black-500;
}
.product-info {
display: flex !important;
flex-direction: column;
align-items: center;
padding-right: 16px;
width: auto !important;
}
figure {
width: 100%;
margin: 0;
}
figcaption {
font-family: $font-family;
font-style: normal;
font-weight: 400;
font-size: 13px;
line-height: 18px;
text-align: center;
color: $black-500;
margin-top: 20px;
}
ul {
font-size: 0;
display: flex;
align-items: center;
justify-content: center;
gap: 2.5px;
margin: 0;
.variation {
list-style: none;
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: $white;
background: $vivid-blue;
border: none;
border-radius: 8px;
padding: 5px 4px;
margin: 20px 0 20px 0;
}
}
.show-product {
background-color: $vivid-blue;
border: none;
border-radius: 8px;
font-family: "Open Sans";
font-style: normal;
font-weight: 700;
font-size: 13px;
line-height: 18px;
letter-spacing: 0.05em;
text-transform: uppercase;
width: 100%;
padding: 12px 0;
@media (max-width: 1024px) {
margin-bottom: 56px;
}
margin-bottom: 56px;
&:hover {
background-color: $vivid-blue-lighten;
}
&:active {
background-color: $vivid-blue-darker;
}
a {
color: $white;
text-decoration: none;
}
}
}
&__wrapper { &__wrapper {
align-items: center; align-items: center;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
position: relative;
margin-top: 56px;
@media (max-width: 1024px) {
}
.container {
border-top: 1px solid #000;
position: absolute;
}
} }
&__address { &__address {
color: $color-gray2; color: $black-400;
font-family: $font-family; font-family: $font-family;
font-style: normal; font-style: normal;
font-weight: normal; font-weight: normal;
font-size: 10px; font-size: 10px;
line-height: 12px; line-height: 14px;
text-transform: capitalize; text-transform: capitalize;
max-width: 40%; max-width: 40%;
@include mq(md, max) { @include mq(md, max) {
margin-bottom: 24px;
max-width: 100%; max-width: 100%;
} }
@media (min-width: 2500px) {
font-size: 20px;
line-height: 27px;
}
@media (max-width: 1024px) {
order: 2;
margin: 0 0 16px 16px;
}
} }
&__stamps { &__stamps {
margin: 0;
width: 32%;
align-items: center; align-items: center;
display: flex; display: flex;
justify-self: center; justify-self: center;
list-style: none; list-style: none;
gap: 13px;
@media (min-width: 2500px) {
width: 27.6%;
margin-top: 13px;
}
@media (max-width: 1024px) {
width: 90%;
margin: 22px 0 40px 16px;
}
@media (max-width: 375px) {
width: 91.2%;
order: 1;
gap: 4px;
// margin: 23px 0;
}
@include mq(md, max) { @include mq(md, max) {
align-self: center; align-self: center;
margin-bottom: 12px; // margin-bottom: 12px;
} }
&__divider { &__divider {
background-color: $color-gray4; content: "";
background-color: $gray-400;
display: inline-block; display: inline-block;
height: 24px; height: 24px;
margin: 0 8px; // margin: 0 8px;
width: 1px; width: 1px;
@media (min-width: 2500px) {
height: 42px;
}
} }
} }
@ -49,7 +204,42 @@
align-items: center; align-items: center;
display: flex; display: flex;
list-style-type: none; list-style-type: none;
margin: 0; color: $black-400;
margin: 27px 0 22px;
@media (max-width: 1024px) {
order: 3;
margin: 0;
margin: 0 0 19px 16px;
}
div {
display: flex;
}
.vtex-logo {
width: 44.92px;
@media (min-width: 2500px) {
width: 87.73px;
}
}
.m3-logo {
width: 28.66px;
@media (min-width: 2500px) {
width: 55.98px;
}
}
li .by-vtex {
gap: 12px;
}
li .by-m3 {
gap: 10.93px;
}
li:last-child { li:last-child {
margin-left: 16px; margin-left: 16px;
@ -57,17 +247,24 @@
a { a {
align-items: center; align-items: center;
color: $color-gray2; color: $black-400;
display: flex; display: flex;
font-family: $font-family; font-family: $font-family;
font-style: normal; font-style: normal;
font-weight: normal; font-weight: normal;
font-size: 10px; font-size: 9px;
line-height: 12px; line-height: 12px;
text-decoration: none; text-decoration: none;
span { span {
margin-right: 8px; font-size: 10px;
line-height: 14px;
// margin-right: 8px;
@media (min-width: 2500px) {
font-size: 18px;
line-height: 25px;
}
} }
} }
} }

View File

@ -1,32 +1,185 @@
/* _header.scss */ /* _header.scss */
.headerCheckout { .headerCheckout {
.container { .container {
width: auto !important; #progressBar {
width: 446px;
@media (max-width: 1024px) {
width: 0px;
}
ul {
list-style-type: none;
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 !important;
}
li .container-list {
width: 100%;
position: relative;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
}
li.central .container-list {
align-items: center;
margin-left: 7px;
}
li:last-child .container-list {
align-items: flex-end;
}
li .container-list 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;
font-size: 12px;
font-weight: 400;
line-height: 28px;
color: $black-500;
width: 39.9103%;
@media (min-width: 2500px) {
font-size: 24px;
}
}
@media (min-width: 2500px) {
width: 1078.86px;
}
}
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-500;
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-500;
}
li .progress-bar-line-1 {
position: absolute;
left: 31%;
transform: translateY(-50%);
bottom: 5px;
width: 174px;
height: 1px;
border-top: 1px solid $black-500;
@media (min-width: 2500px) {
left: 23%;
bottom: 11px;
width: 448px;
}
}
li .progress-bar-line-2 {
position: absolute;
right: 26%;
transform: translateY(-50%);
bottom: 5px;
width: 174px;
height: 1px;
border-top: 1px solid $black-500;
@media (min-width: 2500px) {
right: 21%;
bottom: 11px;
width: 448px;
}
}
} }
&__wrapper { &__wrapper {
align-items: center;
display: flex; display: flex;
align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 29px 0 29.86px;
} }
&__logo { &__logo {
width: 15.283%;
img { img {
height: 52px; height: auto;
width: auto; width: 100%;
}
@media (min-width: 2500px) {
width: 19.213%;
}
@media screen and (min-width: 376px) and (max-width: 1024px) {
width: 16.59%;
}
@media (max-width: 375px) {
width: 41.49%;
} }
} }
&__safeBuy { &__safeBuy {
display: flex;
justify-content: center;
span { span {
align-items: center;
display: flex; display: flex;
align-items: center;
text-transform: uppercase; text-transform: uppercase;
font-family: $font-family; font-family: $font-family;
font-style: normal; font-style: normal;
font-weight: normal; font-weight: normal;
font-size: 12px; font-size: 12px;
line-height: 14px; line-height: 14px;
color: $color-gray; padding: 0 0 0 8px;
color: $black-400;
@media (max-width: 1024px) {
}
@media (min-width: 2500px) {
font-size: 24px;
line-height: 33px;
}
}
img {
width: 12px;
@media (min-width: 2500px) {
width: 29.47px;
}
} }
i { i {

View File

@ -1 +1,76 @@
/* _prateleira.scss */ // /* _prateleira.scss */
// .slick-slider .slick-list {
// }
// // .footerCheckout {
// // &__prateleira {
// // h2 {
// // font-family: $font-family-secundary;
// // font-style: normal;
// // font-weight: 400;
// // font-size: 24px;
// // line-height: 38px;
// // text-align: center;
// // color: $black-500;
// // }
// &__carrossel-itens {
// .product-name {
// font-style: normal;
// font-weight: 400;
// font-size: 13px;
// line-height: 18px;
// text-align: center;
// color: $black-500;
// }
// .product-variation {
// display: flex;
// align-items: center;
// &__variation {
// font-family: "Open Sans";
// font-style: normal;
// font-weight: 700;
// font-size: 13px;
// line-height: 18px;
// text-align: center;
// letter-spacing: 0.05em;
// text-transform: uppercase;
// color: $white;
// background: $vivid-blue;
// border: none;
// border-radius: 8px;
// padding: 5px 4px;
// margin: 20px 0 20px 0;
// gap: 5px;
// }
// .show-product {
// background-color: $vivid-blue;
// color: $white;
// border: none;
// border-radius: 8px;
// font-family: "Open Sans";
// font-style: normal;
// font-weight: 700;
// font-size: 13px;
// line-height: 18px;
// letter-spacing: 0.05em;
// text-transform: uppercase;
// padding: 12px 72px;
// &:hover {
// background-color: $vivid-blue-lighten;
// }
// &:active {
// background-color: $vivid-blue-darker;
// }
// }
// }
// }
// // }
// // }

View File

@ -2,37 +2,49 @@
@import url("https://fonts.googleapis.com/css2?family=Tenor+Sans&display=swap"); @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"); @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: "Open Sans", sans-serif;
$font-family-secundary:"Tenor Sans", sans-serif; $font-family-secundary: "Tenor Sans", sans-serif;
/* Colors */ /* Colors */
$color-black: #292929;
$color-white: #fff; $white: #ffffff;
$color-gray: #6c6c6c; $gray-25: #f2f2f2;
$color-gray2: #7d7d7d; $gray-50: #e0e0e0;
$color-gray3: #f0f0f0; $gray-100: #ededed;
$color-gray4: #8d8d8d; $gray-200: #e5e5e5;
$color-gray5: #e5e5e5; $gray-300: #f0f0f0;
$gray-400: #c4c4c4;
$gray-500: #989898;
$gray-600: #858585;
$gray-700: #7d7d7d;
$gray-800: #808080;
$gray-900: #828282;
$color-blue: #4267b2; $black-400: #292929;
$black-500: #000000;
$color-green: #4caf50; $vivid-blue: #00C8FF;
$vivid-blue-lighten: #57dbff;
$vivid-blue-darker: #00b0e0;
$green: #298541;
$green-lighten: #2fa34e;
$green-darker: #185428;
/* Grid breakpoints */ /* Grid breakpoints */
$grid-breakpoints: ( $grid-breakpoints: (
xs: 0, xs: 0,
cstm: 400, cstm: 400,
sm: 576px, sm: 576px,
md: 768px, md: 768px,
lg: 992px, lg: 992px,
xl: 1200px xl: 1200px,
) !default; ) !default;
$z-index: ( $z-index: (
level1: 5, level1: 5,
level2: 10, level2: 10,
level3: 15, level3: 15,
level4: 20, level4: 20,
level5: 25 level5: 25,
) !default; ) !default;