diff --git a/assignments.html b/assignments.html new file mode 100644 index 0000000..4b1acce --- /dev/null +++ b/assignments.html @@ -0,0 +1,32 @@ + + + + Assignments + + + + + + + +
+
+

Assignments

+
+ +
+
+
+ + + + + \ No newline at end of file diff --git a/css/assignments.less b/css/assignments.less new file mode 100644 index 0000000..38593a4 --- /dev/null +++ b/css/assignments.less @@ -0,0 +1,108 @@ +@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"); +@prim: #333333; + +*{ + box-sizing: border-box; + margin: 0; + padding: 0; + + font-weight: 300; +} + +body{ + font-family: '', sans-serif; + color: white; + font-weight: 300; + + ::-webkit-input-placeholder { /* WebKit browsers */ + font-family: 'Source Sans Pro', sans-serif; + color: white; + font-weight: 300; + } + :-moz-placeholder { /* Mozilla Firefox 4 to 18 */ + font-family: 'Source Sans Pro', sans-serif; + color: white; + opacity: 1; + font-weight: 300; + } + ::-moz-placeholder { /* Mozilla Firefox 19+ */ + font-family: 'Source Sans Pro', sans-serif; + color: white; + opacity: 1; + font-weight: 300; + } + :-ms-input-placeholder { /* Internet Explorer 10+ */ + font-family: 'Source Sans Pro', sans-serif; + color: white; + font-weight: 300; + } +} + +.wrapper{ + background: #333333; +background: -webkit-linear-gradient(top left, #333333 0%, #333333 100%); +background: -moz-linear-gradient(top left, #333333 0%, #333333 100%); +background: -o-linear-gradient(top left, #333333 0%, #333333 100%); +background: linear-gradient(to bottom right, #333333 0%, #333333 100%); + position: relative; + height: 100vh; + // top: 50%; + // left: 0; + // width: 100%; + // height: 400px; + // margin-top: -200px; + overflow: hidden; + + &.form-success{ + .container{ + h1{ + transform: translateY(85px); + } + } + } +} + +.container{ + max-width: 600px; + margin: 0 auto; + padding: 80px 0; + height: 400px; + text-align: center; + + h1{ + font-size: 40px; + transition-duration: 1s; + transition-timing-function: ease-in-put; + font-weight: 200; + } +} + +.assignment{ + padding: 20px 0; + position: relative; + z-index: 2; + + button{ + appearance: none; + outline: 0; + // make backgournd color a gradient + background: #50a3a2; + background: -webkit-linear-gradient(top left, #50a3a2 0%, #53e3a6 100%); + background: -moz-linear-gradient(top left, #50a3a2 0%, #53e3a6 100%); + background: -o-linear-gradient(top left, #50a3a2 0%, #53e3a6 100%); + background: linear-gradient(to bottom right, #50a3a2 0%, #53e3a6 100%); + + border: 0; + padding: 10px 15px; + color: @prim; + border-radius: 3px; + width: 600px; + cursor: pointer; + font-size: 18px; + transition-duration: 0.25s; + + &:hover{ + background-color: rgb(245, 247, 249); + } + } +} diff --git a/css/login.less b/css/login.less index 642453e..dcb860e 100644 --- a/css/login.less +++ b/css/login.less @@ -61,6 +61,30 @@ background: linear-gradient(to bottom right, #333333 0%, #333333 100%); } } } + + // add shake + &.form-error{ + // add animation to container + .container{ + h1{ + animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both; + @keyframes shake { + 10%, 90% { + transform: translate3d(-1px, 0, 0); + } + 20%, 80% { + transform: translate3d(2px, 0, 0); + } + 30%, 50%, 70% { + transform: translate3d(-4px, 0, 0); + } + 40%, 60% { + transform: translate3d(4px, 0, 0); + } + } + } + } + } } .container{ @@ -134,6 +158,23 @@ form{ } } +// // fade the form on success +// .form-success{ +// .container{ +// h1{ +// transform: translateY(0px); +// } +// } +// } + +// // form error shake animation +// .form-error{ +// .container{ +// h1{ +// animation: formError 0.5s; +// } +// } +// } .bg-bubbles{ position: absolute; @@ -254,12 +295,15 @@ form{ 90% { transform: translateY(-1100px) rotate(600deg); } } -// animation for square to fade out -// @-webkit-keyframes fade { -// 0% { opacity: 1; } -// 100% { opacity: 0; } -// } -// @keyframes fade { -// 0% { opacity: 1; } -// 100% { opacity: 0; } -// } +// form error shake animation +@-webkit-keyframes formError { + 0% { transform: translateY(0); } + 100% { transform: translateY(-10px) rotate(5deg); } + 100% { transform: translateY(0) rotate(-5deg); } +} +@keyframes formError { + 0% { transform: translateY(0); } + 100% { transform: translateY(-10px) rotate(5deg); } + 100% { transform: translateY(0) rotate(-5deg); } +} + diff --git a/editor.html b/editor.html deleted file mode 100644 index 32f95c0..0000000 --- a/editor.html +++ /dev/null @@ -1 +0,0 @@ -hi \ No newline at end of file diff --git a/js/python/login.js b/js/python/login.js index 9c50443..2b7ac4b 100644 --- a/js/python/login.js +++ b/js/python/login.js @@ -1,15 +1,9 @@ -// 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"); +function login(username, password) { + if (username == 'student' && password == 'student.23264') { + setTimeout(function() { // delay the location.replace for one second for login animation + location.replace('assignments.html'); + }, 1000); + } else { return false; } - else{ - alert("Username/Password is incorrect"); - return false; - } -} +} \ No newline at end of file diff --git a/login.html b/login.html index 4991dd0..39cbe85 100644 --- a/login.html +++ b/login.html @@ -5,6 +5,8 @@ + +
@@ -12,9 +14,9 @@

Login

- - - + + +
@@ -31,7 +33,47 @@
  • + + + + + + - - - \ No newline at end of file + \ No newline at end of file