This commit is contained in:
JACS 2026-05-02 23:24:26 -05:00
parent cc0c524337
commit f03b933359
551 changed files with 1230 additions and 0 deletions

View file

@ -69,6 +69,32 @@ func TablerNavbar(c *core.Context) *core.Response {
return c.Response.Template("tabler_default.html", data)
}
// TablerFormElements renders a page with all 25 formtabler form components.
// Uses the composition pattern: embeds TablerPageData and adds
// a FormElements field containing all form component data.
func TablerFormElements(c *core.Context) *core.Response {
type formelementsPageData struct {
TablerPageData
FormElements FormtablerFormElementsPage
}
data := formelementsPageData{
TablerPageData: TablerPageData{
PageTitle: "Form Elements",
PageDescription: "Form element demo page",
ShowTopbar: true,
Sidebar: false,
PageHeader: "Form Elements",
PagePretitle: "Components",
UserName: "Jane Doe",
UserRole: "Administrator",
NavbarMenu: SampleNavbarMenu(),
Content: template.HTML(""),
},
FormElements: SampleFormElements(),
}
return c.Response.Template("tabler_formelements.html", data)
}
// TablerTables renders a page with table components.
// Uses a page-specific struct that embeds TablerPageData and adds the Tables field.
// The template detects tables via hasField and renders them.