9
This commit is contained in:
12
s1/src/routes/+page.svelte
Normal file
12
s1/src/routes/+page.svelte
Normal file
@@ -0,0 +1,12 @@
|
||||
<!-- <h1>Welcome to SvelteKit</h1>
|
||||
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p> -->
|
||||
<header>
|
||||
<h1>Welcome to Welland Gouldsmith Management System</h1>
|
||||
</header>
|
||||
<main>
|
||||
<section class="options">
|
||||
<h2>Choose an option:</h2>
|
||||
<a href="/student">Check Attendance (Student)</a>
|
||||
<a href="/faculty">Faculty Login</a>
|
||||
</section>
|
||||
</main>
|
@@ -1,13 +1,43 @@
|
||||
<script lang="ts">
|
||||
let st = "login";
|
||||
|
||||
function checkSt(st2: string) {
|
||||
let st1 = st2;
|
||||
if (st1 == "login") {
|
||||
st = "signup";
|
||||
} else {
|
||||
st = "login";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<header>
|
||||
<h1>Faculty Login</h1>
|
||||
</header>
|
||||
<main>
|
||||
<section class="login">
|
||||
<form action="#"> <label for="email">Email:</label>
|
||||
{#if st == "login"}
|
||||
<form action="#">
|
||||
<label for="email">Email:</label>
|
||||
<input name="email" type="email" id="username" required>
|
||||
<label for="password">Password:</label>
|
||||
<input name="password" type="password" id="password" required>
|
||||
<button type="submit">Login</button>
|
||||
<button on:click={() => checkSt(st)}>Sign Up</button>
|
||||
</form>
|
||||
{:else}
|
||||
<form action="/controller/faculty/create" method="post">
|
||||
<label for="firstname">First Name:</label>
|
||||
<input name="firstname" type="text" id="firstname" required>
|
||||
<label for="lastname">Last Name:</label>
|
||||
<input name="lastname" type="text" id="lastname" required>
|
||||
<label for="email">Email:</label>
|
||||
<input name="email" type="email" id="email" required>
|
||||
<label for="password">Password:</label>
|
||||
<input name="password" type="password" id="password" required>
|
||||
<button type="submit">Sign Up</button>
|
||||
<button on:click={() => checkSt(st)}>Login</button>
|
||||
</form>
|
||||
{/if}
|
||||
</section>
|
||||
</main>
|
Reference in New Issue
Block a user