Edited static/index.html via GitHub

pull/36/merge^2
Robin 2011-07-24 09:47:04 -07:00
parent 124f076656
commit a6b18ff64a
1 changed files with 142 additions and 92 deletions

View File

@ -1,93 +1,143 @@
<!DOCTYPE html> <!doctype html>
<head> <html>
<title>Etherpad Lite</title>
<style> <title>Etherpad Lite | factor.cc</title>
* {
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; <style>
* {
margin:auto; margin: 0; padding: 0;
}
border: 2px solid #999; body {
background: rgba(0, 0, 0, .05);
-moz-border-radius: 4px; color: #555;
border-radius: 4px; text-shadow: 0 1px 0 #fff;
font: 14px helvetica,sans-serif;
background-color: #fff; background: #ccc;
background: white; /* fallback for older/unsupporting browsers */ background: -moz-radial-gradient(circle, #aaa, #eee) no-repeat center center fixed;
background: -moz-linear-gradient(top, #aaa, white 70%, white 70%); background: -webkit-radial-gradient(circle, #aaa, #eee) no-repeat center center fixed;
background: -webkit-gradient(linear, 0 0, 0 100%, from(#aaa), color-stop(70%, white), color-stop(70%, white)); background: -ms-radial-gradient(circle, #aaa, #eee) no-repeat center center fixed;
background: -o-radial-gradient(circle, #aaa, #eee) no-repeat center center fixed;
text-decoration: none; overflow-x: hidden;
text-align: center; }
} #container {
border-top: 1px solid #999;
#button span { margin-top: 160px;
display: block; width: 100%;
margin-top:15px; text-align: center;
font-size: 40px; padding: 15px;
color: #333; background: #eee;
font-weight:bold; background: -webkit-linear-gradient(#fff, #ccc);
text-decoration: none; background: -moz-linear-gradient(#fff, #ccc);
} background: -ms-linear-gradient(#fff, #ccc);
background: -o-linear-gradient(#fff, #ccc);
#nameWrapper { opacity: .9;
text-align: center; box-shadow: 0px 1px 8px rgba(0, 0, 0, 0.3);
} -webkit-animation: pop .3s ease-in 1;
</style> -moz-animation: pop .3s ease-in 1;
<script type="text/javascript"> }
function go2Name() @-webkit-keyframes pop {
{ from {
var padname = document.getElementById("padname").value; opacity: 0;
if(padname.length > 0) }
{ to {
window.location = "p/" + padname; opacity: 1;
} }
} }
@-moz-keyframes pop {
function go2Random() from {
{ opacity: 0;
window.location = "p/" + randomPadName() ; }
} to {
opacity: 1;
function randomPadName() }
{ }
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"; #button {
var string_length = 10; margin: 0 auto;
var randomstring = ''; border-radius: 3px;
for (var i=0; i<string_length; i++) { text-align: center;
var rnum = Math.floor(Math.random() * chars.length); font: 36px verdana,arial,sans-serif;
randomstring += chars.substring(rnum,rnum+1); color: white;
} text-shadow: 0 -1px 0 rgba(0,0,0,.8);
return randomstring; height: 70px;
} line-height: 70px;
</script> width: 300px;
</head> background: #555;
<body> background: -webkit-linear-gradient(#5F5F5F, #565656 50%, #4C4C4C 51%, #373737);
<div id="wrapper"> background: -moz-linear-gradient(#5F5F5F, #565656 50%, #4C4C4C 51%, #373737);
<a href="javascript:go2Random()" id="button"><span>New Pad</span></a> background: -ms-linear-gradient(#5F5F5F, #565656 50%, #4C4C4C 51%, #373737);
<div id="nameWrapper"><form> background: -o-linear-gradient(#5F5F5F, #565656 50%, #4C4C4C 51%, #373737);
<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;"> box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.9);
</form></div></a> -webkit-transition: background .8s linear;
</div> -moz-transition: background .8s linear;
</body> }
</html> #button:hover {
cursor: pointer;
background: #666;
background: -webkit-linear-gradient(#707070, #666666 50%, #5B5B5B 51%, #474747);
background: -moz-linear-gradient(#707070, #666666 50%, #5B5B5B 51%, #474747);
background: -ms-linear-gradient(#707070, #666666 50%, #5B5B5B 51%, #474747);
background: -o-linear-gradient(#707070, #666666 50%, #5B5B5B 51%, #474747);
}
#button:active {
box-shadow: inset 0 1px 12px rgba(0, 0, 0, 0.9);
background: #444;
background: -webkit-linear-gradient(#565656, #4C4C4C 50%, #424242 51%, #2D2D2D);
background: -moz-linear-gradient(#565656, #4C4C4C 50%, #424242 51%, #2D2D2D);
background: -o-linear-gradient(#565656, #4C4C4C 50%, #424242 51%, #2D2D2D);
}
input[type="text"] {
font-weight: bold;
font-size: 14px;
padding: 5px;
width: 245px;
}
input[type="submit"] {
height: 30px;
width: 40px;
}
::selection {
background-color:rgba(119,119,119,.8);
color:#fff;
}
::-moz-selection {
background-color:rgba(119,119,119,.8);
color:#fff;
}
</style>
<div id="container">
<div id="button" onclick="go2Random()">New Pad</div>
<br>
or create/open a Pad with the name
<br>
<input type="text" id="padname"> <input type="submit" value="OK" onclick="go2Name();return false;">
</div>
<script>
function go2Name() {
var padname = document.getElementById("padname").value;
if (padname.length > 0) {
window.location = "p/" + padname;
}else{
alert("Please enter a name");
}
}
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>
</html>