aviel900

Simple Login Form Animated

Aug 9th, 2019
395
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.25 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <head>
  3.   <title>Simple Login Form Animated</title>
  4.   <link rel="stylesheet" href="https://daneden.github.io/animate.css/animate.min.css">
  5.   <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,100,400italic,700italic,700">
  6.   <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js" type="text/javascript"></script>
  7.   <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js" type="text/javascript"></script>
  8. </head>
  9. <style>
  10. body {
  11.   background: #44c4e7 url("https://photos-6.dropbox.com/t/2/AAC_bdqR8LMkjEe-HPIf4K1DhtseMLRHPklBSzJSuzglvA/12/5714737/jpeg/1024x768/3/1418346000/0/2/bkg-blur.jpg/CLHm3AIgASgBKAI/b7RrveA2022yJyfO9RyRvv7LjJQESukGHssHUxVThzw") no-repeat center center fixed;
  12.   background-size: cover;
  13.   font-family: "Roboto";
  14.   -webkit-font-smoothing: antialiased;
  15.   -moz-osx-font-smoothing: grayscale;
  16. }
  17. body::before {
  18.   z-index: -1;
  19.   content: '';
  20.   position: fixed;
  21.   top: 0;
  22.   left: 0;
  23.   background: #44c4e7;
  24.   /* IE Fallback */
  25.   background: rgba(68, 196, 231, 0.8);
  26.   width: 100%;
  27.   height: 100%;
  28. }
  29. .form {
  30.   position: absolute;
  31.   top: 50%;
  32.   left: 50%;
  33.   background: #fff;
  34.   width: 285px;
  35.   margin: -140px 0 0 -182px;
  36.   padding: 40px;
  37.   box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
  38. }
  39. .form h2 {
  40.   margin: 0 0 20px;
  41.   line-height: 1;
  42.   color: #44c4e7;
  43.   font-size: 18px;
  44.   font-weight: 400;
  45. }
  46. .form input {
  47.   outline: none;
  48.   display: block;
  49.   width: 100%;
  50.   margin: 0 0 20px;
  51.   line-height: 1;
  52.   color: #ccc;
  53.   padding: 10px 15px;
  54.   border: 1px solid #ccc;
  55.   font-family: "Roboto";
  56.   box-sizing: border-box;
  57.   font-size: 14px;
  58.   font-weight: 400;
  59.   -webkit-font-smoothing: antialiased;
  60.   -moz-osx-font-smoothing: grayscale;
  61.   transition: 0.2s linear;
  62. }
  63. .form input:focus {
  64.   color: #333;
  65.   border: 1px solid #44c4e7;
  66. }
  67. .form button {
  68.   cursor: pointer;
  69.   background: #44c4e7;
  70.   width: 100%;
  71.   padding: 10px;
  72.   border: 0;
  73.   color: #fff;
  74.   font-family: "Roboto";
  75.   font-size: 14px;
  76.   font-weight: 400;
  77. }
  78. .form button:hover {
  79.   background: #369cb8;
  80. }
  81. .error,
  82. .valid {
  83.   display: none;
  84. }
  85. </style>
  86. <script>
  87. $(document).ready(function() {
  88.   $('#submit').click(function() {
  89.     event.preventDefault(); // prevent PageReLoad
  90.     var ValidEmail = $('#username').val() === 'aviel900'; // User validate
  91.     var ValidPassword = $('#password').val() === 'TopSecret'; // Password validate
  92.    
  93.     if(ValidEmail === true && ValidPassword === true) { // if ValidEmail & ValidPassword
  94.      $('.valid').css('display', 'block');
  95.       window.location = "https://www.youtube.com/channel/UCpVjIRV2uKlmveF6BGZ-txA"; // go to my YouTube Channel
  96.     }
  97.     else {
  98.       $('.error').css('display', 'block'); // show error msg
  99.     }
  100.   });
  101. });
  102. </script>
  103. <body>
  104.   <section class="form animated flipInX">
  105.     <h2>Login To Your Account</h2>
  106.     <p class="valid">Valid. Please wait a moment.</p>
  107.     <p class="error">Error. Please enter correct User name &amp; password</p>
  108.     <form class="loginbox" autocomplete="off">
  109.       <input placeholder="Username" type="text" id="username"></input>
  110.       <input placeholder="Password" type="password" id="password" ></input>
  111.       <button id="submit">Login</button>
  112.     </form>
  113.   </section>
  114. </body>
Advertisement
Add Comment
Please, Sign In to add comment