diff --git a/Calculator/.vscode/settings.json b/Calculator/.vscode/settings.json new file mode 100644 index 0000000..6f3a291 --- /dev/null +++ b/Calculator/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} \ No newline at end of file diff --git a/Calculator/index.html b/Calculator/index.html index 365165a..f38111f 100644 --- a/Calculator/index.html +++ b/Calculator/index.html @@ -122,7 +122,7 @@
- + @@ -131,7 +131,7 @@
- + @@ -181,12 +181,15 @@ }); } + function cosec() { + screen.value = 1/(Math.sin(screen.value)); + } function sin() { screen.value = Math.sin(screen.value); } - function cos() { - screen.value = Math.cos(screen.value); + function sec() { + screen.value = 1/(Math.cos(screen.value)); } function tan() { diff --git a/Simple Login/blog-bg.jpg b/Simple Login/blog-bg.jpg new file mode 100644 index 0000000..aedc303 Binary files /dev/null and b/Simple Login/blog-bg.jpg differ diff --git a/Simple Login/functionality.js b/Simple Login/functionality.js new file mode 100644 index 0000000..9564a59 --- /dev/null +++ b/Simple Login/functionality.js @@ -0,0 +1,73 @@ +let submitBtn=document.getElementById("submit"); +let formList=document.querySelectorAll(".form-input"); + + +const fistName = document.getElementById('firstName'); +const lastName = document.getElementById('lastName'); +const phoneNumber = document.getElementById('phoneNumber'); + +submitBtn.addEventListener("click",(event)=>{ + event.preventDefault(); + + if(allnotfilled()) + { + alert("fill every entry"); + + } + else { + + if(((isNaN(fistName.value) && isNaN(lastName.value)) && !isNaN(phoneNumber.value))) { + alert("form submitted"); + formList.forEach((element)=>{element.value=""}) + } + else if (!(isNaN(fistName.value) && isNaN(lastName.value))) { + alert("Name cannot contain numbers"); + } + else if(isNaN(phoneNumber.value)) { + alert("Phone number cannot contain characters") + } + else if(!((isNaN(fistName.value) && isNaN(lastName.value)) && !isNaN(phoneNumber.value))){ + alert("Name and phone number in wrong format"); + } + // else{ + // alert("Name and phone number in wrong format"); + // return; + // } + } + + + // if((isNaN(fistName.value)||(isNaN(lastName.value)))) { + // alert("Name cannot contain numbers") + // } + // else if(!isNaN(phoneNumber.value)) { + // alert("Phone number cannot contain characters") + // } + // else { + + // else{ + // alert("form submitted");1 + // formList.forEach((element)=>{element.value=""}) + // } + // } + + + +}) + +function allnotfilled() +{ + let x=false; + formList.forEach(element => { + if (element.value==""){ + element.classList.remove("form-input"); + element.classList.add("empty-alert"); + setTimeout(()=>{element.classList.add("form-input"); + element.classList.remove("empty-alert");},5000); + x=true + } + }); + return x; +} + + + diff --git a/Simple Login/index1.html b/Simple Login/index1.html new file mode 100644 index 0000000..24b11dc --- /dev/null +++ b/Simple Login/index1.html @@ -0,0 +1,74 @@ + + + + + + + + Travelo | Home + + + + + + + + +
+ +
+
TRAVELO
+
+ + + +
+ +
+
+
+

Join us to see the world!

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ +
+
+ + + + + \ No newline at end of file diff --git a/Simple Login/style1.css b/Simple Login/style1.css new file mode 100644 index 0000000..067bc2d --- /dev/null +++ b/Simple Login/style1.css @@ -0,0 +1,155 @@ +body { + font-family: 'Baloo Bhai 2', cursive; + color: white; + margin: 0px; + padding: 0px; + background: url(blog-bg.jpg); + /* display: block; */ + background-repeat: no-repeat; + background-size: cover; + +} + + +.left { + display: inline-block; + position: absolute; + /* line-height: 0px; */ + left: 60px; + top: 20px; + /* border: 2px solid red; */ + +} + +.left img { + width: 100px; + height: 40px; + +} + +.left div { + text-align: center; +} + +.mid { + display: block; + width: 50%; + margin: 20px auto; + /* border: 2px solid yellow; */ + +} + +.right { + display: inline-block; + position: absolute; + right: 34px; + top: 20px; + /* border: 2px solid blue; */ + +} + +.navbar { + display: inline-block; +} + +.navbar li { + display: inline-block; + font-size: 20px; +} + +.navbar li a { + color: white; + text-decoration: none; + padding: 34px 23px; +} + +.navbar li a:hover, +.navbar li a:active { + text-decoration: underline; + color: blueviolet; +} + +.btn { + font-family: 'Baloo Bhai 2', cursive; + margin: 0px 9px; + background-color: black; + color: aliceblue; + padding: 4px 14px; + border: 2px solid grey; + border-radius: 10px; + font-size: 15px; + cursor: pointer; +} + +.btn:hover { + background-color: purple; +} + +.container { + border: 2px solid white; + margin: 100px 80px; + padding: 75px; + width: 40%; + border-radius: 28px; +} + +.container h1 { + text-align: center; + font-size: 50px; +} + +.container button { + display: block; + width: 74%; + margin: 20px auto; +} + +/* .form-group input, select { + font-family: 'Baloo Bhai 2', cursive; + display: block; + width: 500px; + padding: 1px; + border: 2px solid black; + margin: 11px auto; + font-size: 25px; + border-radius: 8px; +} */ + +.form-input, select{ + font-family: 'Baloo Bhai 2', cursive; + display: block; + width: 500px; + padding: 1px; + border: 2px solid black; + margin: 11px auto; + font-size: 25px; + border-radius: 8px; +} + +select { + width: 525px !important; +} + +#op1 { + color: gray !important; +} + +/* .form-group input::placeholder{ + padding-left: 20px; +} */ + +.form-group input{ + padding-left: 20px; +} + +.empty-alert{ + font-family: 'Baloo Bhai 2', cursive; + display: block; + width: 500px; + padding: 1px; + border: 2px solid rgb(255, 0, 0); + background-color: #ffbbbb; + margin: 11px auto; + font-size: 25px; + border-radius: 8px; +} \ No newline at end of file