summaryrefslogtreecommitdiff
path: root/static/index.html
blob: 53aa1047d0e6136ace0ab6c5daae4ca3ec5306da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!DOCTYPE html>
  <head>
    <title>Etherpad Lite</title>
    <style>
      * {
        font-family: Helvetica, Verdana, Sans-Serif;
      }
      
      html, body {
        height:100%;
        margin:0;
        padding:0;
      }
      
      #wrapper {
        margin:0 auto;
        margin-top: 200px;
        width: 300px;
        height: 200px;
      }
      
      #button {
        width: 300px;
        height: 80px;
        
        display: block;
        
        margin:auto;
        
        border: 2px solid #999;
 
        -moz-border-radius: 4px;
        border-radius: 4px;
        
        background #fff;
        background: -moz-linear-gradient(top, #aaa, white 70%, white 70%);  
        background: -webkit-gradient(linear, 0 0, 0 100%, from(#aaa), color-stop(70%, white), color-stop(70%, white));  
        
        text-decoration: none;
        text-align: center;
      }
      
      #button span {     
        display: block;
        margin-top:15px;   
        font-size: 40px;
        color: #333;
        font-weight:bold;
        text-decoration: none;
      }
      
      #nameWrapper {
        text-align: center;
      }
    </style>
    <script type="text/javascript">
      function go2Name()
      {
        var padname = document.getElementById("padname").value;
        if(padname.length > 0)
        {
          window.location = "p/" + padname;
        }
      }
      
      function go2Random()
      {
        window.location = "p/" + randomPadName() ;
      }
      
      function randomPadName() 
      {
	      var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
	      var string_length = 10;
	      var randomstring = '';
	      for (var i=0; i<string_length; i++) {
		      var rnum = Math.floor(Math.random() * chars.length);
		      randomstring += chars.substring(rnum,rnum+1);
	      }
	      return randomstring;
      }
    </script>
  </head>
  <body>
    <div id="wrapper">
      <a href="javascript:go2Random()" id="button"><span>New Pad</span></a>
      <div id="nameWrapper"><form>
        <span><br>or create a Pad with the name <br></span> <input type="text" id="padname"/> <input type="submit" value="OK" onclick="go2Name();return false;">
      </form></div></a>
    </div>
  </body>
</html>