feat(newsletter): Adiciona a newsletter do desktop

This commit is contained in:
amanda almeida 2022-12-09 17:48:20 -03:00
parent 8dc4aa87ad
commit 9ec0d88a16
5 changed files with 89 additions and 188 deletions

View File

@ -66,8 +66,8 @@ const app = new Container({
app.bind(Minicart.name, ".minicart__drawer"); app.bind(Minicart.name, ".minicart__drawer");
app.bind(Newsletter.name, { app.bind(Newsletter.name, {
elemento: ".news-form", elemento: ".footer-newsletter__form",
textButtom: "Cadastre-se", textButtom: "CADASTRE-SE",
}); });
export default app; export default app;

View File

@ -1,196 +1,95 @@
/***************************************************************/ .footer-newsletter {
/**-- Newslettter --------------------------********************/ padding: 24px 0;
/*-------------------------------------------------------------*/ background: linear-gradient(180deg, $blue-500 0%, $blue-600 100%);
.captacao-emails-newsletter { &__wrapper {
background-color: #f71963; margin: 0 auto;
background-image: url("/arquivos/template-background-newsletter.png"); max-width: 698px;
margin-top: 104px;
padding: 12px 15px 24px;
@include mq(md, max) {
background-image: url("/arquivos/template-mobile-background-newsletter.png");
background-size: cover;
padding: 52px 15px 42px;
} }
.row { &__title {
margin: 0 0 10px;
font-size: 14px;
line-height: 17px;
color: $white-500;
}
.m3-custom-newsletter-form {
display: flex;
align-items: center; align-items: center;
} position: relative;
>.row>div {
max-width: 960px;
margin: auto;
padding: 0 3.5%;
}
h3 {
color: #fff;
font-size: 18px;
font-weight: normal;
line-height: 26px;
margin: 0 0 8px;
@include mq(md, max) {
margin-bottom: 24px;
}
span {
display: block;
font-size: 26px;
}
}
p {
font-size: 15px;
margin: 0;
}
}
.m3-custom-newsletter-form {
position: relative;
label {
display: none;
} }
fieldset { fieldset {
display: inline-block; flex: 1;
margin: 0 16px 0 0;
padding: 0; padding: 0;
margin-right: 16px;
max-width: 270px;
width: 36%;
@include mq(md, max) { &:last-of-type {
margin-bottom: 8px; margin-right: 0;
max-width: 100%;
width: 100%;
} }
&.m3-cn-button-ok-container { &.m3-cn-button-ok-container {
max-width: 126px; max-width: 126px;
margin: 0;
width: 100%;
@include mq(md, max) {
max-width: 100%;
}
}
}
input {
border: none;
font-size: 14px;
outline: none;
padding: 9px 16px;
width: 100%;
@include mq(md, max) {
font-size: 24px;
padding: 18.5px 24px;
} }
&::placeholder { label {
color: #142032; display: none;
}
&#m3-cn-button-ok {
background-color: #142032;
color: #fff;
cursor: pointer;
font-weight: 700;
font-size: 14px;
text-transform: lowercase;
transition: all 0.15s linear;
@include mq(md, max) {
font-size: 24px;
margin-top: 8px;
}
&:hover {
background-color: lighten(#142032, 5);
}
&:active {
background-color: darken(#142032, 5);
}
}
}
.m3-cn-msg {
font-weight: 700;
text-align: center;
.m3-cn-error {
background-color: #fff;
border-radius: 2px;
bottom: -28px;
color: hsla(348, 83%, 58%, 1);
display: table;
left: 40%;
margin: auto;
padding: 3px 6px;
position: absolute;
right: 0;
}
.m3-cn-success {
color: #fff;
display: inline-block;
font-size: 16px;
margin-right: 20px;
text-transform: lowercase;
}
.btn-voltar {
background-color: #fff;
border-radius: 2px;
color: #f71963;
display: inline-block;
font-size: 14px;
line-height: 1;
padding: 4px 8px;
text-transform: lowercase;
}
}
}
/* pop-up-newsletter */
.pop-up-newsletter {
display: none;
position: fixed;
z-index: 10;
width: 100%;
top: 20%;
.newsletter {
text-align: center;
background-color: #fff;
padding: 20px;
display: table;
margin: 0 auto;
position: relative;
.close-popup {
font-size: 35px;
color: #000;
padding: 5px;
cursor: pointer;
position: absolute;
top: 0;
right: 0;
line-height: 0.5;
} }
input { input {
border-bottom: solid 1px #333; width: 100%;
height: 41px;
padding: 0 16px;
border: 0;
outline: 0;
font-size: 10px;
line-height: 12px;
background: $white-500;
&::placeholder {
text-transform: uppercase;
color: $gray-200;
}
&.m3-cn-button-ok {
font-weight: 900;
background: $black-500;
color: $white-500;
cursor: pointer;
@include mq(lg, max) {
&:active {
background: lighten($black-500, 10);
}
}
@include mq(lg, min) {
&:hover {
background: lighten($black-500, 10);
}
&:active {
background: $black-500;
}
}
}
} }
} }
.m3-custom-newsletter-form .btn-voltar { .m3-cn-msg {
color: #333; position: absolute;
border-color: #333; top: calc(100% + 8px);
left: 50%;
transform: translateX(-50%);
line-height: 1;
font-weight: 700;
.m3-cn-error {
color: $red-300;
}
} }
} }

View File

@ -31,7 +31,7 @@
gap: 10px; gap: 10px;
font-size: 12px; font-size: 12px;
line-height: 15px; line-height: 15px;
color: $gray-200; color: $gray-300;
} }

View File

@ -1,5 +1,5 @@
// fonts // fonts
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&family=Roboto&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&family=Roboto&display=swap');
$font-family: 'Inter', sans-serif; $font-family: 'Inter', sans-serif;
$font-weight-light: 300; $font-weight-light: 300;
$font-weight-regular: 400; $font-weight-regular: 400;
@ -9,10 +9,16 @@ $font-height: 1.5;
// colors // colors
$black-500: #000; $black-500: #000;
$white-500: #fff; $white-500: #fff;
$blue-600: #03ADDC;
$blue-500: #00C8FF; $blue-500: #00C8FF;
$red-300: #db4c4c;
$gray-500: #333333; $gray-500: #333333;
$gray-400: #6D6E70; $gray-400: #6D6E70;
$gray-200: #828282; $gray-300: #828282;
$gray-200: #BDBDBD;
$gray-100: #E0E0E0; $gray-100: #E0E0E0;

View File

@ -1,12 +1,8 @@
<section class="captacao-emails-newsletter container-fluid"> <section class="footer-newsletter">
<div class="row"> <div class="footer-newsletter__wrapper">
<div class="col-12 col-lg-10 offset-lg-1 col-xl-8 offset-xl-2 row"> <h3 class="footer-newsletter__title">
<div class="col-12"> RECEBA NOVIDADES E DESCONTOS EXCLUSIVOS
<h3>Receba novidades e <span>descontos <strong>exclusivos</strong></span></h3> </h3>
</div> <div class="footer-newsletter__form"></div>
<div class="col-12">
<div class="news-form"></div>
</div>
</div>
</div> </div>
</section> </section>