etherpad-lite/static/index.html

149 lines
5.8 KiB
HTML
Raw Normal View History

<!doctype html>
<html>
<title>Etherpad Lite</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
2011-07-24 18:47:04 +02:00
<style>
*{ margin:0;padding:0; }
2011-07-24 18:47:04 +02:00
body {
background: rgba(0,0,0,.05);
color: #333;
font: 14px helvetica,sans-serif;
background: #ccc;
background: -webkit-radial-gradient(circle,#aaa,#eee 60%) center fixed;
background: -moz-radial-gradient(circle,#aaa,#eee 60%) center fixed;
background: -ms-radial-gradient(circle,#aaa,#eee 60%) center fixed;
background: -o-radial-gradient(circle,#aaa,#eee 60%) center fixed;
overflow-x: hidden;
border-top: 8px solid rgba(51,51,51,.8);
2011-07-24 18:47:04 +02:00
}
#container {
text-shadow: 0 1px 1px #fff;
border-top: 1px solid #999;
margin-top: 160px;
text-align: center;
padding: 15px;
background: #eee;
background: -webkit-linear-gradient(#fff,#ccc);
background: -moz-linear-gradient(#fff,#ccc);
background: -ms-linear-gradient(#fff,#ccc);
background: -o-linear-gradient(#fff,#ccc);
opacity: .9;
box-shadow: 0px 1px 8px rgba(0,0,0,0.3);
2011-07-24 18:47:04 +02:00
}
#button {
margin: 0 auto;
border-radius: 3px;
text-align: center;
font: 36px verdana,arial,sans-serif;
color: white;
text-shadow: 0 -1px 0 rgba(0,0,0,.8);
height: 70px;
line-height: 70px;
width: 300px;
background: #555;
background: -webkit-linear-gradient(#5F5F5F,#565656 50%,#4C4C4C 51%,#373737);
background: -moz-linear-gradient(#5F5F5F,#565656 50%,#4C4C4C 51%,#373737);
background: -ms-linear-gradient(#5F5F5F,#565656 50%,#4C4C4C 51%,#373737);
background: -o-linear-gradient(#5F5F5F,#565656 50%,#4C4C4C 51%,#373737);
box-shadow: inset 0 1px 3px rgba(0,0,0,0.9);
}
2011-07-24 18:47:04 +02:00
#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);
2011-07-24 18:47:04 +02:00
}
#button:active {
box-shadow: inset 0 1px 12px rgba(0,0,0,0.9);
background: #444;
2011-07-26 15:11:39 +02:00
}
#label {
2011-07-26 15:19:01 +02:00
text-align: left;
2011-07-26 15:17:45 +02:00
margin: 0 auto;
width: 300px;
}
input {
vertical-align: middle;
font-weight: bold;
font-size: 15px;
2011-07-26 15:11:39 +02:00
}
2011-07-24 18:47:04 +02:00
input[type="text"] {
width: 243px;
padding: 10px 47px 10px 10px;
background: #fff;
border: 1px solid #bbb;
outline: none;
border-radius: 3px;
text-shadow: 0 0 1px #fff;
}
2011-07-24 18:47:04 +02:00
input[type="submit"] {
width: 45px;
margin-left: -50px;
padding: 8px;
2011-07-24 18:47:04 +02:00
}
input[type="submit"]::-moz-focus-inner { border: 0 }
@-moz-document url-prefix() { input[type="submit"] { padding: 7px } }
@media only screen and (min-device-width: 320px) and (max-device-width: 720px) {
body {
background: #bbb;
background: -webkit-linear-gradient(#aaa,#eee 60%) center fixed;
height: 100%;
}
#container {
margin-top: 0;
text-align: left;
}
#button, #label {
text-align: center;
width: 95%;
}
form {
text-align: center;
}
input[type=text] {
width: 75%;
}
}
2011-07-24 18:47:04 +02:00
</style>
<link href="static/custom/index.css" rel="stylesheet">
2011-08-02 14:06:09 +02:00
<script src="static/custom/index.js"></script>
<div id="container">
<div id="button" onclick="go2Random()" class="translate">New Pad</div><br><div id="label" class="translate">or create/open a Pad with the name</div>
<form action="#" onsubmit="go2Name();return false;">
<input type="text" id="padname" autofocus>
<input type="submit" value="OK">
</form>
</div>
<script>
function go2Name()
{
var padname = document.getElementById("padname").value;
padname.length > 0 ? window.location = "p/" + padname : alert("Please enter a name")
2011-07-24 18:47:04 +02:00
}
function go2Random()
{
window.location = "p/" + randomPadName();
2011-07-24 18:47:04 +02:00
}
function randomPadName()
{
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
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);
2011-07-24 18:47:04 +02:00
}
return randomstring;
2011-07-24 18:47:04 +02:00
}
//start the costum js
if(typeof costumStart == "function") costumStart();
</script>
</html>