feat(footer): scss do footer mobile e telas acima de 2500px

This commit is contained in:
Gabriel Ferraz Nogueira 2022-12-13 19:44:29 -03:00
parent 334bea8cba
commit 35ae50f710
2 changed files with 80 additions and 65 deletions

View File

@ -8,6 +8,7 @@ export default class Footer {
async init() { async init() {
await this.selectors(); await this.selectors();
this.createPaymentsIcons(); this.createPaymentsIcons();
this.createVtexpciIcon();
this.createDevIcons(); this.createDevIcons();
// this.onUpdate(); // this.onUpdate();
} }
@ -16,14 +17,14 @@ export default class Footer {
//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(".empty-cart-content");
this.payments = await waitElement(".footerCheckout__stamps"); this.payments = await waitElement(".footerCheckout__payments");
this.vtexpci = await waitElement(".footerCheckout__vtexpci");
this.devIncons = await waitElement(".footerCheckout__developedBy"); this.devIncons = await waitElement(".footerCheckout__developedBy");
} }
createPaymentsIcons() { createPaymentsIcons() {
this.payments.innerHTML = ` this.payments.innerHTML = `
<div class="payments-icons-wrapper"> <ul class="payments-icons-wrapper">
<ul>
<li> <li>
<img <img
src="https://agenciamagma.vteximg.com.br/arquivos/masterCardM3Academy.png" src="https://agenciamagma.vteximg.com.br/arquivos/masterCardM3Academy.png"
@ -66,14 +67,17 @@ export default class Footer {
alt="" alt=""
/> />
</li> </li>
<li id="vtexIcon"> </ul>
<img </div>
`;
}
createVtexpciIcon() {
this.vtexpci.innerHTML = `
<img class="vtex-icon"
src="https://agenciamagma.vteximg.com.br/arquivos/vtexPCIM3Academy.png" src="https://agenciamagma.vteximg.com.br/arquivos/vtexPCIM3Academy.png"
alt="" alt=""
/> />
</li>
</ul>
</div>
`; `;
} }

View File

@ -2,16 +2,15 @@
.container { .container {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 7px 0;
align-items: center;
margin: 0;
width: 100%; width: 100%;
padding: 7px 0;
margin: 0;
@include mq(dt, min) { @include mq(dt, min) {
flex-direction: row; flex-direction: row;
align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 15px 0 15px 0; padding: 15px 0 15px 0;
gap: 0;
} }
@include mq(tv, min) { @include mq(tv, min) {
@ -38,7 +37,7 @@
margin-top: 17px; margin-top: 17px;
span { span {
margin-left: 8px; margin-left: 16px;
} }
} }
@ -56,70 +55,69 @@
} }
&__stamps { &__stamps {
display: flex;
align-items: center;
justify-self: center;
margin: 0;
list-style: none;
@include mq(dt, max) {
display: flex;
order: 1;
align-self: center;
}
.payments-icons-wrapper {
img {
width: 100%;
}
ul {
margin: 0;
display: flex; display: flex;
align-items: center; align-items: center;
list-style: none; list-style: none;
margin: 0 0 0 5px;
@include mq(dt, min) { @include mq(dt, min) {
justify-content: center; justify-content: center;
min-width: 404px;
margin: 0;
} }
@include mq(tv, min) {
min-width: 690.52px;
} }
.payments-icons-wrapper {
display: flex;
align-items: center;
justify-content: center;
list-style: none;
margin: 0;
li { li {
width: 3.77%; width: 35.65px;
min-width: 35.65px; }
margin-right: 4px;
@include mq(tv, min) {
li {
width: 69.63px;
}
}
}
.footerCheckout__stamps__divider {
position: relative;
border-left: 1px solid $gray;
margin-left: 4px;
// &::before {
// content: "";
// color: $gray;
// position: absolute;
// }
@include mq(dt, min) { @include mq(dt, min) {
width: 5.22%; margin-left: 11.35px;
margin-right: 13px;
}
@include mq(tv, min) {
width: 6.12%;
} }
} }
#vtexIcon { .footerCheckout__vtexpci {
width: 53px;
margin-left: 10px; margin-left: 10px;
position: relative;
.vtex-icon {
width: 53px;
height: 33px;
} }
#vtexIcon::before { @include mq(tv, min) {
content: ""; .vtex-icon {
position: absolute; width: 103.52px;
display: inline-block; height: 64.46px;
height: 24px;
top: 5px;
left: -10px;
border-left: 1px solid $gray;
} }
} }
&__divider {
background-color: $gray-200;
display: inline-block;
height: 24px;
margin: 0 8px;
width: 1px;
} }
} }
@ -128,7 +126,7 @@
display: flex; display: flex;
list-style-type: none; list-style-type: none;
margin: 0; margin: 0;
margin-right: 16.5px; // margin-right: 16.5px;
@include mq(dt, max) { @include mq(dt, max) {
display: flex; display: flex;
@ -139,6 +137,7 @@
@include mq(dt, min) { @include mq(dt, min) {
min-width: 217px; min-width: 217px;
margin-right: 22.5px;
} }
li { li {
@ -189,4 +188,16 @@
} }
} }
} }
.footerCheckout::after,
::before {
display: none;
content: none;
}
.footerCheckout::before,
::after {
display: none;
content: none;
}
} }