IPost/views/login.html

40 lines
1.3 KiB
HTML

<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<link rel="stylesheet" href="/css/logon.css">
<script type="text/javascript">
function login() {
const pw = document.getElementById("pass").value
localStorage.setItem("decryption_key",pw)
//yes I know this is not secure, but at this point I think it'd be better to trust the client for end-to-end encryption
}
</script>
<script src="/js/addnavbar.js" charset="utf-8"></script>
<link rel="stylesheet" href="/css/global.css">
</head>
<body>
<header>
<h1>Login</h1>
</header>
<main>
<form id="login_form" class="form_class" action="login" method="post">
<div class="form_div">
<label>Username:</label>
<input id="user" class="field_class" name="user" type="text" placeholder="username" autofocus required>
<label>Password:</label>
<input id="pass" class="field_class" name="pass" type="password" placeholder="password" required>
<button class="submit_class" type="submit" form="login_form" onclick="return login()">Login</button>
</div>
<div class="info_div">
<p>Do you not have an account? <a href="register">Register now!</a></p>
</div>
</form>
</main>
<footer>
</footer>
</body>
</html>