style: adaptando slick para todas as telas

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

View File

@ -24,7 +24,7 @@ export default class Footer {
}
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>`;
const response = await fetch(
@ -40,16 +40,20 @@ export default class Footer {
footerCheckoutPrateleiraList.innerHTML += `
<li class="cards">
<img src="${image}" alt="" class="cards__product__img"/>
<h3 class="cards__product__name">${name}</h3>
<ul class="cards__product__sizes">
${produto.items
.map((name) => {
return `<li>${name.name}</li>`;
})
.join("")}
</ul>
<a href="${produto.link}">Ver produto</a>
<div class="cards__product__container">
<img src="${image}" alt="" class="cards__product__img"/>
<div class="cards__product">
<h3 class="cards__product__name">${name}</h3>
<ul class="cards__product__sizes">
${produto.items
.map((name) => {
return `<li>${name.name}</li>`;
})
.join("")}
</ul>
<a href="${produto.link}" class="button-product">Ver produto</a>
</div>
</div>
</li>
`;
});

View File

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

View File

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