style(Slick): adaptando para todas as telas

This commit is contained in:
Ana Carolina Duarte Cavalcante 2022-12-19 19:11:33 -03:00
parent d59a70a37f
commit f6691180f4
3 changed files with 176 additions and 104 deletions

View File

@ -24,7 +24,7 @@ export default class Footer {
} }
async ListProducts() { async ListProducts() {
this.sliderProducts.innerHTML += `<h2>Você também pode gostar:</h2> this.sliderProducts.innerHTML += `<h2 class="title-slick">Você também pode gostar:</h2>
<ul class="footerCheckout__plateleira__list"></ul>`; <ul class="footerCheckout__plateleira__list"></ul>`;
const response = await fetch( const response = await fetch(
@ -40,16 +40,20 @@ export default class Footer {
footerCheckoutPrateleiraList.innerHTML += ` footerCheckoutPrateleiraList.innerHTML += `
<li class="cards"> <li class="cards">
<img src="${image}" alt="" class="cards__product__img"/> <div class="cards__product__container">
<h3 class="cards__product__name">${name}</h3> <img src="${image}" alt="" class="cards__product__img"/>
<ul class="cards__product__sizes"> <div class="cards__product">
${produto.items <h3 class="cards__product__name">${name}</h3>
.map((name) => { <ul class="cards__product__sizes">
return `<li>${name.name}</li>`; ${produto.items
}) .map((name) => {
.join("")} return `<li>${name.name}</li>`;
</ul> })
<a href="${produto.link}">Ver produto</a> .join("")}
</ul>
<a href="${produto.link}" class="button-product">Ver produto</a>
</div>
</div>
</li> </li>
`; `;
}); });

View File

@ -1,14 +1,24 @@
/* _footer.scss */ /* _footer.scss */
.disable {
display: none !important;
}
.footerCheckout { .footerCheckout {
margin-top: auto; margin-top: auto;
color: $color-black;
bottom: 0; bottom: 0;
width: 100%;
&__prateleira { // slick
width: auto; .footerCheckout__prateleira {
margin: 0; display: flex;
bottom: 56px; flex-direction: column;
& h2 { gap: 20px;
li {
list-style: none;
}
.title-slick {
font-family: "Tenor Sans"; font-family: "Tenor Sans";
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
@ -22,116 +32,175 @@
line-height: 76px; line-height: 76px;
} }
} }
& .footerCheckout__plateleira__list { & .footerCheckout__plateleira__list {
margin: 0 0 56px 0; display: flex;
.slick-slide { gap: 16px;
display: flex; margin: 0 0 56px;
justify-content: center;
align-items: center; @media (min-width: $checkout2500px) {
margin: auto; gap: 16.94px;
outline: none; }
.cards {
display: flex !important; .cards {
width: 100%;
height: 100%;
@media (min-width: $checkout2500px) {
min-width: 485.07px;
height: 686px;
}
@media (min-width: $checkout1270px) {
min-width: 242px;
}
.cards__product__container {
display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; align-items: center;
height: 390px; justify-content: center;
row-gap: 20px; gap: 20px;
@media (min-width: $checkout2500px) { height: auto;
width: 485.07px !important;
height: 685px; li,
a {
display: flex;
align-items: center;
text-align: center;
font-family: $font-family;
background-color: $color-blue2;
color: $color-white;
border-radius: 8px;
font-weight: 700;
font-size: 13px;
line-height: 18px;
letter-spacing: 0.05em;
text-transform: uppercase;
padding: 0;
@media (min-width: $checkout2500px) {
font-size: 26px;
line-height: 35px;
}
} }
@media (max-width: $checkout1024px) {
width: 320px !important; & .cards__product__img {
height: 468px; width: 100%;
} height: auto;
@media (max-width: $checkout375px) {
width: 164px !important;
height: 363px;
}
&__product__img {
width: 242px;
height: 242px;
@media (min-width: $checkout2500px) { @media (min-width: $checkout2500px) {
min-width: 485.07px; min-width: 485.07px;
height: 485.07px; height: 485.07px;
} }
@media (max-width: $checkout1024px) {
width: 320px; @media (min-width: $checkout370px) and (max-width: $checkout375px) {
height: 320px;
}
@media (max-width: $checkout375px) {
width: 164px; width: 164px;
}
@media (max-width: 490px) {
height: 164px; height: 164px;
} }
} }
&__product__name { .cards__product {
font-style: normal;
font-weight: 400;
font-size: 13px;
line-height: 18px;
text-align: center;
color: $color-black2;
margin: 0;
width: auto;
@media (min-width: $checkout2500px) {
font-size: 26px;
line-height: 35px;
}
}
&__product__sizes {
display: flex; display: flex;
justify-content: center; flex-direction: column;
align-items: center; align-items: center;
width: auto; justify-content: center;
height: 28px; row-gap: 20px;
column-gap: 5px; height: auto;
margin: 0; width: 100%;
@media (max-width: $checkout375px) {
flex-wrap: wrap; &__name {
}
& li {
list-style: none;
background: $color-blue2;
border-radius: 8px;
padding: 5px;
font-style: normal; font-style: normal;
font-weight: 700; font-weight: 400;
font-size: 13px; font-size: 13px;
line-height: 18px; line-height: 18px;
text-align: center;
color: $color-black2;
margin: 0;
text-align: center;
@media (min-width: 2500px) {
font-size: 26px;
line-height: 35px;
}
@media (max-width: $checkout720px) {
padding-left: 25px;
padding-right: 25px;
}
@media (max-width: 490px) {
text-align: center;
}
}
&__sizes {
display: flex;
justify-content: center;
align-items: center;
width: auto;
height: 28px;
column-gap: 5px;
row-gap: 5px;
margin: 0;
@media (max-width: $checkout375px) {
flex-wrap: wrap;
}
& li {
list-style: none;
background: $color-blue2;
border-radius: 8px;
padding: 5px;
font-style: normal;
font-weight: 700;
font-size: 13px;
line-height: 18px;
display: flex;
align-items: center;
text-align: center;
letter-spacing: 0.05em;
text-transform: uppercase;
color: $color-white;
white-space: nowrap;
@media (min-width: $checkout2500px) {
font-size: 26px;
line-height: 35px;
}
}
@media (max-width: 1270px) {
flex-wrap: wrap;
min-height: 61px;
& li {
height: 28px;
}
}
}
& .button-product {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center;
width: 100%;
height: 42px;
background: $color-blue2;
border-radius: 8px;
text-align: center; text-align: center;
letter-spacing: 0.05em; letter-spacing: 0.05em;
text-transform: uppercase; text-transform: uppercase;
color: $color-white; color: $color-white;
white-space: nowrap; cursor: pointer;
&:hover,
&:active {
text-decoration: none;
}
@media (min-width: $checkout2500px) { @media (min-width: $checkout2500px) {
height: 59px;
font-size: 26px; font-size: 26px;
line-height: 35px; line-height: 35px;
} }
} }
} }
& a {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 42px;
background: $color-blue2;
border-radius: 8px;
text-align: center;
letter-spacing: 0.05em;
text-transform: uppercase;
color: $color-white;
@media (min-width: $checkout2500px) {
height: 59px;
font-size: 26px;
line-height: 35px;
}
}
} }
} }
} }
@ -184,6 +253,7 @@
margin: 0 -8px; margin: 0 -8px;
} }
// footer
&__wrapper { &__wrapper {
border-top: 1px solid $color-black2; border-top: 1px solid $color-black2;
padding: 16px 0; padding: 16px 0;
@ -358,7 +428,6 @@
list-style-type: none; list-style-type: none;
margin: 0; margin: 0;
justify-content: flex-end; justify-content: flex-end;
// width: 33%;
gap: 10.73px; gap: 10.73px;
@media (max-width: $checkout375px), (max-width: $checkout1024px) { @media (max-width: $checkout375px), (max-width: $checkout1024px) {
order: 3; order: 3;
@ -447,7 +516,3 @@
} }
} }
} }
.disable {
display: none !important;
}

View File

@ -51,4 +51,7 @@ $z-index: (
/* media querie */ /* media querie */
$checkout2500px: (2500px); $checkout2500px: (2500px);
$checkout1024px: (1025px); $checkout1024px: (1025px);
$checkout1270px: (1270px);
$checkout720px: (720px);
$checkout375px: (376px); $checkout375px: (376px);
$checkout370px: (370px);