From 80ae1c4f91f89a2ffa3b4abc30ff8a5655130e10 Mon Sep 17 00:00:00 2001 From: JACS Date: Sun, 10 May 2026 19:00:58 -0500 Subject: [PATCH] sync --- controllers/tablerdemo.go | 84 ++++++++++++++++++++++++++++++++++++++ controllers/tablertypes.go | 82 ------------------------------------- routes.go | 44 +++++++++++--------- 3 files changed, 108 insertions(+), 102 deletions(-) create mode 100644 controllers/tablerdemo.go diff --git a/controllers/tablerdemo.go b/controllers/tablerdemo.go new file mode 100644 index 0000000..14055dc --- /dev/null +++ b/controllers/tablerdemo.go @@ -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 +} diff --git a/controllers/tablertypes.go b/controllers/tablertypes.go index 4d30c13..6608853 100644 --- a/controllers/tablertypes.go +++ b/controllers/tablertypes.go @@ -443,88 +443,6 @@ type FormtablerCard struct { 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. // It should NOT contain component-specific fields like tables or forms. // Add those by creating a page-specific struct that embeds TablerPageData diff --git a/routes.go b/routes.go index 6ddb391..276709a 100644 --- a/routes.go +++ b/routes.go @@ -61,33 +61,37 @@ func registerRoutes() { controller.Get("/appsession", controllers.AppSession) controller.Post("/appsession", controllers.AppSession) + // Tabler layout routes controller.Get("/demotabler1", controllers.TablerDemo1) - - // Tabler layout routes + controller.Get("/tablertable", controllers.TablerTables) + controller.Get("/tablerformelements", controllers.TablerFormElements) + controller.Get("/tablercards", controllers.TablerCards) + controller.Get("/tablercomponents", controllers.TablerComponents) controller.Get("/tablersingle", controllers.TablerSingle) controller.Get("/tablerdefault", controllers.TablerDefault) controller.Get("/tablerhome", controllers.TablerHome) controller.Get("/tablernavmenu", controllers.TablerNavbar) - controller.Get("/user/login", controllers.UserSignIn) - controller.Post("/user/login", controllers.UserSignIn) - controller.Get("/user/signup", controllers.UserSignUp) - controller.Post("/user/signup", controllers.UserSignUp) - controller.Get("/user/forgot", controllers.UserForgot) - controller.Post("/user/forgot", controllers.UserForgot) - controller.Get("/user/lock", controllers.UserLock) - controller.Post("/user/lock", controllers.UserLock) - controller.Get("/user/settings", controllers.UserSettings) - controller.Post("/user/settings", controllers.UserSettings) - controller.Get("/admin/users", controllers.AdminUsers) - controller.Post("/admin/users", controllers.AdminUsers) - controller.Get("/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) + // Tabler layout routes + + controller.Get("/user/login", controllers.UserSignIn) + controller.Post("/user/login", controllers.UserSignIn) + controller.Get("/user/signup", controllers.UserSignUp) + controller.Post("/user/signup", controllers.UserSignUp) + controller.Get("/user/forgot", controllers.UserForgot) + controller.Post("/user/forgot", controllers.UserForgot) + controller.Get("/user/lock", controllers.UserLock) + controller.Post("/user/lock", controllers.UserLock) + controller.Get("/user/settings", controllers.UserSettings) + controller.Post("/user/settings", controllers.UserSettings) + + controller.Get("/admin/users", controllers.AdminUsers) + controller.Post("/admin/users", controllers.AdminUsers) + controller.Get("/admin/customers", controllers.AdminCustomers) + controller.Post("/admin/customers", controllers.AdminCustomers) + + }