package templates // AccountData is everything the account page needs to render the // current user's profile and password forms. type AccountData struct { Username string DisplayName string Email string ProfileMsg string // success/error message shown above the profile form, "" for none ProfileErr bool // true if ProfileMsg is an error (red) rather than a success (green) PasswordMsg string // success/error message shown above the password form, "" for none PasswordErr bool } templ Account(data AccountData) { @Layout("Account", data.Username) {
{ data.ProfileMsg }
}{ data.PasswordMsg }
}