develop #6

Merged
Rhayllon_Daudt merged 13 commits from develop into main 2022-12-19 02:54:38 +00:00
6 changed files with 251 additions and 20 deletions
Showing only changes of commit 2693b6b285 - Show all commits

View File

@ -8,12 +8,16 @@ export default class Footer {
async init() {
await this.selectors();
// this.onUpdate();
this.addIconsCardAndVtxpci();
this.addIconVtexAndM3();
}
async selectors() {
//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
this.checkoutVazio = await waitElement(".empty-cart-content");
this.iconesCartoesAndVtexpci = await waitElement(".footerCheckout__stamps");
this.iconsVtexAndM3 = await waitElement(".footerCheckout__developedBy");
}
onUpdate() {
@ -37,4 +41,46 @@ export default class Footer {
slidesToScroll: 1,
});
}
addIconVtexAndM3() {
if (this.iconsVtexAndM3 && window.innerWidth > 1024) {
this.iconsVtexAndM3.innerHTML = `
<li>
<a class="Link1" href="https://vtex.com/br-pt/">
<span>Powered By</span>
<img class="Link1__footer-imgs-logoVtex" src="https://agenciamagma.vteximg.com.br/arquivos/logoVTEXM3Academy.png" alt="Img Icone Vtex" />
</a>
</li>
<li>
<a href="https://agenciam3.com/">
<span>Developed By</span>
<img class="footer-imgs-logoM3" src="https://agenciamagma.vteximg.com.br/arquivos/logoM3M3Academy.png" alt="Img Icone M3" />
</a>
</li>
`;
}
}
addIconsCardAndVtxpci() {
if (this.iconesCartoesAndVtexpci && window.innerWidth > 1024) {
this.iconesCartoesAndVtexpci.innerHTML = `
<li>
<span class="footerCheckout__payments"><img class="footer-imgs-cards" src="https://agenciamagma.vteximg.com.br/arquivos/masterCardM3Academy.png" alt="Img bandeira Mastercard" />
<img class="footer-imgs-cards" src="https://agenciamagma.vteximg.com.br/arquivos/visaM3Academy.png" alt="Img bandeira Visa" />
<img class="footer-imgs-cards" src="https://agenciamagma.vteximg.com.br/arquivos/amexM3Academy.png" alt="adad" />
<img class="footer-imgs-cards" src="https://agenciamagma.vteximg.com.br/arquivos/eloM3Academy.png" alt="Img bandeira Elo" />
<img class="footer-imgs-cards" src="https://agenciamagma.vteximg.com.br/arquivos/hiperCardM3Academy.png" alt="Img bandeira Hipercard" />
<img class="footer-imgs-cards" src="https://agenciamagma.vteximg.com.br/arquivos/payPalM3Academy.png" alt="Img Paypal" />
<img class="footer-imgs-cards-final" src="https://agenciamagma.vteximg.com.br/arquivos/boletoM3Academy.png" alt="Img Boleto" /></span>
</li>
<li>
<span class="footerCheckout__stamps__divider"></span>
</li>
<li>
<span class="footerCheckout__payments"><img class="footer-imgs-vtexpci" src="https://agenciamagma.vteximg.com.br/arquivos/vtexPCIM3Academy.png" alt="Img Vtxpci" /></span>
</li>
`;
}
}
}

View File

@ -8,14 +8,53 @@ export default class Header {
async init() {
await this.selectors();
console.log(this.item);
// console.log(this.item);
this.progressBarCronstructor();
}
async selectors() {
this.item = await waitElement("#my-element", {
//#my-element pode ser a class ou o id do elemento html qeu vocÊ quer pegar
timeout: 5000, // vai esperar 5 segundos antes de rejeitar a promise
interval: 1000, // vai verificar a cada 1 segundo se o elemento existe
});
// this.item = await waitElement("#my-element", {
// //#my-element pode ser a class ou o id do elemento html qeu vocÊ quer pegar
// timeout: 5000, // vai esperar 5 segundos antes de rejeitar a promise
// interval: 1000, // vai verificar a cada 1 segundo se o elemento existe
// });
this.progressBar = await waitElement(".progress-bar");
}
progressBarCronstructor() {
if (this.progressBar && window.innerWidth > 1024) {
this.progressBar.innerHTML = `
<ul class="container-total">
<li class="li-volta-borda-1">
<div class="div-flex1">
<div class="div-itens">
<p class="p-text">Meu Carrinho</p>
<p class="p-bola"></p>
<p class="p-borda-1"></p>
</div>
</div>
</li>
<li class="li-volta-centro">
<div class="div-flex2">
<div class="div-itens">
<p class="p-text">Dados Pessoais</p>
<p class="p-bola"></p>
<p class="p-borda-meio"></p>
</div>
</div>
</li>
<li class="li-volta-borda-2">
<div class="div-flex3">
<div class="div-itens">
<p class="p-text">Pagamento</p>
<p class="p-bola"></p>
<p class="p-borda-2"></p>
</div>
</div>
</li>
</ul>
`;
}
}
}

