Merge pull request 'feature/header' (#2) from feature/header into main

Reviewed-on: #2
This commit is contained in:
ViniciusDeniz 2022-12-18 14:19:19 +00:00
commit d40b90a69c
9 changed files with 1748 additions and 11794 deletions

10970
checkout/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +1,98 @@
// import { waitElement } from "m3-utils";
// export default class Footer {
// constructor() {
// this.init();
// }
// async init() {
// await this.selectors();
// // this.onUpdate();
// }
// async selectors() {
// //Para verificar se o carrinho está vazio e remover a prateleira de produtos:
// // vocês devem olhar a doc fornecida no Desafio para aprender a usar o waitElement
// this.checkoutVazio = await waitElement(".empty-cart-content");
// }
// 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);
// });
// });
// observer.observe(target, config);
// }
// async addCarrossel() {
// const elemento = await waitElement("#my-element");
// $(elemento).slick({
// slidesToShow: 4,
// slidesToScroll: 1,
// });
// }
// }
import { waitElement } from "m3-utils"; import { waitElement } from "m3-utils";
export default class Footer { export default class Footer {
constructor() { constructor() {
this.init(); this.init();
this.requestShelf();
this.addCarrossel();
} }
async init() { async init() {
await this.selectors(); await this.selectors();
// this.onUpdate(); // this.onUpdate();
this.requestShelf();
this.addCarrossel();
} }
async selectors() { async selectors() {
this.itensShelf = await waitElement(".footerCheckout__prateleira");
// this.itensShelf = await waitElement(".empty-cart-content")
//Para verificar se o carrinho está vazio e remover a prateleira de produtos: //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 // vocês devem olhar a doc fornecida no Desafio para aprender a usar o waitElement
this.checkoutVazio = await waitElement(".empty-cart-content"); // this.checkoutVazio = await waitElement(".container-cart", {
// });
}
requestShelf() {
let prateleira = this.itensShelf;
prateleira.innerHTML = `
<p class="footerChekout__prateleira-title">Você também pode gostar</p>
<ul class="carrosel-ul"></ul>
`;
const api =
"https://m3academy.myvtex.com/api/catalog_system/pub/products/search/?fq=productClusterIds:319";
const prodUl = document.querySelector("carrosel-ul");
fetch(api)
.then((response) => response.json())
.then(function (data) {
return data.map(function (item) {
let li = document.createElement("li");
li.setAttribute("id", item.productId);
li.innerHTML = `
<img src="${item.items[0].images[0].imageUrl}" alt="${item.productName}" />
<p class="product-name">${item.productName}</p>
<div class="product-variation">${item.items
.map((name) => {
return `<a name="product-variationvariation" class="product-variationvariation">${name.name}</a>`;
})
.join("")}</div>
<button class="show-product">Ver produto</button>
`;
prateleira.children[1].appendChild(li);
});
});
} }
onUpdate() { onUpdate() {
@ -31,10 +110,13 @@ export default class Footer {
observer.observe(target, config); observer.observe(target, config);
} }
async addCarrossel() { async addCarrossel() {
const elemento = await waitElement("#my-element"); const elemento = await waitElement(".carrosel-ul");
$(elemento).slick({ $(elemento).slick({
slidesToShow: 4, slidesToShow: 4,
slidesToScroll: 1, slidesToScroll: 1,
arrows: true,
variableWidth: true,
infinite: false,
}); });
} }
} }

View File

@ -1,3 +1,215 @@
// // // import waitForEl from "../helpers/waitForEl";
// import { waitElement } from "m3-utils";
// Export default class Header {
// constructor() {
// this.init();
// }
// async init() {
// await this.selectors();
// this.progressBarHTML();
// await this.progressBarProgress();
// }
// async selectors() {
// this.header = await waitElement(".headerCheckout");
// this.progressBar = await waitElement("#progressBar");
// }
// progressBarHTML() {
// if (this.progressBar && window.innerWidth > 1024) {
// // <img src="imgs/amex.png"/ this.progressBar.innerHTML
// this.progressBar.innerHTML = '<ul>
// <li><div class="containerLi"><div><p class="progress-bar-text">Meu Carrinho</p><p id="progress-bar-circle-1" class="progress-bar-circle-1"></p><p class="progress-bar-line-1"></p> </div></div></li>
// <li class="central"><div class="containerLi"><div><p class="progress-bar-text">Dados Pessoais</p><p id="progress-bar-circle-2" class="progress-bar-circle-2"></p></div></div></li>
// <li><div class="containerLi"><div><p class="progress-bar-text">Pagamento</p><p id="progress-bar-circle-3" class="progress-bar-circle-3"></p><p class="progress-bar-line-2"></p></div></div></li>
// </ul>';
// }
// if (this.progressBar && window.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");
// }
// }
// });
// });
// }
// }
// }
// import waitForEl from "../helpers/waitForEl"; // import waitForEl from "../helpers/waitForEl";
import { waitElement } from "m3-utils"; import { waitElement } from "m3-utils";
@ -8,14 +220,193 @@ 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
timeout: 5000, // vai esperar 5 segundos antes de rejeitar a promise
interval: 1000, // vai verificar a cada 1 segundo se o elemento existe
});
this.progressBar = await waitElement("#progressBar", {
//#my-element pode ser a class ou o id do elemento html qeu vocÊ quer pegar //#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 timeout: 5000, // vai esperar 5 segundos antes de rejeitar a promise
interval: 1000, // vai verificar a cada 1 segundo se o elemento existe 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="containerLi">
<p class="progress-bar-text">Meu Carrinho</p>
<div class="bolinha" style="margin-left: 29px;">
<p id="progress-bar-circle-1" class="progress-bar-circle"></p>
<p class="progress-bar-line-1"></p>
</div>
</div>
</li>
<li class="central">
<div class="containerLi">
<p class="progress-bar-text">Dados Pessoais</p>
<p id="progress-bar-circle-2" class="progress-bar-circle"></p>
</div>
</li>
<li>
<div class="containerLi">
<p class="progress-bar-text">Pagamento</p>
<div class="bolinha" style="margin-right: 22px;">
<p id="progress-bar-circle-3" class="progress-bar-circle"></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) => {
// console.log(li)
const liOne = li.children[0].children[1].children["progress-bar-circle-1"];
const liTwo = li.children[0].children["progress-bar-circle-2"];
const liThree = li.children[0].children[1].children["progress-bar-circle-3"];
if (window.location.href === "https://m3academy.myvtex.com/checkout/#/cart") {
if (liOne) {
liOne.classList.add("active");
}
if (liTwo) {
if (liTwo.classList.contains("active")) {
liTwo.classList.remove("active");
}
}
if (liThree) {
if (liThree.classList.contains("active")) {
liThree.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 (liOne) {
if (liOne.classList.contains("active")) {
liOne.classList.remove("active");
}
}
if (liTwo) {
liTwo.classList.add("active");
}
if (liThree) {
if (liThree.classList.contains("active")) {
liThree.classList.remove("active");
}
}
} else if (
window.location.href === "https://m3academy.myvtex.com/checkout/#/payment"
) {
if (liOne) {
if (liOne.classList.contains("active")) {
liOne.classList.remove("active");
}
}
if (liTwo) {
if (liTwo.classList.contains("active")) {
liTwo.classList.remove("active");
}
}
if (liThree) {
liThree.classList.add("active");
}
}
window.addEventListener("hashchange", () => {
if (window.location.hash == "#/cart") {
if (liOne) {
liOne.classList.add("active");
}
if (liTwo) {
if (liTwo.classList.contains("active")) {
liTwo.classList.remove("active");
}
}
if (liThree) {
if (liThree.classList.contains("active")) {
liThree.classList.remove("active");
}
}
} else if (
window.location.hash === "#/email" ||
window.location.hash === "#/profile" ||
window.location.hash === "#/shipping"
) {
if (liOne) {
if (liOne.classList.contains("active")) {
liOne.classList.remove("active");
}
}
if (liTwo) {
liTwo.classList.add("active");
}
if (liThree) {
if (liThree.classList.contains("active")) {
liThree.classList.remove("active");
}
}
} else if (window.location.hash == "#/payment") {
if (liOne) {
if (liOne.classList.contains("active")) {
liOne.classList.remove("active");
}
}
if (liTwo) {
if (liTwo.classList.contains("active")) {
liTwo.classList.remove("active");
}
}
if (liThree) {
liThree.classList.add("active");
}
}
});
});
}
}
} }

