refactor: altera código para adicionar logos no footer

This commit is contained in:
Rafael Sampaio de Oliveira 2022-12-14 13:43:21 -03:00
parent fd8d93fe52
commit 9a2fc54b65
2 changed files with 48 additions and 40 deletions

View File

@ -15,12 +15,10 @@ export default class Footer {
this.emptyButton = await waitElement(".link-choose-products");
this.paymentsMethods = await waitElement(".footerCheckout__payments");
this.certification = await waitElement(".footerCheckout__vtexpci");
this.developedBy = await waitElement(".footerCheckout__developedBy");
this.emptyCartTitle();
this.emptyCartButton();
this.addPaymentsMethodsIcons();
this.addCertificationIcon();
this.addDevelopedByIcons();
this.events();
this.items = await waitElement(".footerCheckout__prateleira-container");
console.log(this.items, "console de items");
@ -193,27 +191,6 @@ export default class Footer {
`;
}
addDevelopedByIcons() {
this.developedBy.innerHTML = `
<li>
<a href="https://vtex.com/br-pt/">
<span>Powered By</span>
<span class="vetexIcon">
<img src="https://agenciamagma.vteximg.com.br/arquivos/logoVTEXM3Academy.png" alt="Logo da Vtex" />
</span>
</a>
</li>
<li>
<a href="https://agenciam3.com/">
<span>Developed By</span>
<span class="m3Icon">
<img src="https://agenciamagma.vteximg.com.br/arquivos/logoM3M3Academy.png" alt="Logo da M3"/>
</span>
</a>
</li>
`;
}
async addCarrossel() {
const elemento = await waitElement(".footerCheckout__prateleira-container");
$(elemento).slick({

View File

@ -210,32 +210,63 @@
display: flex;
list-style-type: none;
margin: 0;
gap: 16px;
li:first-child {
a {
align-items: center;
color: $color-gray2;
display: flex;
font-family: $font-family;
font-style: normal;
font-weight: normal;
font-size: 0;
line-height: 12px;
text-decoration: none;
&::after {
background-image: url("https://agenciamagma.vteximg.com.br/arquivos/logoVTEXM3Academy.png");
background-repeat: no-repeat;
background-size: 45px 16px;
content: "";
width: 45px;
height: 16px;
display: inline-block;
}
}
}
li:last-child {
margin-left: 16px;
a {
align-items: center;
color: $color-gray2;
display: flex;
font-family: $font-family;
font-style: normal;
font-weight: normal;
font-size: 0;
line-height: 12px;
text-decoration: none;
&::after {
background-image: url("https://agenciamagma.vteximg.com.br/arquivos/logoM3M3Academy.png");
background-repeat: no-repeat;
background-size: 29px 16px;
content: "";
width: 29px;
height: 16px;
display: inline-block;
}
}
}
a {
align-items: center;
color: $color-gray2;
display: flex;
font-family: $font-family;
font-style: normal;
font-weight: normal;
font-size: 10px;
line-height: 12px;
text-decoration: none;
span {
display: flex;
justify-content: center;
align-items: center;
}
img {
display: block;
height: 16px;
margin-left: 8px;
margin-right: 8px;
font-size: 10px;
}
}
}