mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
43 lines
2.1 KiB
Templ
43 lines
2.1 KiB
Templ
package pages
|
|
|
|
import (
|
|
"github.com/labstack/echo/v4"
|
|
"github.com/onsonr/sonr/pkg/nebula/components/blocks"
|
|
"github.com/onsonr/sonr/pkg/nebula/models/formstate"
|
|
)
|
|
|
|
func Register(c echo.Context) error {
|
|
return echoResponse(c, registerView(c))
|
|
}
|
|
|
|
templ registerView(c echo.Context) {
|
|
@blocks.Layout("Sonr.ID", true) {
|
|
@blocks.Card("register-view", blocks.SizeMedium) {
|
|
@blocks.H2("Account Registration")
|
|
@blocks.Spacer()
|
|
@blocks.Breadcrumbs()
|
|
@basicInfoForm(formstate.Initial)
|
|
@blocks.Spacer()
|
|
@blocks.Button(blocks.GET("/", "#register-view")) {
|
|
@blocks.Text("Cancel")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
templ basicInfoForm(state formstate.FormState) {
|
|
switch (state) {
|
|
default:
|
|
<div class="border rounded-lg shadow-sm bg-card text-neutral-900">
|
|
<div class="flex flex-col space-y-1.5 p-6">
|
|
<h3 class="text-lg font-semibold leading-none tracking-tight">Account</h3>
|
|
<p class="text-sm text-neutral-500">Make changes to your account here. Click save when you're done.</p>
|
|
</div>
|
|
<div class="p-6 pt-0 space-y-2">
|
|
<div class="space-y-1"><label class="text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="name">Name</label><input type="text" id="name" placeholder="Adam Wathan" class="flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-neutral-300 ring-offset-background placeholder:text-neutral-400 focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50"/></div>
|
|
<div class="space-y-1"><label class="text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="username">Handle</label><input type="text" id="handle" placeholder="angelo.snr" class="flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-neutral-300 ring-offset-background placeholder:text-neutral-400 focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50"/></div>
|
|
</div>
|
|
</div>
|
|
}
|
|
}
|