From 8dd7e1f34992c6eface0cf70a4b8857ad4ef283d Mon Sep 17 00:00:00 2001 From: Rafael Sampaio Date: Tue, 13 Dec 2022 09:47:19 -0300 Subject: [PATCH 1/2] feat: adiciona css carrinho vazio --- checkout/src/arquivos/js/components/Footer.js | 14 ++++++- .../sass/checkout/_checkout-vazio.scss | 40 ++++++++++++++----- .../src/arquivos/sass/partials/_footer.scss | 4 ++ 3 files changed, 48 insertions(+), 10 deletions(-) diff --git a/checkout/src/arquivos/js/components/Footer.js b/checkout/src/arquivos/js/components/Footer.js index 00cfb95..635341d 100644 --- a/checkout/src/arquivos/js/components/Footer.js +++ b/checkout/src/arquivos/js/components/Footer.js @@ -7,6 +7,11 @@ export default class Footer { async init() { this.list = await this.fetchApiData(); + this.cartTitle = await waitElement("#cart-title"); + this.emptyTitle = await waitElement(".empty-cart-title"); + this.emptyButton = await waitElement(".link-choose-products"); + this.emptyCartTitle(); + this.emptyCartButton(); await this.selectors(); this.events(); this.cartUpdate(); @@ -20,7 +25,6 @@ export default class Footer { //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.cartTitle = await waitElement("#cart-title"); this.prateleira = await waitElement(".footerCheckout__prateleira"); } @@ -127,6 +131,14 @@ export default class Footer { } } + emptyCartTitle() { + this.emptyTitle.innerHTML = `Seu Carrinho está Vazio`; + } + + emptyCartButton() { + this.emptyButton.innerHTML = `Continuar Comprando`; + } + async addCarrossel() { const elemento = await waitElement(".footerCheckout__prateleira-container"); $(elemento).slick({ diff --git a/checkout/src/arquivos/sass/checkout/_checkout-vazio.scss b/checkout/src/arquivos/sass/checkout/_checkout-vazio.scss index 6175384..d078a74 100644 --- a/checkout/src/arquivos/sass/checkout/_checkout-vazio.scss +++ b/checkout/src/arquivos/sass/checkout/_checkout-vazio.scss @@ -3,6 +3,7 @@ &-content { color: $color-black; text-align: center; + margin-top: 150px; @include mq(md, max) { padding: 0 16px; @@ -10,28 +11,49 @@ } &-title { - font-size: 20px; + font-family: "Open Sans"; + font-style: normal; + font-weight: 700; + font-size: 24px; + line-height: 33px; + text-align: center; + text-transform: uppercase; + } + + &-message { + p { + display: none; + } } &-links { + display: flex; + justify-content: center; .link-choose-products { - background: $color-black; - border: none; - border-radius: 5px; + display: flex; + align-items: center; + justify-content: center; + background: $color-white; + border: 1px solid $color-black; + border-radius: 0; transition: ease-in 0.22s all; outline: none; - font-family: $font-family; + font-family: "Tenor Sans"; font-style: normal; - font-weight: 500; + font-weight: 400; font-size: 14px; line-height: 16px; text-align: center; - letter-spacing: 0.05em; - color: $color-white; text-transform: uppercase; + letter-spacing: 0.05em; + color: $color-black; + width: 31.739%; + height: 46px; + padding: 0; &:hover { - background: lighten($color-black, 5); + // cursor: pointer; + background: $color-white !important; } } } diff --git a/checkout/src/arquivos/sass/partials/_footer.scss b/checkout/src/arquivos/sass/partials/_footer.scss index d7eb728..b17422b 100644 --- a/checkout/src/arquivos/sass/partials/_footer.scss +++ b/checkout/src/arquivos/sass/partials/_footer.scss @@ -48,6 +48,10 @@ border: none; background: transparent; padding: 0; + + button { + cursor: pointer; + } } } -- 2.34.1 From de3dbb179741a41ee547e304a3b7138d44418051 Mon Sep 17 00:00:00 2001 From: Rafael Sampaio Date: Tue, 13 Dec 2022 09:49:56 -0300 Subject: [PATCH 2/2] refactor: altera css botao carrinho vazio --- checkout/src/arquivos/sass/checkout/_checkout-vazio.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/checkout/src/arquivos/sass/checkout/_checkout-vazio.scss b/checkout/src/arquivos/sass/checkout/_checkout-vazio.scss index d078a74..9396ce2 100644 --- a/checkout/src/arquivos/sass/checkout/_checkout-vazio.scss +++ b/checkout/src/arquivos/sass/checkout/_checkout-vazio.scss @@ -52,7 +52,6 @@ padding: 0; &:hover { - // cursor: pointer; background: $color-white !important; } } -- 2.34.1