-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b7d8caa
commit 44a6ba1
Showing
34 changed files
with
1,386 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
const menuBtn = document.getElementById("menu-btn"); | ||
const navLinks = document.getElementById("nav-links"); | ||
const menuBtnIcon = menuBtn.querySelector("i"); | ||
const bmiBtn = document.getElementById("btn"); | ||
|
||
menuBtn.addEventListener("click", (e) => { | ||
navLinks.classList.toggle("open"); | ||
|
||
|
||
const isOpen = navLinks.classList.contains("open"); | ||
menuBtnIcon.setAttribute("class", isOpen ? "ri-close-line" : "ri-menu-line"); | ||
|
||
}); | ||
|
||
navLinks.addEventListener('click', (e) => { | ||
navLinks.classList.remove('open'); | ||
menuBtnIcon.setAttribute('class', 'ri-menu-line') | ||
|
||
}) | ||
|
||
const scrollRevealOption = { | ||
distance : '50px', | ||
origin: 'bottom', | ||
duration: 1000, | ||
}; | ||
|
||
ScrollReveal().reveal(".header__content h1", { | ||
...scrollRevealOption, | ||
}) | ||
ScrollReveal().reveal(".header__content h2", { | ||
...scrollRevealOption, | ||
delay: 500, | ||
}) | ||
ScrollReveal().reveal(".header__content p", { | ||
...scrollRevealOption, | ||
delay: 1000, | ||
}) | ||
ScrollReveal().reveal(".header__content .header__btn", { | ||
...scrollRevealOption, | ||
delay: 1500, | ||
}) | ||
ScrollReveal().reveal(".about__card", { | ||
duration:1000, | ||
interval: 500, | ||
}) | ||
ScrollReveal().reveal(".trainer__card", { | ||
...scrollRevealOption, | ||
interval: 500, | ||
}) | ||
ScrollReveal().reveal(".blog__card", { | ||
...scrollRevealOption, | ||
interval: 500, | ||
}) | ||
const swiper = new Swiper(".swiper", { | ||
loop: true, | ||
|
||
pagination: { | ||
el: ".swiper-pagination", | ||
}, | ||
}); | ||
|
||
bmiBtn.addEventListener("click", () => { | ||
const height = parseInt(document.getElementById("height").value); | ||
const weight = parseInt(document.getElementById("weight").value); | ||
const result = document.getElementById("output"); | ||
let height_status=false, weight_status=false; | ||
|
||
if(height === '' || isNaN(height) || height<=0){ | ||
document.getElementById('height_error').innerHTML = 'Please provide a valid height'; | ||
}else{ | ||
document.getElementById('height_error').innerHTML = ''; | ||
height_status=true; | ||
} | ||
|
||
if(weight === '' || isNaN(weight) || weight<=0){ | ||
document.getElementById('weight_error').innerHTML = 'Please provide a valid weight'; | ||
}else{ | ||
document.getElementById('weight_error').innerHTML = ''; | ||
weight_status=true; | ||
} | ||
|
||
if(height_status && weight_status){ | ||
const bmi = (weight/((height*height)/10000)).toFixed(2); | ||
|
||
if(bmi < 18.6){ | ||
result.innerHTML = 'Under weight : '+bmi; | ||
} | ||
else if(bmi > 24.9){ | ||
result.innerHTML = 'Over weight : '+bmi; | ||
} | ||
else{ | ||
result.innerHTML = 'Normal : '+bmi; | ||
} | ||
}else{ | ||
alert('The form has errors'); | ||
result.innerHTML = ''; | ||
} | ||
|
||
}) | ||
|
||
function sendEmail(){ | ||
Email.send({ | ||
Host : "smtp.gmail.com", | ||
Username : "[email protected]", | ||
Password : "Pallavi@2005??", | ||
To : '[email protected]', | ||
From : document.getElementById("email").value, | ||
Subject : "This is the subject", | ||
Body : "And this is the body" | ||
}).then( | ||
message => alert(message) | ||
); | ||
} |
Oops, something went wrong.