mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-04 22:27:10 -04:00
161 lines
5.9 KiB
HTML
161 lines
5.9 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<title>Etherpad Lite</title>
|
|
<style>
|
|
*{ margin:0;padding:0; }
|
|
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)
|
|
}
|
|
#container {
|
|
text-shadow: 0 1px 1px #fff;
|
|
border-top: 1px solid #999;
|
|
margin-top: 160px;
|
|
width: 100%;
|
|
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)
|
|
}
|
|
#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)
|
|
}
|
|
#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
|
|
}
|
|
#label {
|
|
text-align: left;
|
|
margin: 0 auto;
|
|
width: 300px
|
|
}
|
|
input {
|
|
vertical-align: middle;
|
|
font-weight: bold;
|
|
font-size: 15px
|
|
}
|
|
input[type="text"], input[type="password"] {
|
|
width: 243px;
|
|
padding: 10px 47px 10px 10px;
|
|
background: #fff;
|
|
border: 1px solid #bbb;
|
|
outline: none;
|
|
border-radius: 3px;
|
|
text-shadow: 0 0 1px #fff
|
|
}
|
|
#usepwlabel {
|
|
display: inline;
|
|
}
|
|
#usePasswordContainer {
|
|
margin: 10px 0 5px 0
|
|
}
|
|
input[type="submit"] {
|
|
width: 45px;
|
|
margin-left: -50px;
|
|
padding: 8px
|
|
}
|
|
input[type="submit"]::-moz-focus-inner { border: 0 }
|
|
@-moz-document url-prefix() { input[type="submit"] { padding: 7px } }
|
|
</style>
|
|
<link href="static/custom/index.css" rel="stylesheet">
|
|
<script src="static/custom/index.js"></script>
|
|
<script src="static/js/jquery.min.js"></script>
|
|
<div id="container">
|
|
<div id="button" onclick="go2Random()">New Pad</div><br><div id="label">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"/><br/>
|
|
<div id="usePasswordContainer"><input type="checkbox" id="usePassword" onclick="updatePasswordField()"/><label for="usePassword"><div id="usepwlabel">Use password</div></label></div>
|
|
<div id="passwordFieldContainer"><input type="password" id="passwordField"/></div>
|
|
</form>
|
|
</div>
|
|
<script>
|
|
function go2Name()
|
|
{
|
|
var padname = $("#padname").val();
|
|
if(padname.length > 0){
|
|
if($("#passwordField").val().length>0)
|
|
{
|
|
$.get("api/1/createPad", {apikey: "o8PJ496RtbcwoMQGgDyjoOmyq5wJ8dON", padID: padname}, function(data){
|
|
$.get("api/1/setPassword", {apikey: "o8PJ496RtbcwoMQGgDyjoOmyq5wJ8dON", padID: padname, password: $("#passwordField").val()}, function(data){
|
|
window.location = "p/" + padname;
|
|
});
|
|
});
|
|
}
|
|
else
|
|
{
|
|
window.location = "p/" + padname;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
alert("Please enter a name");
|
|
}
|
|
}
|
|
|
|
function go2Random()
|
|
{
|
|
$("#padname").val(randomPadName());
|
|
go2Name();
|
|
}
|
|
|
|
function randomPadName()
|
|
{
|
|
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
|
var randomstring = '';
|
|
for (var i = 0; i < 10; i++)
|
|
{
|
|
randomstring += chars[Math.floor(Math.random() * chars.length)];
|
|
}
|
|
return randomstring;
|
|
}
|
|
|
|
function updatePasswordField()
|
|
{
|
|
if($("#usePassword:checked").val()){
|
|
$("#passwordFieldContainer").css("display", "block");
|
|
}
|
|
else
|
|
{
|
|
$("#passwordFieldContainer").css("display", "none");
|
|
}
|
|
}
|
|
updatePasswordField();
|
|
if(typeof customStart == "function") customStart();
|
|
</script>
|
|
</html>
|