feat: forms floating labels and validator

This commit is contained in:
Per Stark
2025-01-21 13:26:56 +01:00
parent b1b36f057e
commit 09bfe6a9c9
4 changed files with 35 additions and 25 deletions

View File

@@ -14,22 +14,24 @@
<h2 class="text-2xl font-bold text-center mb-8">Login to your account</h2>
<form hx-post="/signin" hx-target="#login-result">
<div class="form-control">
<label class="label">
<span class="label-text">Email</span>
<label class="floating-label">
<span>Email</span>
<input type="email" placeholder="Email" class="input input-md w-full validator" required />
<div class="validator-hint hidden">Enter valid email address</div>
</label>
<input type="email" name="email" placeholder="Enter your email" class="input input-bordered w-full" required />
</div>
<div class="form-control">
<label class="label">
<span class="label-text">Password</span>
</label>
<input type="password" name="password" placeholder="Enter your password" class="input input-bordered w-full"
required minlength="8" />
<div class="form-control mt-4">
<label class="floating-label">
<span>Password</span>
<input type="password" class="input validator w-full" required placeholder="Password" minlength="8" />
</div>
<div class="form-control mt-4">
<label class="label cursor-pointer justify-start gap-4">
<input type="checkbox" name="remember_me" class="checkbox checkbox-primary" />
<input type="checkbox" name="remember_me" class="checkbox " />
<span class="label-text">Remember me</span>
</label>
</div>