View File

@ -1,289 +1,341 @@
.checkout-container { .checkout-container {
.client-pre-email { .client-pre-email {
border-color: $color-gray4; border-color: $color-gray4;
font-family: $font-family; font-family: $font-family;
padding-top: 8px; padding-top: 14px;
.link-cart { .link-cart {
a { a {
color: $color-black; color: $color-black;
font-size: 14px; font-size: 14px;
text-transform: uppercase;
font-weight: 400;
line-height: 16px;
&:hover { &:hover {
color: lighen($color-black, 10); color: lighen($color-black, 10);
} }
} }
} }
.pre-email { .pre-email {
flex-direction: column; flex-direction: column;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
text-transform: uppercase;
color: $color-black;
h3 { h3 {
margin-bottom: 16px; margin-bottom: 16px;
span { span {
color: #303030; color: $color-black;
font-size: 24px; font-size: 24px;
} font-weight: 400;
font-size: 20px;
line-height: 23px;
text-transform: uppercase;
}
small { small {
color: $color-gray4; color: $color-black;
} font-size: 24px;
} font-weight: 400;
} font-size: 20px;
line-height: 23px;
text-transform: uppercase;
padding: 0 !important;
}
}
}
.client-email { .client-email {
margin: 0 0 16px; margin: 0 0 16px;
input { input {
box-shadow: none; box-shadow: none;
color: $color-black; color: $color-black;
font-family: $font-family; font-family: $font-family;
padding: 0 16px; padding: 0 16px;
border: 2px solid $color-gray3; border: 1px solid $color-black;
box-sizing: border-box; box-sizing: border-box;
border-radius: 5px; border-radius: 5px;
font-weight: 400;
font-size: 12px;
line-height: 16px;
width: 66%;
height: 50px;
@media (max-width: 490px) { @media (max-width: 490px) {
width: auto; width: auto;
} }
} }
::placeholder {
color: $color-black;
}
button { button {
background-color: $color-black; background-color: $color-blue;
border-radius: 5px; border-radius: 5px;
border: none; border: none;
font-family: $font-family; font-family: $font-family;
height: 54px; position: relative;
right: 0; right: 0;
top: 0; top: 0;
color: $color-black;
height: 52px;
cursor: pointer;
width: 19%;
font-weight: 700;
font-size: 14px;
line-height: 19px;
letter-spacing: 0.05em;
text-transform: uppercase;
@media (max-width: 490px) { @media (max-width: 490px) {
height: 48px; height: 48px;
margin: 0; margin: 0;
position: absolute; position: absolute;
} }
} }
span.help.error { span.help.error {
color: red; color: red;
} }
} }
.emailInfo { .emailInfo {
padding: 16px; padding: 16px;
background-color: $color-white; background-color: $color-white;
border: 1px solid $color-gray4; border: 1px solid $color-black;
border-radius: 0; border-radius: 0;
h3 { .unstyled {
color: #303030; span {
margin: 0 0 8px 0; font-weight: 700;
} font-size: 12px;
line-height: 16px;
color: $color-black;
}
}
ul { h3 {
margin: 0; color: #303030;
margin: 0 0 8px 0;
}
li { ul {
span { margin: 0;
color: $color-black;
}
i::before { li {
color: $color-black; span {
font-size: 1rem; color: $color-black;
opacity: 1; }
}
}
}
i::before { i::before {
color: $color-black; color: $color-blue;
font-size: 6rem; font-size: 1rem;
opacity: 0.5; opacity: 1;
} height: 10px;
} width: 17px;
} }
}
}
.shipping-data, i::before {
.payment-data, color: $color-black;
.client-profile-data { font-size: 6rem;
.accordion-group { opacity: 0.5;
border-radius: 0; }
border: 1px solid $color-gray4; }
font-family: $font-family; }
padding: 16px;
.accordion-heading { .shipping-data,
span { .payment-data,
color: #303030; .client-profile-data {
margin-bottom: 8px; .accordion-group {
padding: 0; border: 1px solid #f0f0f0;
border-radius: 8px;
font-family: $font-family;
padding: 16px;
i::before { .accordion-heading {
fill: #303030; span {
} color: #292929;
} margin-bottom: 8px;
font-size: 0px;
margin-top: 7px;
margin-bottom: 25px;
padding: 0;
a { &::after {
align-items: center; content: "Identificação";
background-color: #303030; font-size: 16px;
border-radius: 8px; font-weight: 400;
border: none; line-height: 19px;
color: $color-white; }
display: flex; i::before {
justify-content: center; fill: #303030;
padding: 6px 5px 6px 8px; }
} }
}
.accordion-inner { a {
padding: 0; align-items: center;
background-color: #303030;
border-radius: 8px;
border: none;
color: $color-white;
display: flex;
justify-content: center;
padding: 6px 5px 6px 8px;
}
}
/* General configurations */ .accordion-inner {
padding: 0;
.client-notice { /* General configurations */
color: $color-black;
}
p { .client-notice {
label { color: $color-black;
color: $color-black; }
font-weight: 500;
}
select, p {
input { label {
border-radius: 0; color: $color-black;
border: 1px solid $color-gray4; font-weight: 500;
box-shadow: none; }
}
.help.error { select,
color: red; input {
} border-radius: 0;
} border: 1px solid $color-gray4;
box-shadow: none;
}
.box-client-info-pj { .help.error {
.link a#is-corporate-client, color: red;
.link a#not-corporate-client { }
color: $color-black; }
font-weight: 500;
text-decoration: underline;
}
}
.state-inscription-box span { .box-client-info-pj {
font-weight: 500; .link a#is-corporate-client,
} .link a#not-corporate-client {
color: $color-black;
font-weight: 500;
text-decoration: underline;
}
}
button.submit { .state-inscription-box span {
border: none; font-weight: 500;
border-radius: 5px; }
background: $color-black;
margin-top: 8px;
outline: none;
transition: all 0.2s linear;
&:hover { button.submit {
background: lighten($color-black, 5); border: none;
} border-radius: 5px;
background: $color-black;
margin-top: 8px;
outline: none;
transition: all 0.2s linear;
&:active { &:hover {
background: darken($color-black, 5); background: lighten($color-black, 5);
} }
}
/* Shipping configurations */ &:active {
background: darken($color-black, 5);
}
}
.ship-postalCode small a { /* Shipping configurations */
color: #303030;
font-weight: 500;
text-decoration: underline;
}
.vtex-omnishipping-1-x-deliveryGroup { .ship-postalCode small a {
p { color: $color-black;
color: #303030; font-weight: 500;
font-size: 14px; text-decoration: underline;
font-weight: 500; }
}
.shp-lean { .vtex-omnishipping-1-x-deliveryGroup {
border: 1px solid $color-gray4; p {
border-radius: 0; color: #303030;
font-size: 14px;
font-weight: 500;
}
label { .shp-lean {
background-color: $color-white; border: 1px solid $color-gray4;
box-shadow: none; border-radius: 0;
color: #303030;
padding: 8px 12px;
svg path { label {
fill: #d8c8ac; background-color: $color-white;
} box-shadow: none;
} color: #303030;
} padding: 8px 12px;
}
.delivery-address-title { svg path {
color: #303030; fill: #d8c8ac;
font-size: 14px; }
font-weight: 500; }
} }
}
.shp-summary-group-info { .delivery-address-title {
border-color: $color-gray4; color: #303030;
} font-size: 14px;
font-weight: 500;
}
.address-summary { .shp-summary-group-info {
background: none; border-color: $color-gray4;
border-color: $color-gray4; }
border-radius: 0;
color: #303030;
padding: 12px;
@include mq(md, max) { .address-summary {
background-position: 8px 9px; background: none;
} border-color: $color-gray4;
border-radius: 0;
color: #303030;
padding: 12px;
a { @include mq(md, max) {
color: #303030; background-position: 8px 9px;
font-weight: 500; }
text-decoration: underline;
}
}
.shp-summary-group-price, a {
.shp-summary-package { color: #303030;
color: $color-gray4; font-weight: 500;
} text-decoration: underline;
}
}
.shp-summary-group-price { .shp-summary-group-price,
padding-right: 16px; .shp-summary-package {
} color: $color-gray4;
}
.shp-summary-package { .shp-summary-group-price {
padding-left: 16px; padding-right: 16px;
} }
.vtex-omnishipping-1-x-summaryChange { .shp-summary-package {
border-color: #303030; padding-left: 16px;
color: #303030; }
}
.vtex-omnishipping-1-x-deliveryChannelsToggle { .vtex-omnishipping-1-x-summaryChange {
background-color: #d8c8ac; border-color: #303030;
border: 1px solid #d8c8ac; color: #303030;
} }
.vtex-omnishipping-1-x-deliveryOptionActive { .vtex-omnishipping-1-x-deliveryChannelsToggle {
text-shadow: 1.3px 1px lighten($color-black, 50); background-color: #d8c8ac;
} border: 1px solid #d8c8ac;
} }
}
} .vtex-omnishipping-1-x-deliveryOptionActive {
text-shadow: 1.3px 1px lighten($color-black, 50);
}
}
}
}
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,38 +1,63 @@
.empty-cart { .empty-cart {
font-family: $font-family; font-family: $font-family;
&-content { &-content {
color: $color-black; color: $color-black;
text-align: center; text-align: center;
@include mq(md, max) { @include mq(md, max) {
padding: 0 16px; padding: 0 16px;
} }
}
&-title { p {
font-size: 20px; display: none;
} }
}
&-links { &-title {
.link-choose-products { font-size: 24px;
background: $color-black; height: 30px;
border: none; color: #000;
border-radius: 5px; font-weight: 700;
transition: ease-in 0.22s all; line-height: 32.68px;
outline: none; text-transform: uppercase;
font-family: $font-family; margin-top: 0px !important;
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 { &-links {
background: lighten($color-black, 5); display: flex;
} justify-content: center;
}
} .link-choose-products {
background: $color-white;
border: 1px solid $color-black;
transition: ease-in 0.22s all;
outline: none;
font-size: 0;
margin-top: 22px;
height: 40px;
letter-spacing: 0.05em;
padding: 0;
width: 32%;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
&::after {
content: "Continuar comprando";
font-family: $font-family;
font-style: normal;
font-weight: 500;
font-size: 14px;
line-height: 16px;
color: $color-black;
text-transform: uppercase;
width: 100%;
}
&:hover {
background: lighten($color-black, 5);
}
}
}
} }

View File

@ -74,14 +74,32 @@ body {
font-size: 36px; font-size: 36px;
line-height: 42px; line-height: 42px;
margin: 40px 0 30px; margin: 40px 0 30px;
letter-spacing: 0.1em;
text-transform: uppercase; text-transform: uppercase;
@include mq(md, max) { @include mq(md, max) {
margin-left: 30px; margin-left: 30px;
} }
} }
#orderform-title {
color: $color-black;
font-family: $font-family;
font-weight: 700;
font-size: 24px;
line-height: 32.68px;
margin: 17px 0 17px;
text-transform: uppercase;
}
#cart-title {
color: $color-black;
height: 33px;
font-weight: 700;
font-size: 24px;
letter-spacing: 0.05em;
margin-bottom: 16px;
}
.dropdown { .dropdown {
&__content { &__content {
&--closed { &--closed {

View File

@ -1,8 +1,145 @@
// /* _header.scss */
// .headerCheckout {
// .container {
// width: auto !important;
// }
// &__wrapper {
// align-items: center;
// display: flex;
// justify-content: space-between;
// }
// &__logo {
// img {
// height: 52px;
// width: auto;
// }
// }
// &__safeBuy {
// span {
// align-items: center;
// display: flex;
// text-transform: uppercase;
// font-family: $font-family;
// font-style: normal;
// font-weight: normal;
// font-size: 12px;
// line-height: 14px;
// color: $color-gray;
// }
// i {
// margin-right: 8px;
// }
// }
// }
/* _header.scss */ /* _header.scss */
.headerCheckout { .headerCheckout {
.container { .container {
width: auto !important; width: auto !important;
#progressBar {
width: 439px;
ul {
list-style-type: none;
display: flex;
align-items: center;
justify-content: space-between;
margin: 0;
}
li .containerLi {
width: 100%;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
position: relative;
}
li.central .containerLi {
align-items: center;
margin-left: 7px;
}
li:last-child .containerLi {
align-items: flex-end;
}
li .container 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: "Tenor Sans";
font-size: 12px;
font-weight: 400;
line-height: 28px;
color: #000000;
width: 39.9103%;
@media (min-width: 2500px) {
font-size: 24px;
}
}
li.central {
width: auto;
}
li #progress-bar-circle-1,
li #progress-bar-circle-2,
li #progress-bar-circle-3 {
width: 12px;
height: 12px;
border: 1px solid #000000;
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: #000000;
}
li .progress-bar-line-1 {
position: absolute;
left: 25%;
transform: translateY(-50%);
bottom: 5px;
width: 100%;
height: 1px;
border-top: 1px solid #000000;
}
li .progress-bar-line-2 {
position: absolute;
right: 21%;
transform: translateY(-50%);
bottom: 5px;
width: 100%;
height: 1px;
border-top: 1px solid #000000;
}
}
.active {
background: #000000;
}
} }
&__wrapper { &__wrapper {
align-items: center; align-items: center;
display: flex; display: flex;
@ -11,25 +148,27 @@
&__logo { &__logo {
img { img {
height: 52px; width: 100%;
width: auto; height: 37.14px;
} }
} }
&__safeBuy { &__safeBuy {
span { span {
align-items: center; align-items: center;
display: flex; height: 17px;
color: $color-black;
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: 400;
font-size: 12px; font-size: 12px;
line-height: 14px; line-height: 16px;
color: $color-gray; color: $color-gray;
} }
i { img {
width: 12px;
margin-right: 8px; margin-right: 8px;
} }
} }

View File

@ -2,37 +2,36 @@
@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-black: #000;
$color-white: #fff; $color-white: #fff;
$color-29: #292929;
$color-gray: #6c6c6c; $color-gray: #6c6c6c;
$color-gray2: #7d7d7d; $color-gray2: #7d7d7d;
$color-gray3: #f0f0f0; $color-gray3: #f0f0f0;
$color-gray4: #8d8d8d; $color-gray4: #8d8d8d;
$color-gray5: #e5e5e5; $color-gray5: #e5e5e5;
$color-blue: #00c8ff;
$color-blue: #4267b2;
$color-green: #4caf50; $color-green: #4caf50;
/* 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;