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";
export default class Footer {
constructor() {
this.init();
this.requestShelf();
this.addCarrossel();
}
async init() {
await this.selectors();
// this.onUpdate();
this.requestShelf();
this.addCarrossel();
}
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:
// 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() {
@ -31,10 +110,13 @@ export default class Footer {
observer.observe(target, config);
}
async addCarrossel() {
const elemento = await waitElement("#my-element");
const elemento = await waitElement(".carrosel-ul");
$(elemento).slick({
slidesToShow: 4,
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 { waitElement } from "m3-utils";
@ -8,14 +220,193 @@ 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", {
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
timeout: 5000, // vai esperar 5 segundos antes de rejeitar a promise
interval: 1000, // vai verificar a cada 1 segundo se o elemento existe
});
}
progressBarHTML() {
if (this.progressBar && window.innerWidth > 1024) {
this.progressBar.innerHTML = `
<ul>
<li>
<div class="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

@ -2,12 +2,15 @@
.client-pre-email {
border-color: $color-gray4;
font-family: $font-family;
padding-top: 8px;
padding-top: 14px;
.link-cart {
a {
color: $color-black;
font-size: 14px;
text-transform: uppercase;
font-weight: 400;
line-height: 16px;
&:hover {
color: lighen($color-black, 10);
@ -20,17 +23,29 @@
display: flex;
align-items: center;
justify-content: center;
text-transform: uppercase;
color: $color-black;
h3 {
margin-bottom: 16px;
span {
color: #303030;
color: $color-black;
font-size: 24px;
font-weight: 400;
font-size: 20px;
line-height: 23px;
text-transform: uppercase;
}
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;
}
}
}
@ -43,23 +58,40 @@
color: $color-black;
font-family: $font-family;
padding: 0 16px;
border: 2px solid $color-gray3;
border: 1px solid $color-black;
box-sizing: border-box;
border-radius: 5px;
font-weight: 400;
font-size: 12px;
line-height: 16px;
width: 66%;
height: 50px;
@media (max-width: 490px) {
width: auto;
}
}
::placeholder {
color: $color-black;
}
button {
background-color: $color-black;
background-color: $color-blue;
border-radius: 5px;
border: none;
font-family: $font-family;
height: 54px;
position: relative;
right: 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) {
height: 48px;
@ -76,9 +108,18 @@
.emailInfo {
padding: 16px;
background-color: $color-white;
border: 1px solid $color-gray4;
border: 1px solid $color-black;
border-radius: 0;
.unstyled {
span {
font-weight: 700;
font-size: 12px;
line-height: 16px;
color: $color-black;
}
}
h3 {
color: #303030;
margin: 0 0 8px 0;
@ -93,9 +134,11 @@
}
i::before {
color: $color-black;
color: $color-blue;
font-size: 1rem;
opacity: 1;
height: 10px;
width: 17px;
}
}
}
@ -112,17 +155,26 @@
.payment-data,
.client-profile-data {
.accordion-group {
border-radius: 0;
border: 1px solid $color-gray4;
border: 1px solid #f0f0f0;
border-radius: 8px;
font-family: $font-family;
padding: 16px;
.accordion-heading {
span {
color: #303030;
color: #292929;
margin-bottom: 8px;
font-size: 0px;
margin-top: 7px;
margin-bottom: 25px;
padding: 0;
&::after {
content: "Identificação";
font-size: 16px;
font-weight: 400;
line-height: 19px;
}
i::before {
fill: #303030;
}
@ -200,7 +252,7 @@
/* Shipping configurations */
.ship-postalCode small a {
color: #303030;
color: $color-black;
font-weight: 500;
text-decoration: underline;
}

View File

@ -6,6 +6,7 @@
.cart-template {
font-family: $font-family;
@include mq(md, max) {
padding: 0 0;
}
@ -15,8 +16,9 @@
.cart {
border: 3px solid $color-gray3;
box-sizing: border-box;
border-radius: 5px;
padding: 16px;
margin-bottom: 48px !important;
@include mq(md, max) {
margin: 0px 0 25px 0;
@ -61,16 +63,27 @@
border-top: 1px solid #e5e5e5;
}
.shipping-date,
.price {
color: #7d7d7d;
}
.shipping-date {
font-size: 0 !important;
}
&::after {
content: "Frete";
color: #7d7d7d;
font-size: 14px;
line-height: 16.38px;
}
}
}
.summary-template-holder {
border-top: none;
background: $color-white;
margin-bottom: 48px;
}
#go-to-cart-button a {
@ -108,15 +121,22 @@
.cart-items {
.product-item {
padding: 16px 0;
.shipping-date.empty {
vertical-align: top;
.shipping-estimate-date {
color: #989898;
}
}
}
}
th {
color: $color-black;
padding: 0 0 16px;
padding: 0 1 25px;
font-style: normal;
font-weight: bold;
font-size: 14px;
line-height: 16px;
line-height: 16.38px;
@include mq(md, max) {
&.quantity-price,
@ -124,10 +144,20 @@
display: none;
}
}
&.shipping-date {
font-size: 0;
&::after {
content: "Frete";
font-size: 14px;
line-height: 16.38px;
vertical-align: top;
}
}
}
.product-image {
height: auto;
height: 60px;
padding: 0;
width: 60px;
@ -139,6 +169,7 @@
height: 60px;
max-width: 100%;
width: auto;
margin-left: 11px;
@include mq(sm, max) {
height: 72px;
@ -155,15 +186,15 @@
}
a {
color: $color-blue;
color: $color-black;
font-style: normal;
font-weight: normal;
font-weight: 400;
font-size: 12px;
line-height: 14px;
line-height: 14.04px;
transition: ease-in 0.22s all;
&:hover {
color: darken($color-blue, 10);
color: darken($color-black, 10);
text-decoration: none;
}
@ -179,9 +210,11 @@
}
td.shipping-date {
color: $color-gray2;
font-size: 12px;
line-height: 14px;
color: $color-29;
font-size: 14px;
line-height: 16px;
padding-top: 15px;
vertical-align: top;
@include mq(md, max) {
display: none;
@ -190,6 +223,7 @@
.product-price {
min-width: 100px;
@include mq(md, max) {
min-width: 78px;
}
@ -222,7 +256,7 @@
box-sizing: border-box;
display: flex;
justify-content: center;
margin: 6px auto 0;
margin: 4px auto 0;
max-height: 38px;
max-width: 118px;
padding: 0;
@ -242,7 +276,7 @@
margin: 0 !important;
padding: 8px 0;
width: 38px;
color: $color-gray2;
color: $color-black;
box-shadow: none;
@include mq(lg, max) {
@ -253,27 +287,17 @@
.icon-plus-sign,
.icon-minus-sign {
&::before {
color: $color-black;
color: $color-blue;
height: 16px;
width: 16px;
display: block;
font-weight: 500;
padding: 1px 12px;
}
}
.icon-minus-sign {
&:before {
content: "-";
font-size: 16px;
}
}
.icon-plus-sign {
&:before {
content: "+";
font-size: 14px;
}
}
.item-quantity-change {
@media (max-width: 979px) and (min-width: 768px) {
position: inherit;
@ -289,7 +313,10 @@
}
}
}
.quantity-price {
padding-top: 13px;
vertical-align: top;
}
.quantity-price,
.best-price {
.icon-question-sign {
@ -297,7 +324,7 @@
}
span {
font-style: normal;
font-weight: normal;
font-weight: bold !important;
font-size: 14px;
line-height: 16px;
color: $color-black;
@ -311,6 +338,8 @@
}
.item-remove {
vertical-align: top;
padding-top: 10px;
@media (max-width: 490px) {
top: 0;
}
@ -336,9 +365,9 @@
border-bottom-color: #d8c8ac;
}
}
}
}
.summary {
.summary {
.cart-more-options {
margin: 0;
width: max-content;
@ -351,12 +380,13 @@
}
.srp-main-title {
margin: 32px 0 12px;
margin: 0 0 12px;
font-style: normal;
font-weight: normal;
font-weight: 400;
font-size: 24px;
line-height: 28px;
color: $color-gray2;
font-weight: 400;
line-height: 33px;
color: $color-black;
@include mq(md, max) {
margin-top: 0;
@ -374,7 +404,7 @@
background-color: $color-gray5;
border: none;
border-radius: 5px;
color: $color-gray2;
color: $color-black;
font-size: 16px;
letter-spacing: 0.05em;
line-height: 19px;
@ -385,6 +415,7 @@
&:hover {
background-color: lighten($color-gray5, 5);
cursor: pointer;
}
&:active {
@ -404,32 +435,42 @@
margin-bottom: 40px;
}
.srp-postal-code {
.srp-postal-code__form {
.ship-country {
display: none;
}
}
}
.srp-pickup-my-location__button {
background-color: $color-black;
background-color: $color-blue;
border: none;
border-radius: 5px;
color: $color-white;
color: $color-black;
outline: none;
width: 100%;
font-style: normal;
font-weight: 500;
font-size: 14px;
line-height: 16px;
letter-spacing: 0.05em;
cursor: pointer;
&:hover {
background-color: lighten($color-black, 5);
background-color: lighten($color-blue, 5);
cursor: pointer;
}
&:active {
background-color: darken($color-black, 5);
background-color: darken($color-blue, 5);
cursor: pointer;
}
}
}
.srp-toggle {
margin: 0 0 34px;
margin: 0 0 16px;
&__wrapper {
background-color: $color-white;
@ -444,12 +485,12 @@
}
&__current {
border: 1px solid $color-blue;
border: 1px solid $color-black;
border-radius: 100px;
}
.blue {
color: $color-blue;
color: $color-black;
}
label {
@ -470,7 +511,6 @@
font-size: 12px;
line-height: 14px;
color: $color-black;
margin-bottom: 12px;
}
input {
@ -485,7 +525,7 @@
}
& ~ button {
background-color: $color-black;
background-color: $color-blue;
border: none;
border-radius: 5px;
color: $color-white;
@ -495,7 +535,6 @@
outline: none;
position: absolute;
right: -150px;
top: 36px;
transition: all 0.2s linear;
width: 96px;
text-transform: uppercase;
@ -515,7 +554,7 @@
font-weight: normal;
font-size: 10px;
line-height: 12px;
color: $color-blue;
color: $color-black;
margin-top: 7px;
}
@ -605,11 +644,12 @@
span {
font-family: $font-family;
font-style: normal;
font-weight: normal;
font-size: 12px;
line-height: 14px;
color: $color-blue;
color: $color-black;
text-decoration: none;
cursor: pointer;
font-weight: 400;
}
}
@ -630,13 +670,15 @@
}
.coupon-label label {
margin-bottom: 12px;
padding-left: 50px;
margin-bottom: 4px;
font-family: $font-family;
font-style: normal;
font-weight: normal;
font-size: 12px;
line-height: 14px;
color: $color-gray2;
cursor: none;
}
@ -665,6 +707,7 @@
height: 34px;
padding: 0 12px;
max-width: 160px;
display: block;
@include mq(sm, max) {
max-width: 100%;
@ -673,10 +716,10 @@
}
button {
background: $color-black;
background: $color-blue;
border: none;
border-radius: 5px;
color: $color-white;
color: $color-black;
font-size: 12px;
height: 36px;
letter-spacing: 1px;
@ -685,17 +728,18 @@
transition: all 0.2s linear;
width: 94px;
text-transform: uppercase;
text-shadow: none;
@include mq(md, max) {
width: 138px;
}
&: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 +778,7 @@
td.info,
td.monetary {
font-style: normal;
font-weight: normal;
font-weight: bold;
font-size: 18px;
line-height: 21px;
color: $color-black;
@ -742,9 +786,9 @@
}
}
}
}
}
.cart-links-bottom {
.cart-links-bottom {
display: flex;
flex-direction: column;
width: 343px;
@ -776,36 +820,38 @@
font-weight: normal;
font-size: 12px;
line-height: 14px;
color: $color-blue;
color: $color-black;
}
}
.btn-place-order-wrapper {
a {
background: $color-green;
background: $color-blue;
border: none;
border-radius: 5px;
border-radius: 8px;
display: block;
font-size: 0;
transition: ease-in 0.22s all;
padding: 12px 19px;
cursor: pointer;
&:hover {
background-color: darken($color-green, 5);
background-color: darken($color-blue, 5);
color: $color-black;
}
&: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-black;
text-transform: uppercase;
vertical-align: middle;
line-height: 19px;
text-shadow: none;
}
cursor: pointer;
}
}
}

View File

@ -7,28 +7,53 @@
@include mq(md, max) {
padding: 0 16px;
}
p {
display: none;
}
}
&-title {
font-size: 20px;
font-size: 24px;
height: 30px;
color: #000;
font-weight: 700;
line-height: 32.68px;
text-transform: uppercase;
margin-top: 0px !important;
}
&-links {
display: flex;
justify-content: center;
.link-choose-products {
background: $color-black;
border: none;
border-radius: 5px;
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;
text-align: center;
letter-spacing: 0.05em;
color: $color-white;
color: $color-black;
text-transform: uppercase;
width: 100%;
}
&:hover {
background: lighten($color-black, 5);

View File

@ -74,14 +74,32 @@ body {
font-size: 36px;
line-height: 42px;
margin: 40px 0 30px;
letter-spacing: 0.1em;
text-transform: uppercase;
@include mq(md, max) {
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 {
&__content {
&--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 */
.headerCheckout {
.container {
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 {
align-items: center;
display: flex;
@ -11,25 +148,27 @@
&__logo {
img {
height: 52px;
width: auto;
width: 100%;
height: 37.14px;
}
}
&__safeBuy {
span {
align-items: center;
display: flex;
height: 17px;
color: $color-black;
text-transform: uppercase;
font-family: $font-family;
font-style: normal;
font-weight: normal;
font-weight: 400;
font-size: 12px;
line-height: 14px;
line-height: 16px;
color: $color-gray;
}
i {
img {
width: 12px;
margin-right: 8px;
}
}

View File

@ -2,20 +2,19 @@
@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-black: #000;
$color-white: #fff;
$color-29: #292929;
$color-gray: #6c6c6c;
$color-gray2: #7d7d7d;
$color-gray3: #f0f0f0;
$color-gray4: #8d8d8d;
$color-gray5: #e5e5e5;
$color-blue: #4267b2;
$color-blue: #00c8ff;
$color-green: #4caf50;
@ -26,7 +25,7 @@ $grid-breakpoints: (
sm: 576px,
md: 768px,
lg: 992px,
xl: 1200px
xl: 1200px,
) !default;
$z-index: (
@ -34,5 +33,5 @@ $z-index: (
level2: 10,
level3: 15,
level4: 20,
level5: 25
level5: 25,
) !default;