Skip to content

added more functions #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 41 additions & 10 deletions fylo-landing-page/dist/css/styles.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion fylo-landing-page/dist/css/styles.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions fylo-landing-page/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h1>All your files in one secure location, accessible anywhere.</h1>
<p>Fylo stores all your most important files in one secure location. Access them wherever you need, share and collaborate with friends family, and co-workers.</p>
<form>
<input type="email" id="email1" name="email1" placeholder="Enter your email...">
<p id="erro-text"></p>
<p class="erro-text"></p>
<button>Get Started</button>
</form>
</div>
Expand Down Expand Up @@ -98,7 +98,7 @@ <h1>Get early access today</h1>

<form>
<input type="email" id="email2" name="email2" placeholder="email@example.com">
<p id="erro-text"></p>
<p class="erro-text"></p>
<button>Get Started For Free</button>
</form>
</section>
Expand Down
43 changes: 42 additions & 1 deletion fylo-landing-page/main.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,56 @@
const header = document.querySelector('header');
const btns = document.querySelectorAll('button');
const getForm = document.querySelectorAll('form');
const inputTag = document.querySelector('input[type="email"]');
const textError = document.querySelectorAll('.erro-text');


window.addEventListener('scroll', function () {
if (window.scrollY > 0) {
header.style.backgroundColor = " $header-bg";
header.style.backdropFilter = "blur(10px)";
header.style.backdropFilter = "blur(50px)";
header.style.boxShadow = "0 4px 6px rgba(0, 0, 0, 0.1)";
header.style.transition = "all 0.5s ease";
header.style.zIndex = "1000";
}
else {
header.style.backgroundColor = "transparent";
header.style.backdropFilter = "blur(0px)";
header.style.boxShadow = "none";
}
});

getForm.forEach((form) => {
form.addEventListener('submit', function (event) {
event.preventDefault();
if (inputTag.value === '') {
textError.forEach((text) => {
text.textContent = "Please provide a valid email";
text.style.textAlign = "left";
text.style.color = "red";
});
}
else if (inputTag.value !== '') {
textError.forEach((text) => {
text.textContent = "Thank you for subscribing";
text.style.textAlign = "left";
text.style.color = "green";
});
}
else {
textError.forEach((text) => {
text.style.color = "transparent";
});
}
});
});

// btns.forEach((btn) => {
// btn.addEventListener('click', function (event) {
// event.preventDefault();


// });
// });


6 changes: 5 additions & 1 deletion fylo-landing-page/src/scss/base/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@ body{
img{
width: 100%;
display: block;
}
}

button{
cursor: pointer;
}
3 changes: 2 additions & 1 deletion fylo-landing-page/src/scss/base/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
$Very-Dark-Blue: hsl(243, 87%, 12%);
$header-bg: rgba(255, 255, 255, 0.4);
$header-bg: rgba(255, 255, 255, 0.4);
$Desaturated-Blue: hsl(238, 22%, 44%);
$Bright-Blue: hsl(224, 93%, 58%);
$Moderate-Cyan: hsl(170, 45%, 43%);
$Light-Grayish-Blue: hsl(240, 75%, 98%);
$paragraph: hsl(249, 8%, 53%);
$Light-Gray: hsl(0, 0%, 75%);
$bg-color: hsl(250, 75%, 98%);
$btn-hover: hsl(221, 100%, 71%);
23 changes: 0 additions & 23 deletions fylo-landing-page/src/scss/components/_footer.scss/_contact.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,29 +63,6 @@ padding: 3rem 2rem;

}

.footer-images{
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
gap: 1rem;
margin-top: 3rem;

div{
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
border: 1.5px solid white;
padding: 0.6rem;
svg{
width: 20px;
height: 20px;
fill: white;
}
}
}


.attribution {
margin: 2rem 1rem 1rem 1rem;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
footer{
.footer-images {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
gap: 1rem;
margin-top: 3rem;

div {
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
border: 1.5px solid white;
padding: 0.6rem;

svg {
width: 20px;
height: 20px;
fill: white;
}
}
}
}
2 changes: 1 addition & 1 deletion fylo-landing-page/src/scss/components/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ header{
justify-content: space-between;
align-items: center;
padding: 1rem 2rem;
gap: 0.7rem;
gap: 1rem;
position: fixed;
top: 0;
left: 0;
Expand Down
18 changes: 18 additions & 0 deletions fylo-landing-page/src/scss/components/main.scss/_section1.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ main{
border: 1.2px groove $Very-Dark-Blue;
margin-bottom: 1rem;
outline: none;
font-size: 1.2rem;
color: $Very-Dark-Blue;


&::placeholder{
Expand All @@ -45,6 +47,22 @@ main{
border-radius: 5px;
font-size: 1rem;
box-shadow: 0px 5px 5px -1px rgba(0,0,0,0.15);
cursor: pointer;
transition: background-color 0.4s ease-in-out, transform 0.2s ease-in-out;

&:hover{
background-color: $btn-hover;
transform: translateY(-2px);
box-shadow: 0px 8px 10px -1px rgba(0, 0, 0, 0.2);

}

&:active {
transform: translateY(1px);
box-shadow: 0px 2px 5px -1px rgba(0, 0, 0, 0.1);

}

}
}
}
17 changes: 17 additions & 0 deletions fylo-landing-page/src/scss/components/main.scss/_section3.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ main{
border-radius: 5px;
border: none;
outline: none;
font-size: 1.2rem;
color: $Very-Dark-Blue;


&::placeholder {
Expand All @@ -44,6 +46,21 @@ main{
border-radius: 5px;
font-size: 1rem;
box-shadow: 0px 5px 5px -1px rgba(0, 0, 0, 0.15);
cursor: pointer;
transition: background-color 0.4s ease-in-out, transform 0.2s ease-in-out;

&:hover {
background-color: $btn-hover;
transform: translateY(-2px);
box-shadow: 0px 8px 10px -1px rgba(0, 0, 0, 0.2);

}

&:active {
transform: translateY(1px);
box-shadow: 0px 2px 5px -1px rgba(0, 0, 0, 0.1);

}
}
}
}