Advertisement
Guest User

Untitled

a guest
Jan 8th, 2017
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5.88 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <meta charset="utf-8">
  5.     <title>melon.pw | login</title>
  6.     <link href="https://fonts.googleapis.com/css?family=Dosis" rel="stylesheet">
  7.     <script src="/jquery.js"></script>
  8.     <script src="/jquery-ui.js"></script>
  9. </head>
  10. <body>
  11. <div class="site">
  12. <div class="header">
  13.     <div class="link" style="float: left;">melon.pw</div>
  14.     <?php
  15.         if (isset($_SESSION['username'])) {
  16.     ?>
  17.     <p style="float: right;" id="username"></p>
  18.     <?php
  19.         } else {
  20.     ?>
  21.     <div class="link" style="float: right;" id="register">Register</div>
  22.     <div class="link" style="float: right;" id="login">Login</div>
  23.     <?php
  24.         }
  25.     ?>
  26. </div>
  27.  
  28. <br>
  29. <div class="message">
  30. </div>
  31.  
  32. <div class="authentication">
  33.     <div class="webheader">
  34.         <span style="margin: 3px 0 0 10px; display:inline-block;">Authentication</span>
  35.         <div id="exit" class="link exit">x</div>
  36.     </div>
  37.     <form method="post" action="login.php">
  38.         <table>
  39.             <tr>
  40.                 <td>Username: </td>
  41.                 <td>
  42.                     <input type="text" name="username">
  43.                 </td>
  44.             </tr>
  45.             <tr>
  46.                 <td>Password: </td>
  47.                 <td>
  48.                     <input type="password" name="password">
  49.                 </td>
  50.             </tr>
  51.             <tr>
  52.                 <td></td>
  53.                 <td>
  54.                     <input type="submit" name="login" value="Login">
  55.                 </td>
  56.             </tr>
  57.         </table>
  58.     </form>
  59.     <br>
  60.     <div class="link" id="pass" style="margin-left: 15px; font-size: 15px">Request a new password?</div>
  61. </div>
  62. </div>
  63. </body>
  64. <style>
  65.  
  66.     @keyframes hover {
  67.         from {color: #eee;}
  68.         to   {color: lightblue;}
  69.     }
  70.  
  71.     @keyframes bottomGlow {
  72.         0% {border-bottom: solid 1px #5D21C4;}
  73.         25% {border-bottom: solid 1px #000ED1;}
  74.         50% {border-bottom: solid 1px #005BD1;}
  75.         75% {border-bottom: solid 1px #00A0D1;}
  76.         100% {border-bottom: solid 1px #00D1C7;}
  77.     }
  78.  
  79.     @keyframes leftGlow {
  80.         0% {border-left: solid 1px #5D21C4;}
  81.         25% {border-left: solid 1px #000ED1;}
  82.         50% {border-left: solid 1px #005BD1;}
  83.         75% {border-left: solid 1px #00A0D1;}
  84.         100% {border-left: solid 1px #00D1C7;}
  85.     }
  86.  
  87.     @keyframes textGlow {
  88.         0% {color: #5D21C4;}
  89.         25% {color: #000ED1;}
  90.         50% {color: #005BD1;}
  91.         75% {color: #00A0D1;}
  92.         100% {color: #00D1C7;}
  93.     }
  94.  
  95.     @keyframes backgroundGlow {
  96.         0% {background-color: #5D21C4;}
  97.         25% {background-color: #000ED1;}
  98.         50% {background-color: #005BD1;}
  99.         75% {background-color: #00A0D1;}
  100.         100% {background-color: #00D1C7;}
  101.     }
  102.  
  103.     html, body {
  104.         font-family: "Dosis", sans-serif;
  105.         background-color: #222;
  106.         color: #eee;
  107.         margin: 0;
  108.         overflow: hidden;
  109.         height: 100%;
  110.     }
  111.  
  112.     table {
  113.         margin: 20px;
  114.         width: 100%;
  115.     }
  116.  
  117.     input[type=text], input[type=password] {
  118.         border: none;
  119.         color: #eee;
  120.         background-color: #222;
  121.         border-radius: 7px;
  122.     }
  123.  
  124.     input[type=submit] {
  125.         animation-name: backgroundGlow;
  126.         animation-duration: 12s;
  127.         animation-iteration-count: infinite;
  128.         animation-direction: alternate;
  129.         background-color: green;
  130.         border: none;
  131.         color: #eee;
  132.         padding: 0 15px 0 15px;
  133.         font-family: "Dosis", sans-serif;
  134.         font-size: 13px;
  135.     }
  136.  
  137.     .link {
  138.         text-decoration: none;
  139.         color: #eee;
  140.         font-size: 18px;
  141.         padding: 2px 4px 0 4px;
  142.     }
  143.  
  144.     .link:hover {
  145.         animation-name: hover;
  146.         animation-duration: 1s;
  147.         color: lightblue;
  148.     }
  149.  
  150.     .exit:hover {
  151.         animation-name: textGlow, leftGlow;
  152.         animation-duration: 2s;
  153.         animation-iteration-count: infinite;
  154.         animation-direction: alternate;
  155.     }
  156.  
  157.     .exit {
  158.         animation-name: textGlow, leftGlow;
  159.         animation-duration: 12s;
  160.         animation-iteration-count: infinite;
  161.         animation-direction: alternate;
  162.         float: right;
  163.         color: lightblue;
  164.         height: 100%;
  165.         border-left: 1px solid lightblue;
  166.         padding: 0 12px 0 12px;
  167.     }
  168.  
  169.     .header, .webheader {
  170.         animation-name: bottomGlow;
  171.         animation-duration: 12s;
  172.         animation-iteration-count: infinite;
  173.         animation-direction: alternate;
  174.         height: 30px;
  175.         width: 100%;
  176.         background-color: #111;
  177.         border-bottom: 1px solid lightblue;
  178.     }
  179.  
  180.     .authentication {
  181.         position: absolute;
  182.         height: 210px;
  183.         width: 350px;
  184.         background-color: #111;
  185.         border: 1px solid lightblue;
  186.         top: calc(50% - 105px);
  187.         left: calc(50% - 175px);
  188.     }
  189.    
  190. </style>
  191. <script>
  192.  
  193.     $(document).ready(function() {
  194.         $(".authentication").hide();
  195.     });
  196.  
  197.     $("#login").click(function() {
  198.         $(".authentication").show("drop", 1000);
  199.         $(".authentication").html('<div class="webheader"><span style="margin: 3px 0 0 10px; display:inline-block;">Authentication</span><div id="exit" class="link exit">x</div></div><form method="post" action="login.php"><table><tr><td>Username: </td><td><input type="text" name="username"></td></tr><tr><td>Password: </td><td><input type="password" name="password"></td></tr><tr><td></td><td><input type="submit" name="login" value="Login"></td></tr></table></form><br><div class="link" id="pass" style="margin-left: 15px; font-size: 15px">Request a new password?</div></div>');
  200.     });
  201.  
  202.     $("#register").click(function() {
  203.         $(".authentication").show("drop", 1000);
  204.         $(".authentication").html('<div class="webheader"><span style="margin: 3px 0 0 10px; display:inline-block;">Authentication</span><div id="exit" class="link exit">x</div></div><form method="post" action="register.php"><table><tr><td>Username: </td><td><input type="text" name="username"></td></tr><tr><td>Password: </td><td><input type="password" name="password"></td></tr><tr><td>Confirm Password: </td><td><input type="password" name="confirmPassword"></td></tr><tr><td></td><td><input type="submit" name="register" value="Register"></td></tr></table></form></div>');
  205.  
  206.         $.ajax({
  207.             type: "post",
  208.             url: "melon.pw/register.php",
  209.             cache: false,
  210.             data: {
  211.                 username: username,
  212.                 password: password
  213.             },
  214.             success: function(data) {
  215.                 if (data != "none") {
  216.                     $(".message").text(data);
  217.                 }
  218.             }
  219.         });
  220.     });
  221.  
  222.     $("body").on("click", 'div.exit', function() {
  223.         $(".authentication").hide("drop", 1000);
  224.     });
  225.  
  226.     $(".authentication").draggable({
  227.         handle: ".webheader",
  228.         snap: false
  229.     });
  230. </script>
  231. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement