package views import ( "git.32bit.cafe/32bitcafe/guestbook/internal/forms" "git.32bit.cafe/32bitcafe/guestbook/internal/models" ) templ UserLogin (title string, data CommonData, form forms.UserLoginForm) { @base(title, data) {

Login

for _, error := range form.NonFieldErrors {
{ error }
}
{{ error, exists := form.FieldErrors["email"] }} if exists { }
{{ error, exists = form.FieldErrors["password"] }} if exists { }
} } templ UserRegistration (title string, data CommonData, form forms.UserRegistrationForm) { @base(title, data) {

User Registration

{{ error, exists := form.FieldErrors["name"] }} if exists { }
{{ error, exists = form.FieldErrors["email"] }} if exists { }
{{ error, exists = form.FieldErrors["password"] }} if exists { }
} } templ UserProfile (title string, data CommonData, user models.User) { @base(title, data) {

{ user.Username }

{ user.Email }

} } templ UserSettings () { }