Documentation
¶
Overview ¶
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
Index ¶
- func ConfirmDialog(props ConfirmDialogProps) templ.Component
- func DialogHelpers() templ.Component
- func EmptyState(iconName string, title string, description string) templ.Component
- func FooterAPIDocsLink(href string) templ.Component
- func PageHeader(title string, count string, description string) templ.Component
- func PathRewriter(pagesBase string) templ.Component
- func PluginSections(sections []templ.Component) templ.Component
- func StatCard(iconName string, label string, value string, subtitle string) templ.Component
- type ConfirmDialogProps
- type PaginationMeta
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfirmDialog ¶
func ConfirmDialog(props ConfirmDialogProps) templ.Component
ConfirmDialog renders a reusable delete/action confirmation dialog.
func DialogHelpers ¶
DialogHelpers renders the ForgeUI dialog script and provides tuiOpenDialog / tuiCloseDialog helper functions. Safe to include multiple times — functions are always redefined (cheap), but event listeners are only attached once.
func EmptyState ¶
EmptyState renders a centered placeholder with a large muted icon, title, and description.
func FooterAPIDocsLink ¶
FooterAPIDocsLink renders an API Docs link for the sidebar footer.
func PageHeader ¶
PageHeader renders a reusable page header with title, count badge, description, and an actions slot.
func PathRewriter ¶
PathRewriter adds an HTMX configRequest interceptor that rewrites bare page paths (e.g. "/roles/detail") to fully-qualified dashboard extension paths (e.g. "/dashboard/ext/warden/pages/roles/detail").
It also handles htmx.ajax() calls that use partial paths like "/ext/warden/pages/..." by prepending the dashboard base path.
This component should wrap the outermost page content once.
func PluginSections ¶
PluginSections renders a list of plugin-contributed sections separated by horizontal rules. If sections is empty, nothing is rendered.
Types ¶
type ConfirmDialogProps ¶
type ConfirmDialogProps struct {
ID string
Title string
Description string
ConfirmLabel string
HxEndpoint string
HxMethod string // "delete" or "post"
}
ConfirmDialogProps holds the properties for a confirmation dialog.
type PaginationMeta ¶
PaginationMeta holds pagination metadata for list pages.
func NewPaginationMeta ¶
func NewPaginationMeta(total int64, limit, offset int) PaginationMeta
NewPaginationMeta creates pagination metadata from total count, limit, and offset.