tempalte profile

This commit is contained in:
JACS 2026-05-03 01:29:32 -05:00
parent 137b9f9a6a
commit 7f3bfb7d59
5 changed files with 189 additions and 8 deletions

View file

@ -225,6 +225,30 @@ func UserLock(c *core.Context) *core.Response {
return c.Response.Template("apptabler_auth-lock.html", data)
}
// UserSettings renders the user settings page.
func UserSettings(c *core.Context) *core.Response {
type userSettingsPageData struct {
TablerPageData
UserSettings FormtablerUserSettingsPage
}
data := userSettingsPageData{
TablerPageData: TablerPageData{
PageTitle: "Account Settings",
PageDescription: "User account settings",
ShowTopbar: true,
Sidebar: false,
PageHeader: "Account Settings",
PagePretitle: "User Profile",
UserName: "Jane Doe",
UserRole: "Administrator",
NavbarMenu: SampleNavbarMenu(),
Content: nil,
},
UserSettings: SampleUserSettings(),
}
return c.Response.Template("apptabler_usersettings.html", data)
}
// TablerHome renders the homepage/dashboard layout
func TablerHome(c *core.Context) *core.Response {
data := TablerPageData{

View file

@ -44,6 +44,31 @@ func SampleNavbarMenu() TablerMenu {
}
}
// SampleUserSettings returns sample data for the user settings page.
func SampleUserSettings() FormtablerUserSettingsPage {
return FormtablerUserSettingsPage{
ActiveTab: "My Account",
SidebarSections: []FormtablerUserSettingsSection{
{
Title: "Business settings",
SubItems: []FormtablerUserSettingsNavItem{
{Title: "My Account", Link: "/user/settings", Active: true},
{Title: "My Notifications", Link: "#"},
{Title: "Connected Apps", Link: "#"},
{Title: "Plans", Link: "#"},
{Title: "Billing & Invoices", Link: "#"},
},
},
{
Title: "Experience",
SubItems: []FormtablerUserSettingsNavItem{
{Title: "Give Feedback", Link: "#"},
},
},
},
}
}
// SampleComponents returns sample data for alerts, breadcrumbs, and toasts.
func SampleComponents() FormtablerComponentsPage {
return FormtablerComponentsPage{

View file

@ -481,6 +481,25 @@ type FormtablerComponentsPage struct {
Toasts []FormtablerToast
}
// FormtablerUserSettingsSection represents a section in the settings sidebar.
type FormtablerUserSettingsSection struct {
Title string
SubItems []FormtablerUserSettingsNavItem
}
// FormtablerUserSettingsNavItem represents a single navigation item in the settings sidebar.
type FormtablerUserSettingsNavItem struct {
Title string
Link string
Active bool
}
// FormtablerUserSettingsPage holds the data for the user settings page.
type FormtablerUserSettingsPage struct {
SidebarSections []FormtablerUserSettingsSection
ActiveTab string
}
// AuthLockPageData holds the data for the account lock page.
type AuthLockPageData struct {
PersonName string