develop #14

Merged
ManuelaLuanaSchumackerTavares merged 26 commits from develop into main 2022-12-18 21:45:24 +00:00
10 changed files with 1563 additions and 380 deletions

View File

@ -6,35 +6,185 @@ export default class Footer {
}
async init() {
this.list = await this.apiRequest();
await this.selectors();
// this.onUpdate();
this.footerIcons();
if (window.location.hash === "#/cart") {
await this.onUpdate();
}
this.shelfItem = await waitElement(".footerCheckout__shelfList");
await this.createShelf();
this.events();
this.addCarrossel();
}
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.CredicardIcon = await waitElement(".footerCheckout__payments");
this.vtexPciIcon = await waitElement(".footerCheckout__vtexpci");
this.shelf = await waitElement(".footerCheckout__prateleira");
this.checkoutVazio = await waitElement(".empty-cart-content");
}
onUpdate() {
events() {
window.addEventListener("hashchange", this.hashChange.bind(this));
}
async onUpdate() {
//Função qeu fará a verificação se o carrinho está vazio para remover a prateleira de produtos:
// vocês devem olhar a doc fornecida no Desafio para aprender a usar a MutationObserver
// sempre que o carrinho estiver vazio o elemento chcekoutVazio fica display: none e isso pode ser usado como atributo para a MutationObserver
let target = this.checkoutVazio;
let config = { childList: true, attributes: true };
let observer = new MutationObserver((mutations) => {
mutations.forEach(function (mutation) {
console.log(mutation.type);
console.log("ndidubazsbf");
mutations.map((mutation) => {
if (mutation.target.attributes.style.nodeValue == "display: none;") {
this.createContainerShelf();
} else if (mutation.target.attributes.style.nodeValue == "display: block;") {
this.removeShelf();
}
});
});
observer.observe(target, config);
}
createContainerShelf() {
this.shelf.innerHTML = `
<div class="footerCheckout__prateleira-title">
<h2>Você também pode gostar:</h2>
</div>
<ul class="footerCheckout__shelfList"></ul>
`;
}
hashChange(e) {
console.log(e);
if (e.newURL !== "https://m3academy.myvtex.com/checkout/#/cart") {
this.shelf.classList.add("desativado");
} else {
this.shelf.classList.remove("desativado");
}
}
createShelf() {
let structure = "";
this.list.forEach((resp) => {
const sku = resp.skus.map((item) => `<li>${item}</li>`).join("");
structure += `
<li class="footerCheckout__shelf-card">
<figure><img src="${resp.img}"/></figure>
<figcaption>${resp.name}</figcaption>
<div class="sku-list"><ul class="skus">${sku}</ul></div>
<button class="button-list" type="button"><a href="${resp.link}">ver produtos</a></button>
</li>
`;
});
this.shelfItem.innerHTML = structure;
}
removeShelf() {
this.shelf.innerHTML = "";
}
async apiRequest() {
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 objInfo = data.map((res) => ({
img: res.items[0].images[0].imageUrl,
name: res.productName,
skus: res.items.map((item) => item.name),
link: res.link,
}));
return objInfo;
});
}
async addCarrossel() {
const elemento = await waitElement("#my-element");
const elemento = await waitElement(".footerCheckout__shelfList");
$(elemento).slick({
slidesToShow: 4,
slidesToScroll: 1,
infinite: false,
arrows: true,
responsive: [
{
breakpoint: 1025,
settings: {
slidesToShow: 3,
slidesToScroll: 1,
infinite: false,
arrows: true,
},
},
{
breakpoint: 992,
settings: {
slidesToShow: 2,
slidesToScroll: 1,
infinite: false,
arrows: true,
},
},
{
breakpoint: 374,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
infinite: false,
arrows: true,
},
},
],
});
}
footerIcons() {
if (this.CredicardIcon) {
this.CredicardIcon.innerHTML = `
<figure><img src="https://agenciamagma.vteximg.com.br/arquivos/masterCardM3Academy.png" alt="MasterCard" title="MasterCard"/></figure>
<figure><img src="https://agenciamagma.vteximg.com.br/arquivos/visaM3Academy.png" alt="Visa" title="Visa"/></figure>
<figure><img src="https://agenciamagma.vteximg.com.br/arquivos/amexM3Academy.png" alt="American Express" title="American Express"/></figure>
<figure><img src="https://agenciamagma.vteximg.com.br/arquivos/eloM3Academy.png" alt="Elo" title="Elo"/></figure>
<figure><img src="https://agenciamagma.vteximg.com.br/arquivos/hiperCardM3Academy.png" alt="HiperCard" title="HiperCard"/></figure>
<figure><img src="https://agenciamagma.vteximg.com.br/arquivos/payPalM3Academy.png" alt="Paypal" title="Paypal"/></figure>
<figure><img src="https://agenciamagma.vteximg.com.br/arquivos/boletoM3Academy.png" alt="Boleto" title="Boletoa"/></figure>
`;
}
if (this.vtexPciIcon) {
this.vtexPciIcon.innerHTML = `
<figure><img src="https://agenciamagma.vteximg.com.br/arquivos/vtexPCIM3Academy.png" alt="VTEX PCI Certified" title="VTEX PCI Certified"/></figure>
`;
}
const footerDevelopedBy = document.getElementsByClassName("footerCheckout__developedBy");
if (footerDevelopedBy) {
const vtexIcon = footerDevelopedBy[0].children[0].children[0];
const m3Icon = footerDevelopedBy[0].children[1].children[0];
vtexIcon.innerHTML = `
<span>Powered By</span>
<figure><img src="https://agenciamagma.vteximg.com.br/arquivos/logoVTEXM3Academy.png" alt="VTEX" title="VTEX" /></figure>
`;
m3Icon.innerHTML = `
<span>Developed By</span>
<figure><img src="https://agenciamagma.vteximg.com.br/arquivos/logoM3M3Academy.png" alt="M3" title="M3" /></figure>
`;
}
}
}

