Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2011
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 3.08 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <style>
  5.             * {
  6.              margin: 0; padding: 0;
  7.             }
  8.  
  9.             body {
  10.              color: #555;
  11.              text-shadow: 0 1px 1px #fff;
  12.              font: 12px arial,sans-serif;
  13.             }
  14.  
  15.  
  16.             #container {
  17.              margin: 0 auto;
  18.              margin-top: 100px;
  19.              width: 200px;
  20.              padding: 15px;
  21.              background: rgba(0,0,0,.05);
  22.              -moz-border-radius: 6px;
  23.              border-radius: 6px;
  24.              box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.298);
  25.             }
  26.  
  27.             #container h1 {
  28.              font-size: 28px;
  29.             }
  30.  
  31.             button {
  32.               cursor: pointer;
  33.               background: #e3e3e3;
  34.               border: 1px solid #bbb;
  35.               -moz-border-radius: 3px;
  36.               border-radius: 3px;
  37.               box-shadow: inset 0 0 1px 1px #f6f6f6;
  38.               color: #333;
  39.               font-weight: bold;
  40.               padding: 20px 70px;
  41.               line-height: 1;
  42.               text-align: center;
  43.               text-shadow: 0 1px 0 #fff;
  44.               -webkit-transition: background-color .8s ease-in;
  45.             }
  46.  
  47.             button:hover {
  48.              background-color: #ccc;
  49.             }
  50.  
  51.             input[type="text"] {
  52.              font-weight: bold;
  53.              font-size: 14px;
  54.              height: 25px;
  55.              padding: 0 5px;
  56.              width: 140px;
  57.             }
  58.  
  59.             input[type="submit"] {
  60.              height: 30px;
  61.              width: 40px;
  62.             }
  63.  
  64.         </style>
  65.        
  66.     </head>
  67.    
  68.     <body>
  69.  
  70.         <div id="container">
  71.             <h1>Etherpad Lite</h1>
  72.             <br>
  73.             <button id="button" onclick="go2Random()">New Pad</button>
  74.             <br><br>
  75.             or create a Pad with the name
  76.             <br>
  77.             <input type="text" id="padname"> <input type="submit" value="OK" onclick="go2Name();return false;">
  78.         </div>
  79.        
  80.        
  81.         <script type="text/javascript">
  82.               function go2Name()
  83.               {
  84.                 var padname = document.getElementById("padname").value;
  85.                 if(padname.length > 0)
  86.                 {
  87.                   window.location = "p/" + padname;
  88.                 }
  89.               }
  90.              
  91.               function go2Random()
  92.               {
  93.                 window.location = "p/" + randomPadName() ;
  94.               }
  95.              
  96.               function randomPadName()
  97.               {
  98.                   var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
  99.                   var string_length = 10;
  100.                   var randomstring = '';
  101.                   for (var i=0; i<string_length; i++) {
  102.                      var rnum = Math.floor(Math.random() * chars.length);
  103.                      randomstring += chars.substring(rnum,rnum+1);
  104.                  }
  105.                  return randomstring;
  106.              }
  107.        </script>
  108.        
  109.     </body>
  110.    
  111. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement