terminal initializes successfully, scuffed intro visuals, termianl still visible with the login form, user temporarily locked to gornodox only. all algorithms work for now, needs to check for bugs and merge to master befpre build. SIDE NOTE - *Make domain builds only from the* master *branch.*
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
<script lang="ts">
|
||||
import { enhance } from "$app/forms";
|
||||
import { ArrowRight, CircleAlert, Lock } from "@lucide/svelte";
|
||||
|
||||
let formElem: HTMLElement;
|
||||
let {init, form}: { init: (formData: FormData) => void, form: any} = $props();
|
||||
</script>
|
||||
|
||||
<div id="wrapper" class=" opacity-0 flex flex-col items-center" class:outro={form?.success}>
|
||||
<img class="rounded-full mb-4 border-primary-dark border-2" src="/src/lib/assets/login-avatar.png" alt="" width="80" height="80" />
|
||||
<div id="name" class="flex flex-row items-center text-text-muted-dark justify-center gap-4">
|
||||
<strong>gornodox</strong>
|
||||
</div>
|
||||
<form bind:this={formElem} onanimationend={() => {formElem.classList.remove('invalid')}} use:enhance={({ formData }) =>
|
||||
{
|
||||
init(formData);
|
||||
}
|
||||
} method="POST" action="?/login" class:invalid={form?.error} name="login-form" autocomplete="off" class="mt-6 flex flex-row gap-1">
|
||||
<div class=" bg-bg-lighter-dark flex flex-row ml-4 items-center rounded outline-none border border-transparent text-sm p-1.5 w-2xs text-text-dark focus-within:bg-bg-light-dark focus-within:border-primary-dark {form?.error ? 'focus-within:border-warning-dark text-warning-dark' : ''}">
|
||||
<Lock size={16} strokeWidth={2} />
|
||||
<input autofocus name="password" type="password" autocomplete="off" placeholder="Password..." class=" placeholder-text-dark {form?.error ? 'placeholder-warning-dark' : ''} grow ml-2 appearance-none outline-none">
|
||||
</div>
|
||||
<button type="submit" class=" bg-bg-lighter-dark rounded p-1.5 hover:text-primary-hover-dark active:text-primary-dark active:bg-bg-light-dark">
|
||||
<ArrowRight size={20} strokeWidth={2} />
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.invalid {
|
||||
animation: var(--animate-error-shake);
|
||||
}
|
||||
|
||||
#error {
|
||||
animation: fadeIn 0.2s forwards cubic-bezier(.4,.7,0,.99);
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
animation: fadeIn 0.5s forwards cubic-bezier(.4,.7,0,.99) 1s;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.outro {
|
||||
transition: opacity 0.5s cubic-bezier(.4,.7,0,.99) 1s;
|
||||
opacity: 0;
|
||||
form {
|
||||
transition: opacity 0.2s cubic-bezier(.4,.7,0,.99);
|
||||
opacity: 0;
|
||||
}
|
||||
img {
|
||||
transform: translateY(30px) scale(1.2);
|
||||
transition: transform 0.5s ease-out;
|
||||
}
|
||||
#name {
|
||||
transform: translateY(30px);
|
||||
transition: transform 0.5s ease-out;
|
||||
}
|
||||
#error {
|
||||
transition: opacity 0.2s cubic-bezier(.4,.7,0,.99);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user