style(frontend): format codebase with prettier
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { submit } from "$lib/api";
|
||||
import { submit } from '$lib/api';
|
||||
|
||||
let activeTab = $state<'login' | 'register'>('login');
|
||||
let username = $state('');
|
||||
@@ -16,20 +16,25 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="flex-1 flex items-center justify-center -mt-16">
|
||||
<div class="-mt-16 flex flex-1 items-center justify-center">
|
||||
<div class="w-full max-w-xs">
|
||||
<h1 class="text-4xl text-white mb-8" style="font-family: 'Caveat', cursive;">loft</h1>
|
||||
<h1 class="mb-8 text-4xl text-white" style="font-family: 'Caveat', cursive;">loft</h1>
|
||||
|
||||
<div class="flex mb-6 border-b border-sky-200/20">
|
||||
<div class="mb-6 flex border-b border-sky-200/20">
|
||||
<button
|
||||
onclick={() => activeTab = 'login'}
|
||||
class="flex-1 py-2 text-sm transition-colors cursor-pointer {activeTab === 'login' ? 'text-white border-b border-white -mb-px' : 'text-white/40 hover:text-white/60'}"
|
||||
onclick={() => (activeTab = 'login')}
|
||||
class="flex-1 cursor-pointer py-2 text-sm transition-colors {activeTab === 'login'
|
||||
? '-mb-px border-b border-white text-white'
|
||||
: 'text-white/40 hover:text-white/60'}"
|
||||
>
|
||||
Login
|
||||
</button>
|
||||
<button
|
||||
onclick={() => activeTab = 'register'}
|
||||
class="flex-1 py-2 text-sm transition-colors cursor-pointer {activeTab === 'register' ? 'text-white border-b border-white -mb-px' : 'text-white/40 hover:text-white/60'}"
|
||||
onclick={() => (activeTab = 'register')}
|
||||
class="flex-1 cursor-pointer py-2 text-sm transition-colors {activeTab ===
|
||||
'register'
|
||||
? '-mb-px border-b border-white text-white'
|
||||
: 'text-white/40 hover:text-white/60'}"
|
||||
>
|
||||
Register
|
||||
</button>
|
||||
@@ -37,29 +42,30 @@
|
||||
|
||||
<div class="flex flex-col gap-3">
|
||||
<div class="flex flex-col gap-1">
|
||||
<label for="username" class="text-white/30 text-xs">Username</label>
|
||||
<label for="username" class="text-xs text-white/30">Username</label>
|
||||
<input
|
||||
id="username"
|
||||
bind:value={username}
|
||||
type="text"
|
||||
autocomplete="username"
|
||||
class="px-4 py-2 rounded-sm bg-[#0f1117]! border border-sky-200/15 transition-colors hover:bg-black/20 hover:border-sky-200/30 text-white/80 text-sm focus:outline-none focus:border-sky-200/40"
|
||||
class="rounded-sm border border-sky-200/15 bg-[#0f1117]! px-4 py-2 text-sm text-white/80 transition-colors hover:border-sky-200/30 hover:bg-black/20 focus:border-sky-200/40 focus:outline-none"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex flex-col gap-1">
|
||||
<label for="password" class="text-white/30 text-xs">Password</label>
|
||||
<label for="password" class="text-xs text-white/30">Password</label>
|
||||
<input
|
||||
id="password"
|
||||
bind:value={password}
|
||||
type="password"
|
||||
autocomplete="current-password"
|
||||
class="px-4 py-2 rounded-sm bg-[#0f1117]! border border-sky-200/15 transition-colors hover:bg-black/20 hover:border-sky-200/30 text-white/80 text-sm focus:outline-none focus:border-sky-200/40"
|
||||
class="rounded-sm border border-sky-200/15 bg-[#0f1117]! px-4 py-2 text-sm text-white/80 transition-colors hover:border-sky-200/30 hover:bg-black/20 focus:border-sky-200/40 focus:outline-none"
|
||||
/>
|
||||
</div>
|
||||
{#if error}<p class="text-red-400/60 text-xs">{error}</p>{/if}
|
||||
<button
|
||||
{#if error}<p class="text-xs text-red-400/60">{error}</p>{/if}
|
||||
<button
|
||||
onclick={handleSubmit}
|
||||
class="mt-1 px-4 py-2 border border-sky-200/15 text-white/40 hover:border-sky-200/30 hover:text-white/60 text-sm transition-colors rounded-sm cursor-pointer">
|
||||
class="mt-1 cursor-pointer rounded-sm border border-sky-200/15 px-4 py-2 text-sm text-white/40 transition-colors hover:border-sky-200/30 hover:text-white/60"
|
||||
>
|
||||
{activeTab === 'login' ? 'Login' : 'Register'}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user