Dustin Falgout
9 years ago
2 changed files with 168 additions and 181 deletions
@ -1,165 +1,161 @@ |
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
||||||
<html> |
<html> |
||||||
<head> |
<head> |
||||||
<style type="text/css"> |
<style> |
||||||
td |
html, body { |
||||||
{ |
width: 100%; |
||||||
font-size: 24px; |
height: 100%; |
||||||
vertical-align: middle; |
overflow: hidden; |
||||||
} |
margin: 0; |
||||||
|
} |
||||||
input |
|
||||||
{ |
body { |
||||||
font-size: 24px; |
background: linear-gradient(white, SlateGray); |
||||||
} |
font-size: 24px; |
||||||
|
} |
||||||
html |
|
||||||
{ |
.container { |
||||||
height: 100%; |
width: 100%; |
||||||
} |
height: 100%; |
||||||
|
display: -webkit-flex; |
||||||
body |
display: flex; |
||||||
{ |
-webkit-flex-direction: column; |
||||||
background: linear-gradient(white, SlateGray); |
flex-direction: column; |
||||||
} |
} |
||||||
|
|
||||||
.topBox |
.topBox, .inputBox, .messageBox { |
||||||
{ |
width: 100%; |
||||||
height: 490px; |
height: 33.33%; |
||||||
} |
text-align: center; |
||||||
|
} |
||||||
.inputBox |
|
||||||
{ |
.inputBox { |
||||||
width: 100%; |
position: relative; |
||||||
} |
} |
||||||
|
|
||||||
.messageBox |
.wrapper { |
||||||
{ |
height: 85px; |
||||||
font-size: 24px; |
position: absolute; |
||||||
width: 60%; |
left: 0; |
||||||
margin-left: auto; |
right: 0; |
||||||
margin-right: auto; |
top: 0; |
||||||
display: block; |
bottom: 0; |
||||||
text-align: center; |
margin: auto; |
||||||
visibility: hidden; |
} |
||||||
} |
|
||||||
</style> |
.topBox { |
||||||
|
text-align: right; |
||||||
<script type="text/javascript"> |
padding: 15px; |
||||||
|
box-sizing: border-box; |
||||||
/*********************************************************************/ |
} |
||||||
/* Callbacks for lightdm-webkit-greeter */ |
|
||||||
/*********************************************************************/ |
.messageBox { |
||||||
|
text-align: center; |
||||||
|
visibility: hidden; |
||||||
/* |
} |
||||||
* show_prompt callback. |
</style> |
||||||
*/ |
</head> |
||||||
|
|
||||||
function show_prompt(text, type) |
<body> |
||||||
{ |
<div class="container"> |
||||||
// type is either "text" or "password" |
<div class="topBox"> |
||||||
prompt = document.getElementById("prompt"); |
<img onclick="javascript:lightdm.shutdown();" src="power_button.png"/> |
||||||
prompt.innerHTML = text; |
</div> |
||||||
entry = document.getElementById("entry"); |
<div class="inputBox"> |
||||||
entry.value = ""; // clear entry |
<div class="wrapper"> |
||||||
entry.type = type; |
<div id="prompt"></div> |
||||||
entry.focus(); |
<form action="javascript: handle_input()"> |
||||||
} |
<input id="entry" /> |
||||||
|
</form> |
||||||
/* |
</div> |
||||||
* show_message callback. |
</div> |
||||||
*/ |
<div class="messageBox" id="messages"></div> |
||||||
|
</div> |
||||||
function show_message(text, type) |
<script> |
||||||
{ |
/*********************************************************************/ |
||||||
if (text.length == 0) |
/* Callbacks for lightdm-webkit-greeter */ |
||||||
return; |
/*********************************************************************/ |
||||||
messages = document.getElementById("messages"); |
|
||||||
messages.style.visibility = "visible"; |
/** |
||||||
// type is either "info" or "error" |
* show_prompt callback. |
||||||
if (type == "error") { |
*/ |
||||||
text = "<font color=\"red\">" + text + "</font>"; |
function show_prompt(text, type) { |
||||||
} |
// type is either "text" or "password" |
||||||
text = text + "<br>"; |
prompt = document.getElementById("prompt"); |
||||||
messages.innerHTML = messages.innerHTML + text; |
prompt.innerHTML = text; |
||||||
} |
entry = document.getElementById("entry"); |
||||||
|
entry.value = ""; // clear entry |
||||||
/* |
entry.type = type; |
||||||
* authentication_complete callback. |
entry.focus(); |
||||||
*/ |
} |
||||||
|
|
||||||
function authentication_complete() |
/** |
||||||
{ |
* show_message callback. |
||||||
if (lightdm.is_authenticated) { |
*/ |
||||||
lightdm.start_session_sync (); // Start default session |
function show_message(text, type) { |
||||||
} else { |
if (text.length == 0) |
||||||
show_message ("Authentication Failed", "error"); |
return; |
||||||
setTimeout (start_authentication, 3000); |
messages = document.getElementById("messages"); |
||||||
} |
messages.style.visibility = "visible"; |
||||||
} |
// type is either "info" or "error" |
||||||
|
if (type == "error") { |
||||||
/* |
text = "<font color=\"red\">" + text + "</font>"; |
||||||
* autologin_timer_expired callback. |
} |
||||||
*/ |
text = text + "<br>"; |
||||||
|
messages.innerHTML = messages.innerHTML + text; |
||||||
function autologin_timer_expired(username) |
} |
||||||
{ |
|
||||||
/* Stub. Does nothing. */ |
/** |
||||||
} |
* authentication_complete callback. |
||||||
|
*/ |
||||||
/*********************************************************************/ |
function authentication_complete() { |
||||||
/* Functions local to this greeter */ |
if (lightdm.is_authenticated) { |
||||||
/*********************************************************************/ |
lightdm.start_session_sync(); // Start default session |
||||||
|
} else { |
||||||
/* |
show_message("Authentication Failed", "error"); |
||||||
* clear_messages |
setTimeout(start_authentication, 3000); |
||||||
*/ |
} |
||||||
|
} |
||||||
function clear_messages() |
|
||||||
{ |
/** |
||||||
messages = document.getElementById("messages"); |
* autologin_timer_expired callback. |
||||||
messages.innerHTML = ""; |
*/ |
||||||
messages.style.visibility = "hidden"; |
function autologin_timer_expired(username) { |
||||||
} |
/* Stub. Does nothing. */ |
||||||
|
} |
||||||
/* |
|
||||||
* Kickoff the authentication process |
/*********************************************************************/ |
||||||
*/ |
/* Functions local to this greeter */ |
||||||
|
/*********************************************************************/ |
||||||
function start_authentication() |
|
||||||
{ |
/** |
||||||
clear_messages(); |
* clear_messages |
||||||
lightdm.authenticate(); // start with null userid, have pam prompt for userid. |
*/ |
||||||
} |
function clear_messages() { |
||||||
|
messages = document.getElementById("messages"); |
||||||
/* |
messages.innerHTML = ""; |
||||||
* handle the input from the entry field. |
messages.style.visibility = "hidden"; |
||||||
*/ |
} |
||||||
|
|
||||||
function handle_input() |
/** |
||||||
{ |
* Kickoff the authentication process |
||||||
entry = document.getElementById("entry"); |
*/ |
||||||
lightdm.respond(entry.value); |
function start_authentication() { |
||||||
} |
clear_messages(); |
||||||
</script> |
lightdm.start_authentication(); // start with null userid, have pam prompt for userid. |
||||||
</head> |
} |
||||||
|
|
||||||
<body> |
/** |
||||||
<img style="float: right;" onclick="javascript:lightdm.shutdown();" src="power_button.png" /> |
* handle the input from the entry field. |
||||||
<div class="topBox"></div> |
*/ |
||||||
<div class="inputBox"> |
function handle_input() { |
||||||
<table id="input_table" width="100%"> |
entry = document.getElementById("entry"); |
||||||
<tr> |
lightdm.respond(entry.value); |
||||||
<td id="prompt" width="45%" align="right"></td> |
} |
||||||
<td width="55%"><form action="javascript: handle_input()"><input id="entry"></form></td> |
</script> |
||||||
</tr> |
<script src="../antergos/js/mock.js"></script> |
||||||
</table> |
<script> |
||||||
</div> |
start_authentication(); |
||||||
<div class="messageBox" id="messages"></div> |
</script> |
||||||
|
</body> |
||||||
<script type="text/javascript"> |
|
||||||
start_authentication(); |
|
||||||
</script> |
|
||||||
</body> |
|
||||||
</html> |
</html> |
||||||
|
Loading…
Reference in new issue