This commit is contained in:
JACS 2026-05-10 19:00:58 -05:00
parent e4b0969ecf
commit 80ae1c4f91
3 changed files with 108 additions and 102 deletions

84
controllers/tablerdemo.go Normal file
View file

@ -0,0 +1,84 @@
package controllers
// FormtablerFormElementsPage is the page-specific struct for the form elements demo.
// Each field is one of the 25 form element groups.
type FormtablerFormElementsPage struct {
TextInputs []FormtablerTextInput
IconInputs []FormtablerIconInput
IconSeparated FormtablerIconSeparated
InputSizing FormtablerInputSizing
FileInput FormtablerFileInput
ColorInput FormtablerColorInput
ColorPicker FormtablerColorPicker
RangeInput FormtablerRangeInput
Datalist FormtablerDatalist
ImageCheck FormtablerImageCheck
ImageRadio FormtablerImageRadio
ImagePerson FormtablerImagePerson
Checkboxes FormtablerCheckboxes
CheckboxesInline FormtablerCheckboxesInline
Radios FormtablerRadios
RadiosInline FormtablerRadiosInline
Toggles FormtablerToggle
ToggleSingle FormtablerToggleSingle
Select FormtablerSelect
Selectgroups []FormtablerSelectGroup
SelectgroupPayments FormtablerSelectgroupPayments
SelectgroupProjectManager FormtablerSelectgroupProjectManager
Fieldset FormtablerFieldset
CheckboxesList FormtablerCheckboxesList
ValidationStates FormtablerValidationStates
}
// FormtablerComponentsPage is the page-specific struct for the combined demo
// showing alerts, toasts, and breadcrumbs.
type FormtablerComponentsPage struct {
Alerts []FormtablerAlert
Breadcrumbs []FormtablerBreadcrumb
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
}
// AdminUserRow represents a single user in the admin users list.
type AdminUserRow struct {
Name string
Email string
Status string // "Active", "Inactive", "Invited"
Roles string // comma-separated role names
EditLink string
}
// AdminUsersPage holds the data for the admin users page.
type AdminUsersPage struct {
Users []AdminUserRow
AddLink string
}
// AdminCustomersPage holds the data for the admin customers listing page.
type AdminCustomersPage struct {
Customers []CustomerTableRow
}
// AuthLockPageData holds the data for the account lock page.
type AuthLockPageData struct {
PersonName string
}

View file

@ -443,88 +443,6 @@ type FormtablerCard struct {
Progress *FormtablerCardProgress Progress *FormtablerCardProgress
} }
// FormtablerFormElementsPage is the page-specific struct for the form elements demo.
// Each field is one of the 25 form element groups.
type FormtablerFormElementsPage struct {
TextInputs []FormtablerTextInput
IconInputs []FormtablerIconInput
IconSeparated FormtablerIconSeparated
InputSizing FormtablerInputSizing
FileInput FormtablerFileInput
ColorInput FormtablerColorInput
ColorPicker FormtablerColorPicker
RangeInput FormtablerRangeInput
Datalist FormtablerDatalist
ImageCheck FormtablerImageCheck
ImageRadio FormtablerImageRadio
ImagePerson FormtablerImagePerson
Checkboxes FormtablerCheckboxes
CheckboxesInline FormtablerCheckboxesInline
Radios FormtablerRadios
RadiosInline FormtablerRadiosInline
Toggles FormtablerToggle
ToggleSingle FormtablerToggleSingle
Select FormtablerSelect
Selectgroups []FormtablerSelectGroup
SelectgroupPayments FormtablerSelectgroupPayments
SelectgroupProjectManager FormtablerSelectgroupProjectManager
Fieldset FormtablerFieldset
CheckboxesList FormtablerCheckboxesList
ValidationStates FormtablerValidationStates
}
// FormtablerComponentsPage is the page-specific struct for the combined demo
// showing alerts, toasts, and breadcrumbs.
type FormtablerComponentsPage struct {
Alerts []FormtablerAlert
Breadcrumbs []FormtablerBreadcrumb
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
}
// AdminUserRow represents a single user in the admin users list.
type AdminUserRow struct {
Name string
Email string
Status string // "Active", "Inactive", "Invited"
Roles string // comma-separated role names
EditLink string
}
// AdminUsersPage holds the data for the admin users page.
type AdminUsersPage struct {
Users []AdminUserRow
AddLink string
}
// AdminCustomersPage holds the data for the admin customers listing page.
type AdminCustomersPage struct {
Customers []CustomerTableRow
}
// AuthLockPageData holds the data for the account lock page.
type AuthLockPageData struct {
PersonName string
}
// TablerPageData holds the common data for all tabler pages. // TablerPageData holds the common data for all tabler pages.
// It should NOT contain component-specific fields like tables or forms. // It should NOT contain component-specific fields like tables or forms.
// Add those by creating a page-specific struct that embeds TablerPageData // Add those by creating a page-specific struct that embeds TablerPageData

View file

@ -61,14 +61,21 @@ func registerRoutes() {
controller.Get("/appsession", controllers.AppSession) controller.Get("/appsession", controllers.AppSession)
controller.Post("/appsession", controllers.AppSession) controller.Post("/appsession", controllers.AppSession)
// Tabler layout routes
controller.Get("/demotabler1", controllers.TablerDemo1) controller.Get("/demotabler1", controllers.TablerDemo1)
controller.Get("/tablertable", controllers.TablerTables)
// Tabler layout routes controller.Get("/tablerformelements", controllers.TablerFormElements)
controller.Get("/tablercards", controllers.TablerCards)
controller.Get("/tablercomponents", controllers.TablerComponents)
controller.Get("/tablersingle", controllers.TablerSingle) controller.Get("/tablersingle", controllers.TablerSingle)
controller.Get("/tablerdefault", controllers.TablerDefault) controller.Get("/tablerdefault", controllers.TablerDefault)
controller.Get("/tablerhome", controllers.TablerHome) controller.Get("/tablerhome", controllers.TablerHome)
controller.Get("/tablernavmenu", controllers.TablerNavbar) controller.Get("/tablernavmenu", controllers.TablerNavbar)
// Tabler layout routes
controller.Get("/user/login", controllers.UserSignIn) controller.Get("/user/login", controllers.UserSignIn)
controller.Post("/user/login", controllers.UserSignIn) controller.Post("/user/login", controllers.UserSignIn)
controller.Get("/user/signup", controllers.UserSignUp) controller.Get("/user/signup", controllers.UserSignUp)
@ -85,9 +92,6 @@ func registerRoutes() {
controller.Get("/admin/customers", controllers.AdminCustomers) controller.Get("/admin/customers", controllers.AdminCustomers)
controller.Post("/admin/customers", controllers.AdminCustomers) controller.Post("/admin/customers", controllers.AdminCustomers)
controller.Get("/tablertable", controllers.TablerTables)
controller.Get("/tablerformelements", controllers.TablerFormElements)
controller.Get("/tablercards", controllers.TablerCards)
controller.Get("/tablercomponents", controllers.TablerComponents)
} }