Merge pull request 'feature/m3-academy-template-checkout' (#1) from feature/m3-academy-template-checkout into main

Reviewed-on: #1
This commit is contained in:
Eleonora Otz de Mendonça Soares 2022-12-18 23:54:08 +00:00
commit eb4f6e2dcb
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) {
event.target.classList.toggle("closed");
event.target.nextElementSibling.classList.toggle(
"dropdown__content--closed"
);
event.target.nextElementSibling.classList.toggle("dropdown__content--closed");
}
init() {
this.configThumb();
this.hideTitle();
waitForEl(".product-image img", this.resizeImages.bind(this));
$(window).on("orderFormUpdated.vtex", this.resizeImages.bind(this));
}
@ -56,14 +55,28 @@ export default class CheckoutUI {
resizeImages() {
$(".product-image img").each((i, el) => {
const $el = $(el);
$el.attr(
"src",
alterarTamanhoImagemSrcVtex(
$el.attr("src"),
this.width,
this.height
)
);
$el.attr("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() {
this.list = await this.fetchPrateleira();
await this.selectors();
// this.onUpdate();
this.createPrateleira();
this.prateleira = await waitElement(".footerCheckout__carrossel-itens");
this.itensPrateleira();
this.addCarrossel();
this.creditCardIconsHTML();
this.developedByIconsHTML();
}
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.itensP = await waitElement(".footerCheckout__prateleira", {
timeout: 5000,
interval: 1000,
});
this.creditCardIcons = await waitElement(".footerCheckout__stamps");
this.developedByIcons = await waitElement(".footerCheckout__developedBy");
}
onUpdate() {
@ -30,11 +42,110 @@ export default class Footer {
observer.observe(target, config);
}
async addCarrossel() {
const elemento = await waitElement("#my-element");
$(elemento).slick({
slidesToShow: 4,
slidesToScroll: 1,
createPrateleira() {
if (this.itensP) {
this.itensP.innerHTML = `
<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";
export default class Header {
@ -8,14 +8,136 @@ 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="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/footer";
@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 {
.client-pre-email {
border-color: $color-gray4;
font-family: $font-family;
padding-top: 8px;
.client-pre-email {
border-color: $black-500;
padding-top: 8px;
.link-cart {
a {
color: $color-black;
font-size: 14px;
@media (max-width: 375px) {
width: 91.47%;
}
&:hover {
color: lighen($color-black, 10);
}
}
}
label {
font-family: $font-family-secundary;
text-transform: uppercase;
color: $black-500;
}
.pre-email {
flex-direction: column;
display: flex;
align-items: center;
justify-content: center;
.link-cart {
a {
color: $black-500;
font-family: $font-family-secundary;
font-size: 14px;
line-height: 16px;
text-transform: uppercase;
h3 {
margin-bottom: 16px;
@media (max-width: 375px) {
font-size: 10px;
line-height: 12px;
}
span {
color: #303030;
font-size: 24px;
}
&:hover {
color: $black-400;
}
}
}
small {
color: $color-gray4;
}
}
}
.pre-email {
flex-direction: column;
display: flex;
align-items: center;
justify-content: center;
.client-email {
margin: 0 0 16px;
h3 {
margin-bottom: 16px;
input {
box-shadow: none;
color: $color-black;
font-family: $font-family;
padding: 0 16px;
border: 2px solid $color-gray3;
box-sizing: border-box;
border-radius: 5px;
span {
color: $black-500;
font-size: 20px;
@media (max-width: 490px) {
width: auto;
}
}
@media (max-width: 375px) {
font-size: 12px;
line-height: 14px;
}
}
button {
background-color: $color-black;
border-radius: 5px;
border: none;
font-family: $font-family;
height: 54px;
right: 0;
top: 0;
small {
color: $black-500;
}
}
}
@media (max-width: 490px) {
height: 48px;
margin: 0;
position: absolute;
}
}
.client-email {
margin: 0 0 16px;
span.help.error {
color: red;
}
}
input {
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 {
padding: 16px;
background-color: $color-white;
border: 1px solid $color-gray4;
border-radius: 0;
&::placeholder {
color: $black-500;
}
h3 {
color: #303030;
margin: 0 0 8px 0;
}
@media (max-width: 490px) {
width: auto;
}
}
ul {
margin: 0;
button {
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 {
span {
color: $color-black;
}
&:hover {
background-color: $vivid-blue-lighten;
}
i::before {
color: $color-black;
font-size: 1rem;
opacity: 1;
}
}
}
&:active {
background-color: $vivid-blue-darker;
}
i::before {
color: $color-black;
font-size: 6rem;
opacity: 0.5;
}
}
}
@media (max-width: 375px) {
right: -3px;
margin: 0;
position: absolute;
}
}
.shipping-data,
.payment-data,
.client-profile-data {
.accordion-group {
border-radius: 0;
border: 1px solid $color-gray4;
font-family: $font-family;
padding: 16px;
span.help.error {
color: red;
font-family: $font-family;
font-weight: 700;
font-size: 12px;
line-height: 16px;
}
}
.accordion-heading {
span {
color: #303030;
margin-bottom: 8px;
padding: 0;
.emailInfo {
padding: 16px;
background-color: #fff;
border: 1px solid $black-500;
border-radius: 5px;
margin-top: 47px;
i::before {
fill: #303030;
}
}
h3 {
font-family: $font-family;
font-weight: 700;
margin: 0 0 8px 0;
}
a {
align-items: center;
background-color: #303030;
border-radius: 8px;
border: none;
color: $color-white;
display: flex;
justify-content: center;
padding: 6px 5px 6px 8px;
}
}
ul {
margin: 0;
.accordion-inner {
padding: 0;
li {
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 {
color: $color-black;
}
i::before {
color: #292929;
font-size: 6rem;
opacity: 0.5;
}
}
}
p {
label {
color: $color-black;
font-weight: 500;
}
.shipping-data,
.payment-data,
.client-profile-data {
.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,
input {
border-radius: 0;
border: 1px solid $color-gray4;
box-shadow: none;
}
.accordion-heading {
span {
font-family: $font-family-secundary;
font-size: 16px;
line-height: 19px;
color: $black-400;
margin-bottom: 25px;
padding: 0;
.help.error {
color: red;
}
}
i::before {
display: none;
}
}
.box-client-info-pj {
.link a#is-corporate-client,
.link a#not-corporate-client {
color: $color-black;
font-weight: 500;
text-decoration: underline;
}
}
a {
display: block !important;
background: transparent;
border: none;
box-shadow: none;
width: 6.11%;
cursor: pointer;
.state-inscription-box span {
font-weight: 500;
}
.icon-edit {
content: url("https://agenciamagma.vteximg.com.br/arquivos/lapisM3Academy.png");
width: 100%;
}
}
}
button.submit {
border: none;
border-radius: 5px;
background: $color-black;
margin-top: 8px;
outline: none;
transition: all 0.2s linear;
.accordion-inner {
padding: 0;
&:hover {
background: lighten($color-black, 5);
}
tr {
td.info {
border-bottom: 1px solid $gray-700;
}
}
&:active {
background: darken($color-black, 5);
}
}
/* General configurations */
/* Shipping configurations */
.box-step {
.link-gift-card {
display: none;
}
}
.ship-postalCode small a {
color: #303030;
font-weight: 500;
text-decoration: underline;
}
.box-info {
font-size: 12px;
line-height: 16px;
color: $gray-700;
}
.vtex-omnishipping-1-x-deliveryGroup {
p {
color: #303030;
font-size: 14px;
font-weight: 500;
}
.client-notice {
display: none;
}
.shp-lean {
border: 1px solid $color-gray4;
border-radius: 0;
p {
position: relative;
margin-bottom: 6px;
color: $gray-700;
label {
background-color: $color-white;
box-shadow: none;
color: #303030;
padding: 8px 12px;
label {
// color: $gray-800;
font-size: 14px;
font-weight: 700;
margin-bottom: 1px;
}
svg path {
fill: #d8c8ac;
}
}
}
}
select,
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 {
color: #303030;
font-size: 14px;
font-weight: 500;
}
.help.error {
color: red;
font-size: 9px;
margin: 0;
}
}
.shp-summary-group-info {
border-color: $color-gray4;
}
.box-client-info-pj {
display: none;
.link a#is-corporate-client,
.link a#not-corporate-client {
display: none;
// color: #292929;
// font-weight: 500;
// text-decoration: underline;
}
.address-summary {
background: none;
border-color: $color-gray4;
border-radius: 0;
color: #303030;
padding: 12px;
.link {
display: none;
}
}
@include mq(md, max) {
background-position: 8px 9px;
}
.state-inscription-box span {
font-weight: 500;
}
a {
color: #303030;
font-weight: 500;
text-decoration: underline;
}
}
button.submit {
width: 100%;
border: none;
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,
.shp-summary-package {
color: $color-gray4;
}
&:hover {
background: $vivid-blue-lighten;
}
.shp-summary-group-price {
padding-right: 16px;
}
&:active {
background: $vivid-blue-darker;
}
}
.shp-summary-package {
padding-left: 16px;
}
/* Shipping configurations */
.vtex-omnishipping-1-x-summaryChange {
border-color: #303030;
color: #303030;
}
.ship-country {
display: none;
}
.vtex-omnishipping-1-x-deliveryChannelsToggle {
background-color: #d8c8ac;
border: 1px solid #d8c8ac;
}
.ship-postalCode {
display: flex;
flex-direction: column;
.vtex-omnishipping-1-x-deliveryOptionActive {
text-shadow: 1.3px 1px lighten($color-black, 50);
}
}
}
}
label {
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-right: 0;
float: right;
@media (max-width: 1024px) {
width: 100%;
}
.quantity {
background-color: $vivid-blue;
color: $white;
}
}
.orderform-template-holder {
width: 66.1132%;
@media (max-width: 1024px) {
width: 100%;
}
}
}

View File

@ -1,38 +1,75 @@
.empty-cart {
font-family: $font-family;
&-content {
color: $color-black;
text-align: center;
font-family: $font-family;
&-content {
color: #292929;
text-align: center;
align-items: center;
margin: 170px 0 264px 0;
@include mq(md, max) {
padding: 0 16px;
}
}
@include mq(md, max) {
padding: 0 16px;
}
&-title {
font-size: 20px;
}
@media (max-width: 1024px) {
margin-bottom: 262px;
}
}
&-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;
&-title {
align-items: center;
font-family: $font-family;
font-weight: 700;
font-size: 24px;
line-height: 33px;
text-transform: uppercase;
margin-bottom: 35px;
&:hover {
background: lighten($color-black, 5);
}
}
}
@media (max-width: 1024px) {
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%;
}
footer .footerCheckout__wrapper {
width: 94.9734%;
margin: auto auto 0 auto;
width: 100%;
}
footer .footerCheckout__prateleira,
footer .footerCheckout__wrapper .container {
display: flex;
align-items: center;
justify-content: space-between;
}
header {
border-bottom: 1px solid $black-500;
}
footer .footerCheckout__prateleira,
.headerCheckout .container {
width: 79.53125%;
margin: 0 auto;
@media (max-width: 1024px) {
width: 91.47%;
}
}
body {
@ -50,35 +66,49 @@ body {
.container-order-form,
.container-cart {
width: 80%;
@media (max-width: 1024px) {
width: 100%;
}
}
}
.btn-success {
background: $color-black;
text-shadow: none;
border: 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 {
background: lighten($color-black, 15%);
background: lighten(#292929, 15%);
}
}
.emailInfo h3 {
color: $color-black !important;
color: #292929 !important;
}
#cart-title,
#orderform-title {
color: $color-gray2;
color: $black-400;
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 16px;
letter-spacing: 0.05em;
text-transform: uppercase;
@include mq(md, max) {
margin-left: 30px;
@media (max-width: 1024px) {
text-align: left;
margin-left: 16px;
}
}
@ -96,7 +126,7 @@ body {
&::before,
&::after {
content: "";
background: $color-gray2;
background: #7d7d7d;
display: block;
float: right;
height: 2px;

View File

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

View File

@ -1,47 +1,202 @@
/* _footer.scss */
.footerCheckout {
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 {
align-items: center;
display: flex;
justify-content: space-between;
position: relative;
margin-top: 56px;
@media (max-width: 1024px) {
}
.container {
border-top: 1px solid #000;
position: absolute;
}
}
&__address {
color: $color-gray2;
color: $black-400;
font-family: $font-family;
font-style: normal;
font-weight: normal;
font-size: 10px;
line-height: 12px;
line-height: 14px;
text-transform: capitalize;
max-width: 40%;
@include mq(md, max) {
margin-bottom: 24px;
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 {
margin: 0;
width: 32%;
align-items: center;
display: flex;
justify-self: center;
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) {
align-self: center;
margin-bottom: 12px;
// margin-bottom: 12px;
}
&__divider {
background-color: $color-gray4;
content: "";
background-color: $gray-400;
display: inline-block;
height: 24px;
margin: 0 8px;
// margin: 0 8px;
width: 1px;
@media (min-width: 2500px) {
height: 42px;
}
}
}
@ -49,7 +204,42 @@
align-items: center;
display: flex;
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 {
margin-left: 16px;
@ -57,17 +247,24 @@
a {
align-items: center;
color: $color-gray2;
color: $black-400;
display: flex;
font-family: $font-family;
font-style: normal;
font-weight: normal;
font-size: 10px;
font-size: 9px;
line-height: 12px;
text-decoration: none;
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 */
.headerCheckout {
.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 {
align-items: center;
display: flex;
align-items: center;
justify-content: space-between;
padding: 29px 0 29.86px;
}
&__logo {
width: 15.283%;
img {
height: 52px;
width: auto;
height: 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 {
display: flex;
justify-content: center;
span {
align-items: center;
display: flex;
align-items: center;
text-transform: uppercase;
font-family: $font-family;
font-style: normal;
font-weight: normal;
font-size: 12px;
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 {

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=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-white: #fff;
$white: #ffffff;
$color-gray: #6c6c6c;
$color-gray2: #7d7d7d;
$color-gray3: #f0f0f0;
$color-gray4: #8d8d8d;
$color-gray5: #e5e5e5;
$gray-25: #f2f2f2;
$gray-50: #e0e0e0;
$gray-100: #ededed;
$gray-200: #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: (
xs: 0,
cstm: 400,
sm: 576px,
md: 768px,
lg: 992px,
xl: 1200px
xs: 0,
cstm: 400,
sm: 576px,
md: 768px,
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;