development #1

Merged
andreamatsunaga merged 17 commits from development into main 2022-12-19 04:49:09 +00:00
7 changed files with 379 additions and 158 deletions
Showing only changes of commit 1e6eeab11e - Show all commits

View File

@ -26,6 +26,7 @@ export default class Footer {
this.iconMinus = await waitElement(".icon-minus-sign"); this.iconMinus = await waitElement(".icon-minus-sign");
this.iconPlus = await waitElement(".icon-plus-sign"); this.iconPlus = await waitElement(".icon-plus-sign");
this.prateleira = await waitElement(".footerCheckout__prateleira"); this.prateleira = await waitElement(".footerCheckout__prateleira");
this.naoSeiMeuCep = await waitElement(".ship-postalCode");
// this.prateleiraSlick = await waitElement(".prateleira__carousel") // this.prateleiraSlick = await waitElement(".prateleira__carousel")
} }
@ -36,6 +37,8 @@ export default class Footer {
this.continueShopping.textContent = "Continuar comprando"; this.continueShopping.textContent = "Continuar comprando";
this.frete.textContent = "Frete"; this.frete.textContent = "Frete";
this.unidade.textContent = "Unidade"; this.unidade.textContent = "Unidade";
this.naoSeiMeuCep.children[2].children[0].textContent = "Não sei meu código postal";
} }
} }
@ -76,6 +79,11 @@ export default class Footer {
async renderPrateleira() { async renderPrateleira() {
if (this.prateleira) { if (this.prateleira) {
const prateleiraTitle = document.createElement("h2");
const titleNode = document.createTextNode("Você também pode gostar:");
prateleiraTitle.classList.add("prateleira__title");
prateleiraTitle.appendChild(titleNode);
const prateleiraSlick = document.createElement("ul"); const prateleiraSlick = document.createElement("ul");
prateleiraSlick.classList.add("prateleira__carousel"); prateleiraSlick.classList.add("prateleira__carousel");
@ -92,13 +100,17 @@ export default class Footer {
console.log(product) console.log(product)
const productImageUrl = product.items[0].images[0].imageUrl; const productImageUrl = product.items[0].images[0].imageUrl;
console.log("productImageUrl:", productImageUrl);
const productName = product.productName; const productName = product.productName;
console.log("productName:", productName);
const productSkus = product.items; const productSkus = product.items;
console.log("productSkus:", productSkus); const productLink = product.link;
let skusStructure = ""; let skusStructure = "";
console.log("productImageUrl:", productImageUrl);
console.log("productName:", productName);
console.log("productSkus:", productSkus);
console.log("productLink:", productLink);
productSkus.forEach((sku) => { productSkus.forEach((sku) => {
console.log("sku:", sku); console.log("sku:", sku);
skusStructure += ` skusStructure += `
@ -116,14 +128,17 @@ export default class Footer {
<div class="prateleira__item--description"> <div class="prateleira__item--description">
<p class="prateleira__item--name">${productName}</p> <p class="prateleira__item--name">${productName}</p>
<ul class="prateleira__item--options">${skusStructure}</ul> <ul class="prateleira__item--options">${skusStructure}</ul>
<a class="prateleira__item--link" href="${productLink}">
<button type="button" class="prateleira__item--button">Ver produto</button> <button type="button" class="prateleira__item--button">Ver produto</button>
</a>
</div> </div>
</li> </li>
` `
}) })
prateleiraSlick.innerHTML = cardsStructure; this.prateleira.appendChild(prateleiraTitle);
this.prateleira.appendChild(prateleiraSlick); this.prateleira.appendChild(prateleiraSlick);
prateleiraSlick.innerHTML = cardsStructure;
if(window.innerWidth > 1024) { if(window.innerWidth > 1024) {
this.addCarrossel(prateleiraSlick); this.addCarrossel(prateleiraSlick);

View File

@ -2,4 +2,5 @@
@import "./lib/slick"; @import "./lib/slick";
@import "./partials/header"; @import "./partials/header";
@import "./partials/footer"; @import "./partials/footer";
@import "./partials/prateleira";
@import "./checkout/checkout.scss"; @import "./checkout/checkout.scss";

View File

@ -453,19 +453,25 @@
width: max-content; width: max-content;
.srp-container { .srp-container {
padding: 0 0 0 10px; padding: 0;
@include mq(md, max) { @include mq(md, max) {
padding: 0 16px; padding: 0 16px;
} }
.srp-main-title { .srp-main-title {
margin: 32px 0 12px; margin: 0 0 11px;
font-style: normal; line-height: 33px;
font-weight: normal; font-family: $font-family;
font-size: 24px; font-size: 24px;
line-height: 28px; font-weight: 400;
color: $color-gray2; font-style: normal;
color: $black-500;
display: flex;
align-items: center;
text-align: center;
@include mq(md, max) { @include mq(md, max) {
margin-top: 0; margin-top: 0;
@ -473,24 +479,38 @@
} }
.srp-description { .srp-description {
color: $color-gray2; margin: 0 0 11px;
font-size: 12px; width: 100%;
max-width: 276px;
line-height: 18px; line-height: 18px;
margin: 0 0 12px; font-family: $font-family;
font-size: 14px;
font-weight: 400;
font-style: normal;
color: $color-gray2;
} }
button.shp-open-options { button.shp-open-options {
background-color: $color-gray5; margin: 0;
padding: 12px 41px;
display: flex;
align-items: center;
border: none; border: none;
border-radius: 5px; border-radius: 8px;
color: $color-gray2;
font-size: 16px;
letter-spacing: 0.05em;
line-height: 19px; line-height: 19px;
font-weight: 500; font-family: $font-family;
outline: none; font-size: 14px;
padding: 12px 40px; font-weight: 400;
font-style: normal;
color: $black-500;
background: $gray-100;
text-align: center;
letter-spacing: 0.05em;
text-transform: uppercase;
transition: all 0.2s linear; transition: all 0.2s linear;
outline: none;
&:hover { &:hover {
background-color: lighten($color-gray5, 5); background-color: lighten($color-gray5, 5);
@ -514,18 +534,27 @@
} }
.srp-pickup-my-location__button { .srp-pickup-my-location__button {
background-color: $black-300;
border: none;
border-radius: 5px;
color: $color-white;
outline: none;
width: 100%; width: 100%;
margin-top: 10px;
padding: 12px 35px;
border: none;
border-radius: 8px;
background: #00c8ff;
transition: all 0.2s linear;
outline: none;
span {
line-height: 18px;
font-family: "Open Sans",sans-serif;
font-size: 13px;
font-weight: 700;
font-style: normal; font-style: normal;
font-weight: 500; color: $color-white;
font-size: 14px; text-align: center;
line-height: 16px; text-transform: uppercase;
letter-spacing: 0.05em; letter-spacing: 0.05em;
}
&:hover { &:hover {
background-color: lighten($black-300, 5); background-color: lighten($black-300, 5);
@ -538,9 +567,12 @@
} }
.srp-toggle { .srp-toggle {
margin: 0 0 34px; margin: 0 0 10px;
padding: 0;
&__wrapper { &__wrapper {
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
background-color: $color-white; background-color: $color-white;
border-radius: 100px; border-radius: 100px;
width: 100%; width: 100%;
@ -557,13 +589,21 @@
border-radius: 100px; border-radius: 100px;
} }
.blue { // .blue {
color: $color-blue; // // color: $color-blue;
} // }
label { label {
width: 50%; width: 50%;
font-family: $font-family;
font-style: normal;
font-weight: 400;
font-size: 14px;
line-height: 19px;
text-transform: uppercase;
color: $black-500;
&:active { &:active {
background-color: #f0f0f0; background-color: #f0f0f0;
} }
@ -571,43 +611,68 @@
} }
.srp-postal-code { .srp-postal-code {
&__form {
width: 100%;
.vtex-shipping-preview-0-x-postalCodeForgotten {
gap: 8px;
}
}
.ship-country {
display: none;
}
.ship-postalCode { .ship-postalCode {
width: 172px;
label { label {
font-family: $font-family; margin-bottom: 2px;
font-style: normal;
font-weight: normal;
font-size: 12px;
line-height: 14px; line-height: 14px;
font-family: $font-family;
font-size: 12px;
font-weight: normal;
font-style: normal;
color: $black-300; color: $black-300;
margin-bottom: 12px;
} }
input { input {
width: 172px;
height: 36px;
padding: 12px 8px;
border: 1px solid $color-gray3; border: 1px solid $color-gray3;
border-radius: 5px; border-radius: 5px;
box-shadow: none; box-shadow: none;
color: $color-gray3;
font-size: 12px; font-size: 12px;
height: 36px; color: $color-gray3;
padding: 12px 8px;
width: 172px;
} }
& ~ button { & ~ button {
background-color: $black-300; width: 100px;
border: none;
border-radius: 5px;
color: $color-white;
font-size: 12px;
height: 36px; height: 36px;
letter-spacing: 1px; padding: 8px 11px;
outline: none; border: none;
position: absolute; border-radius: 8px;
right: -150px; line-height: 19px;
top: 36px; font-family: $font-family;
transition: all 0.2s linear; font-size: 14px;
width: 96px; font-weight: 700;
font-style: normal;
color: $color-white;
background: $blue-300;
display: flex;
align-items: center;
text-align: center;
letter-spacing: 0.05em;
text-transform: uppercase; text-transform: uppercase;
transition: all 0.2s linear;
outline: none;
// position: absolute;
// right: -150px;
// top: 36px;
&:hover { &:hover {
background-color: lighten($black-300, 5); background-color: lighten($black-300, 5);
@ -619,13 +684,14 @@
} }
small a { small a {
font-family: $font-family; margin-top: 4px;
font-style: normal;
font-weight: normal;
font-size: 10px;
line-height: 12px; line-height: 12px;
color: $color-blue; font-family: $font-family-secundary;
margin-top: 7px; font-size: 10px;
font-weight: 400;
font-style: normal;
color: $black-500;
text-decoration-line: underline;
} }
span.help.error { span.help.error {
@ -706,6 +772,16 @@
.coupon-data { .coupon-data {
#cart-link-coupon-add { #cart-link-coupon-add {
text-decoration: none; text-decoration: none;
span {
line-height: 14px;
font-family: $font-family-secundary;
font-size: 12px;
font-weight: 400;
font-style: normal;
color: $black-500;
}
&:hover { &:hover {
text-decoration: underline; text-decoration: underline;
cursor: pointer; cursor: pointer;
@ -739,19 +815,24 @@
} }
.coupon-label label { .coupon-label label {
margin-bottom: 12px; margin-bottom: 4px;
font-family: $font-family;
font-style: normal;
font-weight: normal;
font-size: 12px;
line-height: 14px; line-height: 14px;
font-family: $font-family-secundary;
font-size: 12px;
font-weight: 400;
font-style: normal;
color: $color-gray2; color: $color-gray2;
cursor: none; text-align: left;
} }
.coupon-fields { .coupon-fields {
margin-bottom: 32px; margin-bottom: 32px;
span {
display: flex;
gap: 15px;
};
@include mq(sm, max) { @include mq(sm, max) {
span { span {
display: flex; display: flex;
@ -766,14 +847,21 @@
} }
input { input {
border: 2px solid $color-gray3; width: 100%;
max-width: 204px;
height: 36px;
padding: 11px 16px;
border: 1px solid $color-gray5;
border-radius: 5px; border-radius: 5px;
box-shadow: none; line-height: 14px;
color: $color-gray4; font-family: $font-family-secundary;
font-size: 12px; font-size: 12px;
height: 34px; font-weight: 400;
padding: 0 12px; font-style: normal;
max-width: 160px; color: $color-gray-rename;
background: #FFFFFF;
box-shadow: none;
@include mq(sm, max) { @include mq(sm, max) {
max-width: 100%; max-width: 100%;
@ -781,19 +869,31 @@
} }
} }
.loading-coupon {
display: none;
}
button { button {
background: $black-300; width: 133px;
border: none;
border-radius: 5px;
color: $color-white;
font-size: 12px;
height: 36px; height: 36px;
letter-spacing: 1px; border: none;
margin-left: 6px; border-radius: 8px;
line-height: 19px;
font-family: $font-family;
font-size: 14px;
font-weight: 400;
font-style: normal;
color: $black-500;
background: $blue-300;
display: flex;
align-items: center;
justify-content: center;
letter-spacing: 0.05em;
text-transform: uppercase;
outline: none; outline: none;
transition: all 0.2s linear; transition: all 0.2s linear;
width: 94px; // margin-left: 6px;
text-transform: uppercase;
@include mq(md, max) { @include mq(md, max) {
width: 138px; width: 138px;
@ -812,6 +912,15 @@
.accordion-group { .accordion-group {
tr { tr {
padding: 10px 0;
line-height: 16px;
font-family: $font-family-secundary;
font-size: 14px;
font-weight: 400;
font-style: normal;
color: $black-300;
text-align: right;
border-color: #e5e5e5; border-color: #e5e5e5;
td { td {
@ -826,7 +935,7 @@
font-size: 14px; font-size: 14px;
line-height: 16px; line-height: 16px;
color: $black-300; color: $black-300;
padding: 12px 0; padding: 10px 0;
} }
&.info { &.info {
@ -842,10 +951,11 @@
tfoot { tfoot {
td.info, td.info,
td.monetary { td.monetary {
font-style: normal; line-height: 25px;
font-weight: normal; font-family: $font-family;
font-size: 18px; font-size: 18px;
line-height: 21px; font-weight: 700;
font-style: normal;
color: $black-300; color: $black-300;
} }
} }
@ -882,40 +992,49 @@
} }
a { a {
font-family: $font-family; margin: 0;
font-style: normal;
font-weight: normal;
font-size: 12px;
line-height: 14px; line-height: 14px;
color: $color-blue; font-family: $font-family-secundary;
font-size: 12px;
font-weight: 400;
font-style: normal;
color: $black-500;
// text-align: right;
} }
} }
.btn-place-order-wrapper { .btn-place-order-wrapper {
a { a {
background: $color-green;
border: none; border: none;
border-radius: 5px; border-radius: 8px;
display: block; display: block;
font-size: 0; font-size: 0;
background: $blue-300;
transition: ease-in 0.22s all; transition: ease-in 0.22s all;
padding: 12px 19px;
text-align: center;
padding: 12px 0;
&:hover { &:hover {
background-color: darken($color-green, 5); background-color: darken($blue-300, 5);
} }
&:after { &:after {
content: "finalizar compra"; content: "finalizar compra";
font-family: $font-family;
font-weight: 500;
font-size: 13px;
letter-spacing: 0.05em;
color: $color-white;
text-transform: uppercase;
vertical-align: middle;
line-height: 19px; line-height: 19px;
font-family: $font-family;
font-size: 14px;
font-weight: 700;
font-style: normal;
letter-spacing: 0.05em;
text-transform: uppercase;
text-shadow: none; text-shadow: none;
vertical-align: middle;
color: $black-500;
text-align: center;
} }
} }
} }

View File

@ -1,8 +1,6 @@
/* Slider */ /* Slider */
.slick-slider { .slick-slider {
margin: 0;
position: relative; position: relative;
display: block; display: block;
box-sizing: border-box; box-sizing: border-box;
@ -16,11 +14,14 @@
touch-action: pan-y; touch-action: pan-y;
-webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: transparent;
} }
.slick-list { .slick-list {
// height: 100%;
margin: 0 -8px 0 -8px;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
display: block; display: block;
margin: 0 -8px 0 -8px;
padding: 0; padding: 0;
&:focus { &:focus {
@ -42,6 +43,8 @@
} }
.slick-track { .slick-track {
// height: 100%;
position: relative; position: relative;
left: 0; left: 0;
top: 0; top: 0;
@ -65,8 +68,8 @@
} }
.slick-slide { .slick-slide {
margin: 0 8px; margin: 0 8px;
// width: 242px;
//código prévio
float: left; float: left;
height: 100%; height: 100%;
min-height: 1px; min-height: 1px;
@ -74,9 +77,11 @@
[dir="rtl"] & { [dir="rtl"] & {
float: right; float: right;
} }
img { img {
display: block; display: block;
} }
&.slick-loading img { &.slick-loading img {
display: none; display: none;
} }
@ -101,41 +106,51 @@
border: 1px solid transparent; border: 1px solid transparent;
} }
} }
.slick-arrow { .slick-arrow {
font-size: 0;
position: absolute; position: absolute;
top: 50%;
border: 0;
font-size: 0;
z-index: 4;
transform: translateY(-50%);
} }
.slick-prev { .slick-prev {
background: url("https://agenciamagma.vteximg.com.br/arquivos/arrow-left-mini-M3Academy.svg") background: url("https://agenciamagma.vteximg.com.br/arquivos/arrow-left-mini-M3Academy.svg")
no-repeat center center; no-repeat center center;
z-index: 4;
left: 10px; left: 10px;
} }
.slick-next { .slick-next {
z-index: 4; background: url("https://agenciamagma.vteximg.com.br/arquivos/arrow-right-mini-M3Academy.svg")
no-repeat center center;
right: 10px; right: 10px;
} }
.slick-arrow.slick-hidden {
display: none; // .slick-arrow.slick-hidden {
} // display: none;
.slick-dots { // }
li {
margin: 0.5em; // .slick-dots {
button { // li {
overflow: hidden; // margin: 0.5em;
text-indent: 999999999px; // button {
height: 1em; // overflow: hidden;
width: 1em; // text-indent: 999999999px;
border-radius: 1em; // height: 1em;
background-color: #fff; // width: 1em;
:focus { // border-radius: 1em;
outline: none; // background-color: #fff;
} // :focus {
} // outline: none;
&.slick-active button { // }
&:focus { // }
outline: none; // &.slick-active button {
} // &:focus {
} // outline: none;
} // }
} // }
// }
// }

View File

@ -12,7 +12,7 @@
&__prateleira { &__prateleira {
// margin-top: 101px; // margin-top: 101px;
height: 448px; height: 448px;
background-color: green; // background-color: green;
width: 100%; width: 100%;
} }

View File

@ -1,31 +1,100 @@
/* _prateleira.scss */ /* _prateleira.scss */
.footerCheckout__prateleira { .footerCheckout__prateleira {
// estilos no _footer.scss // margin-top: 101px;
} height: 448px;
// background-color: green;
.prateleira__carousel { .prateleira__title {
margin: 0; margin: 0 0 20px;
list-style-type: none; line-height: 38px;
} font-family: $font-family-secundary;
font-size: 24px;
.prateleira__item { font-weight: 400;
width: 242px; // font-style: normal;
height: 390px; text-align: center;
background: red; color: $black-500;
&--image-container {
width: 242px;
height: 242px;
img {
width: 242px;
height: 242px;
} }
.prateleira__carousel {
// (_slick.scss .slick-slider)
margin: 0;
height: 390px;
}
.prateleira__item {
// height: 100%;
// background: yellow;
button {
border: none;
border-radius: 8px;
line-height: 18px;
font-size: 13px;
font-family: $font-family;
font-weight: 700;
color: $color-white;
background: $blue-300;
text-align: center;
text-transform: uppercase;
font-style: normal;
display: flex;
align-items: center;
letter-spacing: 0.05em;
}
&--image {
height: 242px;
} }
&--description { &--description {
background: yellow; display: flex;
flex-direction: column;
gap: 20px;
} }
&--name {
margin: 20px 0 0;
font-family: $font-family;
// font-style: normal;
// font-weight: 400;
line-height: 18px;
font-size: 13px;
text-align: center;
color: $black-500;
}
&--options {
margin: 0 auto;
display: flex;
gap: 5px;
list-style: none;
button {
padding: 5px;
}
}
&--link {
button {
width: 100%;
padding: 12px 0;
justify-content: center;
}
}
}
} }
// .slick-track {
// &:nth-child(3) {
// div li div {
// background: red;
// }
// // &--image-container {
// // //#B1D7F1;
// // }
// }
// }

View File

@ -12,13 +12,15 @@ $color-white: #ffffff;
$color-gray3: #f0f0f0; $color-gray3: #f0f0f0;
$color-gray-rename: #c4c4c4; $color-gray-rename: #c4c4c4;
$color-gray2: #7d7d7d;
$gray-100: #EDEDED;
$gray-300: #989898; $gray-300: #989898;
$blue-300: #00C8FF; $blue-300: #00C8FF;
$color-gray5: #e5e5e5;
$color-gray: #6c6c6c; $color-gray: #6c6c6c;
$color-gray2: #7d7d7d;
$color-gray4: #8d8d8d; $color-gray4: #8d8d8d;
$color-gray5: #e5e5e5;
$color-blue: #4267b2; $color-blue: #4267b2;