auth-proxy/src/login.html

58 lines
1.6 KiB
HTML

<!doctype html>
<html lang='en'>
<head>
<title>RDSM.ca Login</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script>
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
document.addEventListener("DOMContentLoaded", function() {
document.getElementById('target').value = getParameterByName('target');
document.getElementById('password').focus();
});
</script>
<style>
html {
min-height: 100%;
display: grid;
}
body {
background-color: #2a2a2a;
margin: auto;
}
input {
font-size: 1rem;
appearance: none;
background-color: transparent;
border: 2px solid #4a4a4a;
border-radius: 1rem;
padding: 0.5rem 0.75rem;
margin: 0;
box-sizing: border-box;
color: #fff;
}
input[type='submit'] {
cursor: pointer;
}
input[type='submit']:hover {
background-color: #2a2a99;
}
input[type='submit']:active {
background-color: #1a1a66;
}
</style>
</head>
<body>
<form action='/auth/password' method='post'>
<input type='password' placeholder='Password' name='password' id='password' />
<input type='hidden' name='target' id='target' />
<input type='submit' value='Login' />
</form>
</body>
</html>