Added basic login page

This commit is contained in:
Nicolai Ort 2021-08-18 16:39:44 +02:00
parent c2de493870
commit 5263d1974a
Signed by: niggl
GPG Key ID: 13AFA55AF62F269F
2 changed files with 47 additions and 1 deletions

View File

@ -120,7 +120,7 @@
{:else}
<a
class="flex items-center px-4 py-2 mt-5 text-gray-600 transition-colors duration-200 transform rounded-md dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 dark:hover:text-gray-200 hover:text-gray-700"
href="#"
href="/login"
>
<svg
xmlns="http://www.w3.org/2000/svg"

46
src/routes/login.svelte Normal file
View File

@ -0,0 +1,46 @@
<script>
import UserStore from '$lib/UserStore';
$: logged_in = $UserStore.isLoggedIn;
</script>
<div class="w-full max-w-sm mx-auto overflow-hidden bg-white rounded-lg shadow-md dark:bg-gray-800">
<div class="px-6 py-4">
<h2 class="text-3xl font-bold text-center text-gray-700 dark:text-white">LinkyLinky</h2>
<h3 class="mt-1 text-xl font-medium text-center text-gray-600 dark:text-gray-200">
Welcome Back
</h3>
<p class="mt-1 text-center text-gray-500 dark:text-gray-400">Please login</p>
<form>
<div class="w-full mt-4">
<input
class="block w-full px-4 py-2 mt-2 text-gray-700 placeholder-gray-500 bg-white border border-gray-300 rounded-md dark:bg-gray-800 dark:border-gray-600 dark:placeholder-gray-400 focus:border-blue-500 dark:focus:border-blue-500 focus:outline-none focus:ring"
type="text"
placeholder="Username"
aria-label="Username"
/>
</div>
<div class="w-full mt-4">
<input
class="block w-full px-4 py-2 mt-2 text-gray-700 placeholder-gray-500 bg-white border border-gray-300 rounded-md dark:bg-gray-800 dark:border-gray-600 dark:placeholder-gray-400 focus:border-blue-500 dark:focus:border-blue-500 focus:outline-none focus:ring"
type="password"
placeholder="Password"
aria-label="Password"
/>
</div>
<div class="flex items-center justify-between mt-4">
<button
class="px-4 py-2 leading-5 text-white transition-colors duration-200 transform bg-gray-700 rounded hover:bg-gray-600 focus:outline-none"
type="button"
>
Login
</button>
</div>
</form>
</div>
</div>