make pubnix form better

This commit is contained in:
Akis 2023-02-24 14:51:34 +02:00
parent 8cc9e334c1
commit 392296ce89
Signed by untrusted user: akis
GPG Key ID: 267BF5C6677944ED

View File

@ -5,25 +5,40 @@
</script> </script>
<h1>{data.title}</h1> <h1>{data.title}</h1>
<form <form
method="POST" method="POST"
class="flex flex-col gap-4 w-fit children:(!bg-secondary text-start text-text rounded p-2)" class="flex flex-col gap-5"
> >
<div>
<label for="username">Username</label>
<input <input
type="text" type="text"
name="username" name="username"
placeholder="Username" placeholder="Username"
required
/> />
</div>
<div>
<label for="email">Email</label>
<input <input
type="email" type="email"
name="email" name="email"
placeholder="Email" placeholder="name@example.com"
required
/> />
</div>
<div>
<label for="ssh"><a href="https://wiki.projectsegfau.lt/index.php?title=Generating_an_SSH_key">SSH public key</a></label>
<textarea <textarea
name="ssh" name="ssh"
placeholder="SSH public key" placeholder="[...]"
class="resize w-60 h-30 sm:(w-100 h-50)" rows="5"
required
/> />
</div>
{#if form?.success} {#if form?.success}
{form.message} {form.message}
@ -32,9 +47,24 @@
{#if form?.error} {#if form?.error}
{form.message} {form.message}
{/if} {/if}
<button <button
type="submit" type="submit"
class="transition-all duration-200 text-text hover:brightness-70" class="transition-filter duration-200 hover:brightness-75"
>Submit</button >Submit registration <div class="i-ic:outline-arrow-circle-right" /></button
> >
</form> </form>
<style>
form > div {
@apply flex flex-col items-start gap-2 w-fit;
}
form > div > label {
@apply text-xl font-semibold;
}
form > div > input,
form > div > textarea,
form > button {
@apply w-110 lt-sm\:w-70 px-2 py-1 bg-secondary rounded flex items-center gap-2 text-lg;
}
</style>