push more code

This commit is contained in:
Timothy Pidashev
2022-01-08 14:20:15 -08:00
parent 76b2b20e2f
commit c9385a50b8
3 changed files with 22 additions and 10 deletions

1
editor.html Normal file
View File

@@ -0,0 +1 @@
hi

View File

@@ -1,6 +1,15 @@
$("#login-button").click(function(event){
event.preventDefault();
$('form').fadeOut(500);
$('.wrapper').addClass('form-success');
});
// Below function Executes on click of login button.
function validate(){
var username = document.getElementById("username").value;
var password = document.getElementById("password").value;
if ( username == "student" && password == "student.23264"){
// window.location = "editor.html"; // Redirecting to other page.
// properly redirect to editor.html
window.location.replace("https://timmypidashev.com/editor.html");
return false;
}
else{
alert("Username/Password is incorrect");
return false;
}
}

View File

@@ -12,9 +12,9 @@
<h1>Login</h1>
<form class="form">
<input type="text" placeholder="Username">
<input type="password" placeholder="Password">
<button type="submit" id="login-button">Login</button>
<input id="username" type="text" placeholder="Username">
<input id="password" type="password" placeholder="Password">
<button type="submit" id="login-button" onclick="validate()">Login</button>
</form>
</div>
@@ -32,4 +32,6 @@
</ul>
</div>
</body>
<script src="js/less.js" data-env="production"></script>
<script src="js/less.js" data-env="production"></script>
<!-- add login function -->
<script src="js/python/login.js"></script>