View File

@ -8,14 +8,250 @@ export default class Header {
async init() {
await this.selectors();
console.log(this.item);
this.progressBarContent();
await this.progressBarDot();
}
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");
}
progressBarContent() {
// console.log(this.progressBar.innerHTML);
if (this.progressBar && window.innerWidth > 1024) {
this.progressBar.innerHTML = `
<ul>
<li>
<div class="containerProgressBar">
<div>
<p class="progress-bar-first-text">Meu carrinho</p>
<p id="progress-bar-first-circle" class="progress-bar-first-circle"></p>
<p class="progress-bar-first-line"></p>
</div>
</div>
</li>
<li class="center-li">
<div class="containerProgressBar">
<div>
<p>Dados Pessoais</p>
<p id="progress-bar-second-circle" class="progress-bar-second-circle"></p>
</div>
</div>
</li>
<li>
<div class="containerProgressBar">
<div>
<p>Pagamento</p>
<p id="progress-bar-third-circle" class="progress-bar-third-circle"></p>
<p class="progress-bar-second-line"></p>
</div>
</div>
</li>
</ul>
`;
}
if (this.progressBar && window.innerWidth <= 1024) {
this.progressBar.innerHTML = ``;
}
}
async progressBarDot() {
if (this.progressBar && window.innerWidth > 1024) {
const progressList = document.querySelectorAll("#progressBar ul li");
progressList.forEach((li) => {
if (window.location.href === "https://m3academy.myvtex.com/checkout/#/cart") {
if (li.children[0].children[0].children["progress-bar-first-circle"]) {
li.children[0].children[0].children[
"progress-bar-first-circle"
].classList.add("active");
}
if (li.children[0].children[0].children["progress-bar-second-circle"]) {
if (
li.children[0].children[0].children[
"progress-bar-second-circle"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progress-bar-second-circle"
].classList.remove("active");
}
}
if (li.children[0].children[0].children["progress-bar-third-circle"]) {
if (
li.children[0].children[0].children[
"progress-bar-third-circle"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progress-bar-third-circle"
].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-first-circle"]) {
if (
li.children[0].children[0].children[
"progress-bar-first-circle"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progress-bar-first-circle"
].classList.remove("active");
}
}
if (li.children[0].children[0].children["progress-bar-second-circle"]) {
li.children[0].children[0].children[
"progress-bar-second-circle"
].classList.add("active");
}
if (li.children[0].children[0].children["progress-bar-third-circle"]) {
if (
li.children[0].children[0].children[
"progress-bar-third-circle"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progress-bar-third-circle"
].classList.remove("active");
}
}
} else if (
window.location.href === "https://m3academy.myvtex.com/checkout/#/payment"
) {
if (li.children[0].children[0].children["progress-bar-first-circle"]) {
if (
li.children[0].children[0].children[
"progress-bar-first-circle"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progress-bar-first-circle"
].classList.remove("active");
}
}
if (li.children[0].children[0].children["progress-bar-second-circle"]) {
if (
li.children[0].children[0].children[
"progress-bar-second-circle"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progress-bar-second-circle"
].classList.remove("active");
}
}
if (li.children[0].children[0].children["progress-bar-third-circle"]) {
li.children[0].children[0].children[
"progress-bar-third-circle"
].classList.add("active");
}
}
this.progressBarWhenHashChange();
});
}
}
progressBarWhenHashChange() {
const progressList = document.querySelectorAll("#progressBar ul li");
progressList.forEach((li) => {
window.addEventListener("hashchange", () => {
if (window.location.hash == "#/cart") {
if (li.children[0].children[0].children["progress-bar-first-circle"]) {
li.children[0].children[0].children[
"progress-bar-first-circle"
].classList.add("active");
}
if (li.children[0].children[0].children["progress-bar-second-circle"]) {
if (
li.children[0].children[0].children[
"progress-bar-second-circle"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progress-bar-second-circle"
].classList.remove("active");
}
}
if (li.children[0].children[0].children["progress-bar-third-circle"]) {
if (
li.children[0].children[0].children[
"progress-bar-third-circle"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progress-bar-third-circle"
].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-first-circle"]) {
if (
li.children[0].children[0].children[
"progress-bar-first-circle"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progress-bar-first-circle"
].classList.remove("active");
}
}
if (li.children[0].children[0].children["progress-bar-second-circle"]) {
li.children[0].children[0].children[
"progress-bar-second-circle"
].classList.add("active");
}
if (li.children[0].children[0].children["progress-bar-third-circle"]) {
if (
li.children[0].children[0].children[
"progress-bar-third-circle"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progress-bar-third-circle"
].classList.remove("active");
}
}
} else if (window.location.hash == "#/payment") {
if (li.children[0].children[0].children["progress-bar-first-circle"]) {
if (
li.children[0].children[0].children[
"progress-bar-first-circle"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progress-bar-first-circle"
].classList.remove("active");
}
}
if (li.children[0].children[0].children["progress-bar-second-circle"]) {
if (
li.children[0].children[0].children[
"progress-bar-second-circle"
].classList.contains("active")
) {
li.children[0].children[0].children[
"progress-bar-second-circle"
].classList.remove("active");
}
}
if (li.children[0].children[0].children["progress-bar-third-circle"]) {
li.children[0].children[0].children[
"progress-bar-third-circle"
].classList.add("active");
}
}
});
});
}
}

View File

@ -3,11 +3,16 @@
border-color: $color-gray4;
font-family: $font-family;
padding-top: 8px;
border-top: 1px solid $color-black2;
.link-cart {
a {
color: $color-black;
color: $color-black2;
font-family: $font-family-secundary;
font-size: 14px;
font-size: 14px;
line-height: 16px;
text-transform: uppercase;
&:hover {
color: lighen($color-black, 10);
@ -25,12 +30,19 @@
margin-bottom: 16px;
span {
color: #303030;
font-size: 24px;
font-family: $font-family-secundary;
color: $color-black2;
font-size: 20px;
line-height: 23px;
text-transform: uppercase;
}
small {
color: $color-gray4;
font-family: $font-family-secundary;
color: $color-black2;
font-size: 20px;
line-height: 23px;
text-transform: uppercase;
}
}
}
@ -40,12 +52,19 @@
input {
box-shadow: none;
color: $color-black;
font-weight: 400;
font-size: 12px;
line-height: 16px;
font-family: $font-family;
padding: 0 16px;
border: 2px solid $color-gray3;
height: 52px;
box-sizing: border-box;
border-radius: 5px;
border: 1px solid $color-black2;
border-radius: 5px 8px 8px 5px;
&::-webkit-input-placeholder {
color: $color-black2 !important;
}
@media (max-width: 490px) {
width: auto;
@ -53,13 +72,19 @@
}
button {
background-color: $color-black;
border-radius: 5px;
background-color: $color-blue2;
border-radius: 0px 8px 8px 0px;
border: none;
font-family: $font-family;
height: 54px;
font-size: 14px;
line-height: 19px;
text-transform: uppercase;
color: $color-black2;
padding: 12.46px 14.41px;
height: 52px;
right: 0;
top: 0;
cursor: pointer;
@media (max-width: 490px) {
height: 48px;
@ -69,18 +94,25 @@
}
span.help.error {
color: red;
color: $color-red;
font-weight: 700;
font-size: 12px;
line-height: 16px;
}
}
.emailInfo {
padding: 16px;
background-color: $color-white;
border: 1px solid $color-gray4;
border-radius: 0;
border: 1px solid $color-black2;
border-radius: 5px;
h3 {
color: #303030;
font-family: $font-family;
color: $color-black2;
font-weight: 700;
font-size: 12px;
line-height: 16px;
margin: 0 0 8px 0;
}
@ -89,11 +121,15 @@
li {
span {
color: $color-black;
font-family: $color-black2;
color: $color-black2;
font-weight: 700;
font-size: 12px;
line-height: 16px;
}
i::before {
color: $color-black;
color: $color-blue2;
font-size: 1rem;
opacity: 1;
}
@ -108,12 +144,29 @@
}
}
.client-profile-data {
.accordion-heading {
span {
span {
font-size: 0;
&::before {
content: "Identificação";
font-family: $font-family-secundary;
font-weight: 400;
font-size: 16px;
line-height: 19px;
}
}
}
}
}
.shipping-data,
.payment-data,
.client-profile-data {
.accordion-group {
border-radius: 0;
border: 1px solid $color-gray4;
border: 1px solid $color-gray3;
border-radius: 8px;
font-family: $font-family;
padding: 16px;
@ -124,13 +177,19 @@
padding: 0;
i::before {
display: none;
fill: #303030;
}
}
a {
background: url("https://agenciamagma.vteximg.com.br/arquivos/lapisM3Academy.png")
no-repeat center;
align-items: center;
background-color: #303030;
width: 30px;
height: 30px;
z-index: 6;
// background-color: #303030;
border-radius: 8px;
border: none;
color: $color-white;
@ -147,27 +206,43 @@
.client-notice {
color: $color-black;
font-size: 0;
}
#is-corporate-client {
font-size: 0;
}
p {
label {
color: $color-black;
font-weight: 500;
font-family: $font-family;
color: $color-gray2;
font-weight: 400;
font-size: 14px;
line-height: 19px;
}
select,
input {
border-radius: 0;
border: 1px solid $color-gray4;
border: 1px solid $color-gray8;
border-radius: 5px;
// height: 42px;
box-shadow: none;
}
#client-phone,
#client-document {
height: 44px;
}
.help.error {
color: red;
}
}
.box-client-info-pj {
display: none;
.link a#is-corporate-client,
.link a#not-corporate-client {
color: $color-black;
@ -182,11 +257,17 @@
button.submit {
border: none;
border-radius: 5px;
background: $color-black;
margin-top: 8px;
border-radius: 8px;
width: 100%;
font-weight: 700;
font-size: 14px;
line-height: 19px;
text-transform: uppercase;
background: $color-blue2;
margin-top: 45px;
outline: none;
transition: all 0.2s linear;
cursor: pointer;
&:hover {
background: lighten($color-black, 5);
@ -199,22 +280,34 @@
/* Shipping configurations */
.ship-postalCode {
input {
width: 95% !important;
max-width: 95% !important;
height: 45px;
}
}
.ship-postalCode small a {
color: #303030;
font-weight: 500;
text-decoration: underline;
color: $color-black;
// display: flex;
font-weight: 400;
font-size: 12px;
line-height: 16px;
text-decoration-line: underline;
}
.vtex-omnishipping-1-x-deliveryGroup {
p {
color: #303030;
color: $color-gray2;
font-style: normal;
font-weight: 700;
font-size: 14px;
font-weight: 500;
line-height: 19px;
}
.shp-lean {
border: 1px solid $color-gray4;
border-radius: 0;
border: 1px solid $color-gray8;
border-radius: 8px;
label {
background-color: $color-white;
@ -223,16 +316,19 @@
padding: 8px 12px;
svg path {
fill: #d8c8ac;
// fill: #d8c8ac;
background: #00c8ff;
border-radius: 3px;
}
}
}
}
.delivery-address-title {
color: #303030;
font-size: 14px;
font-weight: 500;
font-weight: 700;
font-size: 12px;
line-height: 16px;
color: $color-gray2;
}
.shp-summary-group-info {
@ -241,9 +337,11 @@
.address-summary {
background: none;
border-color: $color-gray4;
border-radius: 0;
color: #303030;
border-color: $color-gray8;
border-radius: 8px;
font-weight: 400;
font-size: 12px;
line-height: 16px;
padding: 12px;
@include mq(md, max) {
@ -251,9 +349,59 @@
}
a {
color: #303030;
font-weight: 500;
text-decoration: underline;
font-size: 0;
&::after {
content: "alterar";
font-weight: 400;
font-size: 12px;
line-height: 16px;
color: $color-blue2;
text-decoration: none;
}
}
}
#payment-group-MercadoPagoPaymentGroup .payment-group-item-text,
#payment-group-bankInvoicePaymentGroup .payment-group-item-text,
#payment-group-creditCardPaymentGroup .payment-group-item-text,
#payment-group-creditCardPaymentGroup .payment-group-item-text,
#payment-group-instantPaymentPaymentGroup[data-name="Pix"]
.payment-group-item-text {
background-image: none;
}
.payment-group-item {
border: 1px solid $color-black2 !important;
border-radius: 6px;
display: block;
margin-left: 5px;
margin-right: 40px;
margin-top: 12px;
opacity: 0.7;
width: 100%;
padding: 0 18px 0 8px;
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
span {
text-align: center;
color: $color-gray10 !important;
padding-right: 0;
font-family: $font-family;
font-weight: 400;
font-size: 14px;
line-height: 24px;
&::selection {
color: $color-red2 !important;
}
}
&:focus {
border-color: $color-red2 !important;
}
}
@ -275,13 +423,18 @@
color: #303030;
}
.vtex-omnishipping-1-x-addressFormPart1 small {
margin: 0;
}
.vtex-omnishipping-1-x-deliveryChannelsToggle {
background-color: #d8c8ac;
border: 1px solid #d8c8ac;
background-color: $color-white;
border: 1px solid $color-black;
}
.vtex-omnishipping-1-x-deliveryOptionActive {
text-shadow: 1.3px 1px lighten($color-black, 50);
color: $color-black;
// text-shadow: 1.3px 1px lighten($color-black, 50);
}
}
}

View File

@ -13,7 +13,7 @@
display: none;
}
.cart {
border: 3px solid $color-gray3;
border: 1px solid $color-gray3;
box-sizing: border-box;
border-radius: 5px;
padding: 16px;
@ -105,19 +105,70 @@
background-color: $color-white;
}
.checkout-container {
overflow: 0 !important;
@media (max-width: 1024px) {
overflow: hidden !important;
}
@media (max-width: 767px) {
overflow-x: hidden !important;
}
}
.cart-items {
width: 100% !important;
.product-item {
padding: 16px 0;
}
th {
font-family: $font-family-secundary;
color: $color-black;
padding: 0 0 16px;
font-style: normal;
font-weight: bold;
font-weight: 400;
font-size: 14px;
line-height: 16px;
@include mq(xxl, min) {
font-size: 28px;
line-height: 33px;
}
&.shipping-date {
font-size: 0;
&::after {
content: "Frete";
font-weight: 400;
font-family: $font-family-secundary;
font-size: 14px;
line-height: 16px;
@include mq(xxl, min) {
font-size: 28px;
line-height: 33px;
}
}
}
&.product-price {
&::after {
content: "Unidade";
font-weight: 400;
font-family: $font-family-secundary;
font-size: 14px;
line-height: 16px;
@include mq(xxl, min) {
font-size: 28px;
line-height: 33px;
}
}
}
@include mq(md, max) {
&.quantity-price,
&.shipping-date {
@ -155,7 +206,8 @@
}
a {
color: $color-blue;
font-family: $font-family-secundary;
color: $color-black2;
font-style: normal;
font-weight: normal;
font-size: 12px;
@ -163,10 +215,15 @@
transition: ease-in 0.22s all;
&:hover {
color: darken($color-blue, 10);
color: darken($color-black, 10);
text-decoration: none;
}
@include mq(xxl, min) {
font-size: 28px;
line-height: 33px;
}
@media (max-width: 490px) {
margin-left: 23px;
}
@ -179,10 +236,15 @@
}
td.shipping-date {
color: $color-gray2;
color: $color-gray6;
font-size: 12px;
line-height: 14px;
@include mq(xxl, min) {
font-size: 28px;
line-height: 33px;
}
@include mq(md, max) {
display: none;
}
@ -190,6 +252,8 @@
.product-price {
min-width: 100px;
font-size: 0;
@include mq(md, max) {
min-width: 78px;
}
@ -200,25 +264,39 @@
}
span.list-price {
color: $color-gray2;
color: $color-gray6;
font-size: 12px;
line-height: 14px;
text-decoration-line: line-through;
@include mq(xxl, min) {
font-size: 24px;
line-height: 28px;
}
@include mq(sm, max) {
font-size: 12px;
line-height: 14px;
}
.muted {
color: $color-gray6;
}
.old-product-price-label {
text-transform: lowercase;
}
.new-product-price-label {
color: $color-black;
}
}
}
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;
@ -236,7 +314,7 @@
background-color: $color-white;
border: 1px solid $color-gray3;
border-radius: 0;
border-width: 0 1px;
border-width: 0;
display: block;
max-height: 38px;
margin: 0 !important;
@ -253,26 +331,30 @@
.icon-plus-sign,
.icon-minus-sign {
&::before {
color: $color-black;
color: $color-blue2;
display: block;
font-weight: 500;
padding: 1px 12px;
@include mq(xxl, min) {
width: 32px;
}
}
}
.icon-minus-sign {
&:before {
content: "-";
font-size: 16px;
}
}
// .icon-minus-sign {
// // &:before {
// // content: "-";
// // font-size: 16px;
// // }
// }
.icon-plus-sign {
&:before {
content: "+";
font-size: 14px;
}
}
// .icon-plus-sign {
// &:before {
// content: "+";
// font-size: 14px;
// }
// }
.item-quantity-change {
@media (max-width: 979px) and (min-width: 768px) {
@ -301,10 +383,25 @@
font-size: 14px;
line-height: 16px;
color: $color-black;
@include mq(xxl, min) {
font-size: 28px;
line-height: 33px;
}
}
.total-selling-price {
&.total-selling-price {
font-weight: 700;
}
}
}
.quantity-price {
@include mq(xxl, min) {
font-size: 28px;
line-height: 38px;
}
@include mq(md, max) {
display: none;
}
@ -355,8 +452,14 @@
font-style: normal;
font-weight: normal;
font-size: 24px;
line-height: 28px;
color: $color-gray2;
line-height: 33px;
font-family: $font-family;
color: $color-black2;
@include mq(xxl, min) {
font-size: 48px;
line-height: 65px;
}
@include mq(md, max) {
margin-top: 0;
@ -365,17 +468,24 @@
.srp-description {
color: $color-gray2;
font-size: 12px;
font-size: 14px;
font-weight: 400;
line-height: 18px;
margin: 0 0 12px;
// margin: 0 0 12px;
margin: 0;
@include mq(xxl, min) {
font-size: 28px;
line-height: 36px;
}
}
button.shp-open-options {
background-color: $color-gray5;
border: none;
border-radius: 5px;
color: $color-gray2;
font-size: 16px;
border-radius: 8px;
color: $color-black2;
font-size: 14px;
letter-spacing: 0.05em;
line-height: 19px;
font-weight: 500;
@ -405,18 +515,27 @@
}
.srp-pickup-my-location__button {
background-color: $color-black;
background-color: $color-blue2;
border: none;
border-radius: 5px;
border-radius: 8px;
color: $color-white;
outline: none;
width: 100%;
cursor: pointer;
padding: 12px 36px;
font-style: normal;
font-weight: 500;
font-weight: 700;
font-size: 14px;
line-height: 16px;
line-height: 19px;
letter-spacing: 0.05em;
white-space: nowrap;
text-transform: uppercase;
@include mq(xxl, min) {
font-size: 28px !important;
line-height: 36px !important;
}
&:hover {
background-color: lighten($color-black, 5);
@ -444,12 +563,12 @@
}
&__current {
border: 1px solid $color-blue;
border: 1px solid $color-black2;
border-radius: 100px;
}
.blue {
color: $color-blue;
color: $color-black2;
}
label {
@ -462,6 +581,25 @@
}
.srp-postal-code {
.ship-country {
label {
font-family: $font-family;
font-style: normal;
font-weight: normal;
font-size: 12px;
line-height: 14px;
color: $color-black2;
margin-bottom: 12px;
}
select {
border: 1px solid $color-gray7;
border-radius: 5px;
box-shadow: none;
color: $color-black2;
}
}
.ship-postalCode {
label {
font-family: $font-family;
@ -469,15 +607,15 @@
font-weight: normal;
font-size: 12px;
line-height: 14px;
color: $color-black;
color: $color-black2;
margin-bottom: 12px;
}
input {
border: 1px solid $color-gray3;
border: 1px solid $color-gray7;
border-radius: 5px;
box-shadow: none;
color: $color-gray3;
color: $color-black2;
font-size: 12px;
height: 36px;
padding: 12px 8px;
@ -485,11 +623,14 @@
}
& ~ button {
background-color: $color-black;
background-color: $color-blue2;
border: none;
border-radius: 5px;
color: $color-white;
font-size: 12px;
font-style: normal;
font-size: 14px;
font-weight: 700;
line-height: 19px;
height: 36px;
letter-spacing: 1px;
outline: none;
@ -501,22 +642,28 @@
text-transform: uppercase;
&:hover {
background-color: lighten($color-black, 5);
background-color: lighten($color-blue, 5);
}
&:active {
background-color: darken($color-black, 5);
background-color: darken($color-blue, 5);
}
}
small a {
font-family: $font-family;
font-size: 0;
&::after {
content: "Não sei meu código postal";
font-family: $font-family-secundary;
font-style: normal;
font-weight: normal;
font-size: 10px;
line-height: 12px;
color: $color-blue;
color: $color-black2;
margin-top: 7px;
text-decoration-line: underline;
cursor: pointer;
}
}
span.help.error {
@ -525,7 +672,7 @@
position: absolute;
left: 0;
width: 100%;
top: 17px;
top: 5px;
}
}
}
@ -608,7 +755,7 @@
font-weight: normal;
font-size: 12px;
line-height: 14px;
color: $color-blue;
color: $color-black2;
text-decoration: none;
}
}
@ -630,6 +777,7 @@
}
.coupon-label label {
display: flex;
margin-bottom: 12px;
font-family: $font-family;
font-style: normal;
@ -642,6 +790,7 @@
.coupon-fields {
margin-bottom: 32px;
display: flex;
@include mq(sm, max) {
span {
@ -662,9 +811,9 @@
box-shadow: none;
color: $color-gray4;
font-size: 12px;
height: 34px;
height: 36px;
padding: 0 12px;
max-width: 160px;
max-width: 204.32px;
@include mq(sm, max) {
max-width: 100%;
@ -673,17 +822,18 @@
}
button {
background: $color-black;
background: $color-blue2;
border: none;
border-radius: 5px;
color: $color-white;
font-size: 12px;
color: $color-black2;
font-weight: 400;
font-size: 14px;
line-height: 19px;
height: 36px;
letter-spacing: 1px;
margin-left: 6px;
margin-left: 15.17px;
outline: none;
transition: all 0.2s linear;
width: 94px;
text-transform: uppercase;
@include mq(md, max) {
@ -691,11 +841,11 @@
}
&:hover {
background-color: lighten($color-black, 5);
background-color: lighten($color-blue, 5);
}
&:active {
background-color: darken($color-black, 5);
background-color: darken($color-blue, 5);
}
}
}
@ -734,7 +884,7 @@
td.info,
td.monetary {
font-style: normal;
font-weight: normal;
font-weight: 700;
font-size: 18px;
line-height: 21px;
color: $color-black;
@ -776,31 +926,31 @@
font-weight: normal;
font-size: 12px;
line-height: 14px;
color: $color-blue;
color: $color-black2;
}
}
.btn-place-order-wrapper {
a {
background: $color-green;
background: $color-blue2;
border: none;
border-radius: 5px;
border-radius: 8px;
display: block;
font-size: 0;
transition: ease-in 0.22s all;
padding: 12px 19px;
&:hover {
background-color: darken($color-green, 5);
background-color: darken($color-blue, 5);
}
&:after {
content: "finalizar compra";
font-family: $font-family;
font-weight: 500;
font-weight: 700;
font-size: 13px;
letter-spacing: 0.05em;
color: $color-white;
color: $color-black2;
text-transform: uppercase;
vertical-align: middle;
line-height: 19px;

View File

@ -10,29 +10,51 @@
}
&-title {
font-size: 20px;
font-size: 0px;
&::after {
content: "Seu Carrinho está vazio.";
font-size: 24px;
line-height: 33px;
text-align: center;
text-transform: uppercase;
color: $color-black2;
}
}
&-links {
.link-choose-products {
background: $color-black;
border: none;
border-radius: 5px;
background: $color-white;
border: 1px solid $color-black;
border-radius: 0;
transition: ease-in 0.22s all;
outline: none;
font-family: $font-family;
padding: 16px 64px;
font-size: 0;
color: $color-black;
cursor: pointer;
&::after {
content: "Continuar comprando";
font-family: $font-family-secundary;
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;
transition: ease-in 0.22s all;
}
&:hover {
background: lighten($color-black, 5);
color: $color-white;
}
}
}
&-message {
display: none;
}
}

View File

@ -9,11 +9,11 @@ html {
}
footer .footerCheckout__wrapper {
width: 94.9734%;
width: 100%;
margin: auto auto 0 auto;
}
footer .footerCheckout__prateleira,
header {
header .container {
width: 79.53125%;
margin: 0 auto;
}

View File

@ -63,7 +63,10 @@
}
.slick-slide {
float: left;
height: 100%;
width: 100%;
height: auto;
margin-left: 8px;
margin-right: 8px;
min-height: 1px;
outline: none;
[dir="rtl"] & {
@ -71,6 +74,7 @@
}
img {
display: block;
width: 100%;
}
&.slick-loading img {
display: none;
@ -99,16 +103,41 @@
.slick-arrow {
font-size: 0;
position: absolute;
outline: 0;
border: 0;
}
.slick-prev {
background: url("https://agenciamagma.vteximg.com.br/arquivos/arrow-left-mini-M3Academy.svg")
no-repeat center center;
z-index: 4;
left: 10px;
bottom: 50%;
left: 20px;
cursor: pointer;
@include mq(xxl, min) {
background: url("https://agenciamagma.vteximg.com.br/arquivos/arrow-left-M3Academy.svg")
no-repeat center;
bottom: 50%;
left: -949px;
z-index: 5;
width: 100%;
}
}
.slick-next {
background: url("https://agenciamagma.vteximg.com.br/arquivos/arrow-right-mini-M3Academy.svg")
no-repeat center center;
z-index: 4;
right: 10px;
bottom: 50%;
right: 20px;
cursor: pointer;
@include mq(xxl, min) {
background: url("https://agenciamagma.vteximg.com.br/arquivos/arrow-right-M3Academy.svg")
no-repeat center;
z-index: 5;
right: -910px;
width: 100%;
}
}
.slick-arrow.slick-hidden {
display: none;

View File

@ -3,13 +3,83 @@
border-top: none;
color: $color-gray2;
.container {
width: 94.9734%;
display: flex;
align-items: center;
justify-content: center;
padding: 27px 0 24px;
margin: 0;
@include mq(pg, max) {
align-items: flex-start;
flex-direction: column;
padding: 16px 8px !important;
}
@include mq(csun, max) {
padding: 16px 0 8px 8px !important;
}
}
&__wrapper {
margin-top: 68px !important;
align-items: center;
display: flex;
flex-direction: column;
justify-content: space-between;
border-top: 1px solid $color-black2;
@include mq(pg, max) {
align-items: flex-start;
}
}
&__payments {
display: flex;
img {
height: 20px;
margin: 0;
margin-right: 13.35px;
max-width: fit-content;
@include mq(sm, max) {
margin-right: 5.22px;
}
@include mq(csun, max) {
margin-right: 0;
}
@include mq(xxl, min) {
height: 39.06px;
}
}
figure {
margin: 0;
}
}
&__vtexpci {
img {
height: 33px;
margin: 0;
max-width: fit-content;
}
ul {
padding: 189px;
}
figure {
margin: 0;
}
}
&__address {
width: 33.33%;
color: $color-gray2;
font-family: $font-family;
font-style: normal;
@ -19,37 +89,76 @@
text-transform: capitalize;
max-width: 40%;
@include mq(md, max) {
margin-bottom: 24px;
max-width: 100%;
@include mq(pg, max) {
order: 2;
margin: 8px 0 8px;
line-height: 14px;
white-space: nowrap;
color: $color-black;
}
// @include mq(md, max) {
// margin-bottom: 24px;
// max-width: 100%;
// }
@include mq(xxl, min) {
font-size: 20px;
line-height: 27px;
text-transform: capitalize;
color: $color-black;
}
}
&__stamps {
width: 33.33%;
align-items: center;
display: flex;
justify-self: center;
justify-content: center;
list-style: none;
margin: 0;
@include mq(md, max) {
align-self: center;
margin-bottom: 12px;
@include mq(csyn, max) {
flex-wrap: wrap;
}
@include mq(pg, max) {
order: 1;
margin-bottom: 8px;
justify-content: flex-start;
}
// @include mq(md, max) {
// align-self: center;
// margin-bottom: 12px;
// }
&__divider {
background-color: $color-gray4;
display: inline-block;
height: 24px;
margin: 0 8px;
width: 1px;
@include mq(cstm, max) {
margin: 0 10px 0 0;
}
}
}
&__developedBy {
width: 33.33%;
align-items: center;
display: flex;
list-style-type: none;
margin: 0;
justify-content: flex-end;
@include mq(pg, max) {
order: 3;
justify-content: flex-start;
margin-top: 8px;
}
li:last-child {
margin-left: 16px;
@ -57,18 +166,187 @@
a {
align-items: center;
color: $color-gray2;
display: flex;
span {
color: $color-gray2;
font-family: $font-family;
font-style: normal;
font-weight: normal;
font-size: 10px;
line-height: 12px;
text-decoration: none;
margin-right: 10.12px;
span {
margin-right: 8px;
@include mq(pg, max) {
font-size: 9px;
line-height: 12px;
white-space: nowrap;
color: $color-black;
}
@include mq(xxl, min) {
font-size: 18px;
line-height: 25px;
color: $color-black;
}
}
figure {
margin: 0;
@include mq(pg, max) {
width: max-content;
}
}
img {
height: 16px;
@include mq(xxl, min) {
height: 31.25px;
}
}
}
}
&__prateleira {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
&__prateleira-title {
margin-bottom: 20px;
}
&__shelfList {
width: 1016px;
@include mq(pg, max) {
width: 991px;
}
@include mq(lg, max) {
width: 760px;
}
@include mq(md, max) {
width: 500px;
}
@include mq(sm, max) {
width: 344px;
}
@include mq(csin, max) {
width: 240px;
}
@include mq(xxl, min) {
width: 1994.07px;
}
ul {
display: flex;
justify-content: center;
margin: 0;
margin: 0 0 20px;
gap: 5px;
flex-wrap: wrap;
list-style-type: none;
// font-size: 0;
#text {
font-size: 0;
}
li {
background: $color-blue2;
border-radius: 8px;
padding: 5px;
color: $color-white;
font-weight: 700;
font-size: 13px;
line-height: 18px;
font-family: $font-family;
text-transform: uppercase;
@include mq(xxl, min) {
font-size: 26px;
line-height: 35px;
}
}
}
figure {
margin: 0;
}
figcaption {
margin: 20px 0;
font-weight: 400;
font-size: 13px;
line-height: 18px;
text-align: center;
color: $color-black2;
font-family: $font-family;
@include mq(xxl, min) {
font-weight: 400;
font-size: 26px;
line-height: 35px;
}
}
.button-list {
width: 100%;
padding: 12px 72px;
border-radius: 8px;
background: $color-blue2;
outline: 0;
border: 0;
a {
color: $color-white;
text-transform: uppercase;
font-weight: 700;
font-size: 13px;
line-height: 18px;
white-space: nowrap;
font-family: $font-family;
@include mq(xxl, min) {
font-size: 26px;
line-height: 35px;
}
}
}
button {
display: flex;
justify-content: center;
margin: 0;
}
}
&__prateleira-title {
h2 {
font-family: $font-family-secundary;
font-style: normal;
text-align: center;
font-weight: 400;
font-size: 24px;
line-height: 38px;
color: $color-black2;
@include mq(xxl, min) {
font-size: 48px;
line-height: 76px;
}
}
}
.desativado {
display: none !important;
}
}

View File

@ -1,22 +1,144 @@
/* _header.scss */
.headerCheckout {
width: 100%;
border-bottom: 1px solid #000;
.container {
width: auto !important;
@include mq(pg, max) {
width: 100%;
}
}
&__wrapper {
align-items: center;
display: flex;
justify-content: space-between;
padding: 29px 0;
@include mq(pg, max) {
padding: 16px;
}
@include mq(xxl, min) {
padding: 29px 0;
}
}
#progressBar {
width: 439px;
@include mq(xxl, min) {
width: 1078.86px;
}
}
#progressBar ul {
display: flex;
justify-content: space-between;
list-style-type: none;
margin: 0;
}
#progressBar li .containerProgressBar {
display: flex;
width: 100%;
flex-direction: column;
align-items: flex-start;
justify-content: center;
position: relative;
font-family: "Tenor Sans", sans-serif;
font-weight: 400;
font-size: 12px;
line-height: 14px;
@include mq(xxl, min) {
font-size: 24px;
line-height: 28px;
}
}
#progressBar li.center-li {
width: auto;
}
.containerProgressBar .progress-bar-first-line,
.progress-bar-second-line {
width: 181px;
bottom: 5px;
border: 1px solid $color-black2;
position: absolute;
margin: 0;
@include mq(xxl, min) {
width: 444px;
bottom: 10px;
}
}
.progress-bar-first-line {
left: 60%;
}
.progress-bar-second-line {
right: 40%;
z-index: -1;
@include mq(xxl, min) {
right: 58%;
}
}
.containerProgressBar .progress-bar-first-circle,
.progress-bar-second-circle,
.progress-bar-third-circle {
margin: 0 auto;
width: 12px;
height: 12px;
margin-top: 9px;
border: 1px solid $color-black2;
border-radius: 50%;
@include mq(xxl, min) {
width: 24px;
height: 24px;
}
}
.containerProgressBar .progress-bar-first-circle {
background: $color-white;
}
.containerProgressBar .progress-bar-second-circle {
background: $color-white;
}
.containerProgressBar .progress-bar-third-circle {
background: $color-white;
}
&__logo {
img {
height: 52px;
height: 37.14px;
width: auto;
cursor: pointer;
@include mq(pg, max) {
height: 32.12px;
max-width: fit-content;
}
@include mq(cstm, max) {
height: 33px;
}
@include mq(xxl, min) {
height: 91.2px;
}
}
}
&__safeBuy {
display: flex;
span {
align-items: center;
display: flex;
@ -27,10 +149,38 @@
font-size: 12px;
line-height: 14px;
color: $color-gray;
@include mq(pg, max) {
line-height: 16px;
color: $color-black;
white-space: nowrap;
}
i {
margin-right: 8px;
@include mq(xxl, min) {
font-size: 24px;
line-height: 33px;
color: $color-black;
}
}
img {
margin-right: 8px;
max-width: 12px;
height: 15px;
@include mq(pg, max) {
height: 13.33px;
}
@include mq(xxl, min) {
margin-right: 7.9px;
height: 41.46px;
max-width: 29.47px;
}
}
}
.active {
background: $color-black2 !important;
}
}

View File

@ -2,10 +2,14 @@
@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-black2: #000000;
$color-red: #ff0000;
$color-red2: #f15a31;
$color-white: #fff;
@ -14,19 +18,30 @@ $color-gray2: #7d7d7d;
$color-gray3: #f0f0f0;
$color-gray4: #8d8d8d;
$color-gray5: #e5e5e5;
$color-gray6: #989898;
$color-gray7: #c4c4c4;
$color-gray8: #e0e0e0;
$color-gray9: #808080;
$color-gray10: #58595b;
$color-blue: #4267b2;
$color-blue2: #00c8ff;
$color-green: #4caf50;
/* Grid breakpoints */
$grid-breakpoints: (
xs: 0,
csun: 285,
csyn: 355,
csin: 370,
cstm: 400,
sm: 576px,
md: 768px,
lg: 992px,
xl: 1200px
pg: 1025px,
xl: 1200px,
xxl: 2500px,
) !default;
$z-index: (
@ -34,5 +49,5 @@ $z-index: (
level2: 10,
level3: 15,
level4: 20,
level5: 25
level5: 25,
) !default;