You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.1 KiB
35 lines
1.1 KiB
<script>
|
|
const login_form = (data, status) => {
|
|
if($no_error(data, status)) {
|
|
$redirect('/');
|
|
}
|
|
}
|
|
|
|
$boot(async () => {
|
|
$handle_form('login-form', login_form);
|
|
});
|
|
</script>
|
|
|
|
<div id='error'></div>
|
|
<template id='error-template'>
|
|
<aside id='error'><mark class="alert">${error}</mark></aside>
|
|
</template>
|
|
|
|
<div class="flex flex-col items-center p-6">
|
|
<form id='login-form' action="/api/login" method="POST">
|
|
<card>
|
|
<top><h2 style="color: white">Login</h2></top>
|
|
<middle>
|
|
<label for="username">Username</label>
|
|
<input id="username" name="username" placeholder="Username" type="text">
|
|
<label for="password">Password</label>
|
|
<input id="password" name="password" placeholder="Password" type="password">
|
|
</middle>
|
|
<bottom>
|
|
<button class="hover:btn-alert" type="button">Cancel</button>
|
|
<button class="hover:btn-hover" id="login-submit" type="submit">Login</button>
|
|
</bottom>
|
|
</card>
|
|
</form>
|
|
<div class="center"><a href="/register/">Need an account? Click to Register.</a></div>
|
|
</div>
|
|
|