View File

@ -9,16 +9,27 @@
}
}
&-message{
display: none;
}
&-title {
font-size: 20px;
margin: 170px 0 32px 0;
font-size: 0px;
line-height: 0px;
&::after{
content: "SEU CARRINHO ESTÁ VAZIO";
font-size: 24px;
line-height: 33px;
}
}
&-links {
.link-choose-products {
background: $color-black;
border: none;
border-radius: 5px;
transition: ease-in 0.22s all;
border: 1px solid $color-black;
border-radius: 0;
// transition: ease-in 0.22s all;
outline: none;
font-family: $font-family;
font-style: normal;
@ -27,11 +38,14 @@
line-height: 16px;
text-align: center;
letter-spacing: 0.05em;
color: $color-white;
color: $color-black;
text-transform: uppercase;
margin: 0 0 0 0;
width: 31.74%;
padding: 15px 0;
&:hover {
background: lighten($color-black, 5);
background: lighten($color-white, 5);
}
}
}

View File

@ -9,14 +9,29 @@ html {
}
footer .footerCheckout__wrapper {
width: 94.9734%;
width: 100%;
margin: auto auto 0 auto;
border-top: 1px solid black;
.container{
display: flex;
align-items: center;
width: 94.9734%;
}
}
footer .footerCheckout__prateleira,
header {
width: 79.53125%;
width: 100%;
margin: 0 auto;
}
header{
border-bottom: 1px solid black;
padding: 29px 0;
}
.headerCheckout__safeBuy{
display: flex;
gap: 8px;
height: 15px;
}
body {
display: flex;
@ -52,13 +67,16 @@ body {
width: 80%;
}
}
.row-fluid .full-cart.active{
margin-bottom: 0;
}
.btn-success {
background: $color-black;
background: $color-white;
text-shadow: none;
&:hover {
background: lighten($color-black, 15%);
background: lighten($color-white, 15%);
}
}
@ -81,6 +99,10 @@ body {
margin-left: 30px;
}
}
#cart-title{
display: none !important;
}
.dropdown {
&__content {

View File

@ -10,6 +10,7 @@
}
&__address {
color: $color-gray2;
font-family: $font-family;
font-style: normal;
@ -17,7 +18,11 @@
font-size: 10px;
line-height: 12px;
text-transform: capitalize;
max-width: 40%;
width: 33%;
&::after{
content: ".";
}
@include mq(md, max) {
margin-bottom: 24px;
@ -30,12 +35,27 @@
display: flex;
justify-self: center;
list-style: none;
margin: 0;
width: 33%;
justify-content: center;
@include mq(md, max) {
align-self: center;
margin-bottom: 12px;
}
.footer-imgs-cards {
width: 10.01%;
margin-right: 12px;
&-final{
width: 10.01%;
margin-right: 0px
}
}
.footer-imgs-vtexpci{
width: 84.4%;
}
&__divider {
background-color: $color-gray4;
display: inline-block;
@ -50,6 +70,19 @@
display: flex;
list-style-type: none;
margin: 0;
width: 33%;
justify-content: flex-end;
.Link1{
justify-content: end;
&__footer-imgs-logoVtex{
width: 20%;
}
}
.footer-imgs-logoM3{
width: 17%;
}
li:last-child {
margin-left: 16px;

View File

@ -1,17 +1,94 @@
/* _header.scss */
.headerCheckout {
.container {
width: auto !important;
width: 79.53125%;
margin: 0 auto;
}
&__wrapper {
align-items: center;
display: flex;
justify-content: space-between;
.progress-bar{
height: 35px;
.container-total{
display: grid;
padding: 0;
grid-template-columns: 2fr 1fr 2fr;
width: 439px;
/* border: 1px solid rgb(59, 51, 51); */
margin: 0;
.li-volta-borda-1,
.li-volta-borda-2,
.li-volta-centro {
display: flex;
flex-direction: column;
list-style: none;
/* border: 1px solid violet; */
}
.p-text{
width: max-content;
font-weight: 400;
font-size: 12px;
line-height: 14px;
margin-bottom: 9px;
}
.p-bola{
border: 1px solid black;
border-radius: 50%;
width: 10px;
height: 10px;
background-color: white;
}
.div-itens{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.div-flex1,
.div-flex2,
.div-flex3 {
display: flex;
position: relative;
width: 100%;
}
.div-flex1{
justify-content: flex-start;
}
.div-flex2{
justify-content: center;
}
.div-flex3{
justify-content: flex-end;
}
.p-borda-1{
border-top: 1.5px solid black;
position: absolute;
left: 25.6%;
bottom: 5px;
margin: 0;
width: 95.9%;
transform: translateY(-7px);
}
.p-borda-2{
border-top: 1.5px solid black;
position: absolute;
right: 22%;
bottom: 5px;
margin: 0;
width: 99.3%;
transform: translateY(-7px);
}
}
}
}
&__logo {
img {
height: 52px;
height: 37.14px;
width: auto;
}
}