Started work on the admin/login system.

- Added description to template.html.
- Testing on:submit using a js callback.
- Added title to admin page.
This commit is contained in:
Chris Dill 2020-09-10 15:05:12 +01:00
parent 5d21c148c7
commit 31c31b0a61
3 changed files with 22 additions and 4 deletions

View File

@ -2,6 +2,10 @@
import Banner from '../../components/banner.svelte'
</script>
<svelte:head>
<title>Quartznet - Admin</title>
</svelte:head>
<Banner title="Admin"/>
<main class="container">

View File

@ -1,25 +1,38 @@
<script>
import Banner from '../../components/banner.svelte'
let username = "";
let password = "";
const submitHandler = () => {
alert("TODO: implement login backend");
}
</script>
<svelte:head>
<title>Quartznet - Login</title>
</svelte:head>
<Banner title="Login"/>
<main class="container">
<form class="form-signin" action="login.php" method="post">
<form on:submit|preventDefault={submitHandler} class="form-signin" method="post">
<div class="form-label-group">
<label for="username">Username</label>
<input type="text" id="username" class="form-control" name="username" placeholder="Username" required>
<input type="text" id="username" class="form-control" bind:value={username}
name="username" placeholder="Username" required>
</div>
<div class="form-label-group">
<label for="inputPassword">Password</label>
<input type="password" id="password" class="form-control" name="password" placeholder="Password" required>
<input type="password" id="password" class="form-control" bind:value={password}
name="password" placeholder="Password" required>
</div>
<div class="custom-control custom-checkbox mb-3">
<input type="checkbox" class="custom-control-input" id="customCheck1">
<label class="custom-control-label" for="customCheck1">Remember password</label>
</div>
<button class="btn btn-lg btn-primary btn-block text-uppercase" type="submit">Sign in</button>
<button class="btn btn-primary" type="submit">Sign in</button>
</form>
</main>

View File

@ -4,6 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="theme-color" content="#333333">
<meta name="description" content="Quartznet is a small team developing games, tools and more!">
%sapper.base%