This commit is contained in:
2024-07-08 02:50:40 +05:30
parent 383747a2f6
commit b58a2bdb83
2 changed files with 43 additions and 1 deletions

View 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>

View File

@@ -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>