feat(home): Cria o formulario de newsletter

This commit is contained in:
Manuela Luana Schumacker Tavares 2022-12-06 15:52:18 -03:00
parent 6deb39d4a3
commit 85a1910ec8
5 changed files with 99 additions and 178 deletions

View File

@ -65,9 +65,10 @@ 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,116 @@
/***************************************************************/ .footer-newsletter {
/**-- Newslettter --------------------------********************/ padding: 24px 15px;
/*-------------------------------------------------------------*/ background: linear-gradient(180deg, $color-blue 0%, $color-blue2 100%);
.captacao-emails-newsletter { &__wrapper {
background-color: #f71963; max-width: 698px;
background-image: url("/arquivos/template-background-newsletter.png"); margin: 0 auto;
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: $color-white;
@include mq(lg, max) {
margin-bottom: 8px;
max-width: 224px;
}
}
.m3-custom-newsletter-form {
display: flex;
position: relative;
@include mq(lg, max) {
flex-direction: column;
align-items: stretch;
}
@include mq(lg, min) {
align-items: center; align-items: center;
} }
> .row > div {
max-width: 960px;
margin: auto;
padding: 0 3.5%;
} }
h3 { fieldset {
color: $color-white; flex: 1;
font-size: 18px; padding: 0;
font-weight: normal; margin: 0;
line-height: 26px;
margin: 0 0 8px;
@include mq(md, max) { @include mq(lg, max) {
margin-bottom: 24px; margin-bottom: 8px;
} }
span { @include mq(lg, min) {
display: block; margin-right: 16px;
font-size: 26px;
}
} }
p { &:last-of-type {
font-size: 15px;
margin: 0; margin: 0;
} }
}
.m3-custom-newsletter-form { &.m3-cn-button-ok-container {
position: relative; @include mq(lg, min) {
max-width: 126px;
}
}
label { label {
display: none; display: none;
} }
fieldset {
display: inline-block;
padding: 0;
margin-right: 16px;
max-width: 270px;
width: 36%;
@include mq(md, max) {
margin-bottom: 8px;
max-width: 100%;
width: 100%;
}
&.m3-cn-button-ok-container {
max-width: 126px;
margin: 0;
width: 100%;
@include mq(md, max) {
max-width: 100%;
}
}
}
input { input {
border: none;
font-size: 14px;
outline: none;
padding: 9px 16px;
width: 100%; width: 100%;
height: 41px;
@include mq(md, max) { padding: 0 16px;
font-size: 24px; border: 0;
padding: 18.5px 24px; outline: 0;
} font-size: 10px;
line-height: 12px;
background: $color-white;
&::placeholder { &::placeholder {
color: #142032; text-transform: uppercase;
color: $color-grey2;
} }
&#m3-cn-button-ok { &.m3-cn-button-ok {
background-color: #142032; font-weight: 900;
color: $color-white; color: $color-white;
background: $color-black;
cursor: pointer; cursor: pointer;
font-weight: 700;
font-size: 14px;
text-transform: lowercase;
transition: all 0.15s linear;
@include mq(md, max) { @include mq(lg, max) {
font-size: 24px; &:active {
margin-top: 8px; background: lighten($color-black, 10);
}
} }
@include mq(lg, min) {
&:hover { &:hover {
background-color: lighten(#142032, 5); background: lighten($color-black, 10);
} }
&:active { &:active {
background-color: darken(#142032, 5); background: $color-black;
}
}
} }
} }
} }
.m3-cn-msg { .m3-cn-msg {
position: absolute;
top: calc(100% + 8px);
left: 50%;
transform: translateX(-50%);
width: fit-content;
line-height: 1;
font-weight: 700; font-weight: 700;
text-align: center;
.m3-cn-error { .m3-cn-error {
background-color: $color-white; color: $color-red;
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: $color-white;
display: inline-block;
font-size: 16px;
margin-right: 20px;
text-transform: lowercase;
}
.btn-voltar {
background-color: $color-white;
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 {
border-bottom: solid 1px #333;
}
}
.m3-custom-newsletter-form .btn-voltar {
color: #333;
border-color: #333;
}
}

View File

@ -29,7 +29,7 @@
align-items: center; align-items: center;
font-size: 12px; font-size: 12px;
line-height: 15px; line-height: 15px;
color: $color-grey2; color: $color-grey3;
} }
i { i {

View File

@ -1,6 +1,6 @@
// fonts // fonts
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap");
$font-family: "Inter", sans-serif; $font-family: "Inter", sans-serif;
$font-weight-light: 300; $font-weight-light: 300;
@ -12,10 +12,16 @@ $font-height: 1.5;
$color-black: #000; $color-black: #000;
$color-white: #fff; $color-white: #fff;
$color-blue: #00c8ff; $color-blue: #00c8ff;
$color-grey1: #e0e0e0; $color-blue2: #03addc;
$color-grey2: #828282;
$color-red: #db4c4c;
$color-grey: #333333; $color-grey: #333333;
$color-grey1: #e0e0e0;
$color-grey2: #bdbdbd;
$color-grey3: #828282;
// Grid breakpoints // Grid breakpoints
@ -41,5 +47,5 @@ $z-index: (
// avise-me: 5, // avise-me: 5,
// scroll-top: 7, // scroll-top: 7,
// header-fixo: 10, // header-fixo: 10,
// popup-user: 15,,,,,,,, // popup-user: 15,,,,,,,,,,,,,,,,
) !default; ) !default;

View File

@ -1,12 +1,6 @@
<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">RECEBA NOVIDADES E DESCONTOS EXCLUSIVOS</h3>
<div class="col-12"> <div class="footer-newsletter__form"></div>
<h3>Receba novidades e <span>descontos <strong>exclusivos</strong></span></h3>
</div>
<div class="col-12">
<div class="news-form"></div>
</div>
</div>
</div> </div>
</section> </section>