2011-05-19 23:17:41 +02:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Etherpad Lite</title>
|
|
|
|
<style>
|
|
|
|
* {
|
|
|
|
font-family: Helvetica, Verdana, Sans-Serif;
|
|
|
|
}
|
|
|
|
|
|
|
|
html, body {
|
|
|
|
height:100%;
|
|
|
|
margin:0;
|
|
|
|
padding:0;
|
|
|
|
}
|
|
|
|
|
|
|
|
#wrapper {
|
|
|
|
margin: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-color: #fff;
|
|
|
|
background: white; /* fallback for older/unsupporting browsers */
|
|
|
|
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">
|
2011-05-23 20:58:54 +02:00
|
|
|
function go2Name()
|
2011-05-19 23:17:41 +02:00
|
|
|
{
|
|
|
|
var padname = document.getElementById("padname").value;
|
|
|
|
if(padname.length > 0)
|
|
|
|
{
|
2011-05-28 22:05:43 +02:00
|
|
|
window.location = "p/" + padname;
|
2011-05-19 23:17:41 +02:00
|
|
|
}
|
|
|
|
}
|
2011-05-23 20:58:54 +02:00
|
|
|
|
|
|
|
function go2Random()
|
|
|
|
{
|
2011-05-28 22:05:43 +02:00
|
|
|
window.location = "p/" + randomPadName() ;
|
2011-05-23 20:58:54 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
2011-05-19 23:17:41 +02:00
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="wrapper">
|
2011-05-23 20:58:54 +02:00
|
|
|
<a href="javascript:go2Random()" id="button"><span>New Pad</span></a>
|
2011-05-19 23:17:41 +02:00
|
|
|
<div id="nameWrapper"><form>
|
2011-05-23 20:58:54 +02:00
|
|
|
<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;">
|
2011-05-19 23:17:41 +02:00
|
|
|
</form></div></a>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|