Documentation
¶
Overview ¶
templ: version: v0.3.977
templ: version: v0.3.977
templ: version: v0.3.977
templ: version: v0.3.977
Index ¶
- func AuthRedirectScript() templ.Component
- func BreadcrumbsNav(crumbs []Breadcrumb, basePath string) templ.Component
- func ConnectionIndicator() templ.Component
- func DashboardStoreScript(basePath string) templ.Component
- func ForgeUISidebar(cfg SidebarConfig) templ.Component
- func HTMXConfigScript() templ.Component
- func HTMXScript() templ.Component
- func HelperScripts() templ.Component
- func NotificationBell(basePath string) templ.Component
- func SanitizeAlpineKey(name string) string
- func SearchTrigger() templ.Component
- func ThemeToggle() templ.Component
- func TopBarComponent(title string, breadcrumbs []Breadcrumb, basePath string) templ.Component
- type Breadcrumb
- type SidebarConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthRedirectScript ¶ added in v0.10.0
AuthRedirectScript handles HTMX 401 responses by reading the HX-Redirect header and performing a full-page redirect to the login page.
func BreadcrumbsNav ¶ added in v1.0.0
func BreadcrumbsNav(crumbs []Breadcrumb, basePath string) templ.Component
BreadcrumbsNav renders a breadcrumb navigation trail.
func ConnectionIndicator ¶ added in v1.0.0
ConnectionIndicator shows SSE connection status.
func DashboardStoreScript ¶
DashboardStoreScript initializes the Alpine.js store for dashboard state management.
func ForgeUISidebar ¶ added in v1.0.0
func ForgeUISidebar(cfg SidebarConfig) templ.Component
ForgeUISidebar builds a full forgeui sidebar from a SidebarConfig. Uses CollapsibleIcon mode (collapses to icon-only) with VariantFloating style, collapsible sub-menus for items with children, and an auth-aware user dropdown footer.
func HTMXConfigScript ¶
HTMXConfigScript configures HTMX behavior for the dashboard.
func HelperScripts ¶
HelperScripts provides utility JavaScript functions used throughout the dashboard.
func NotificationBell ¶ added in v1.0.0
NotificationBell renders the notification bell with unread count.
func SanitizeAlpineKey ¶
SanitizeAlpineKey converts a group name to a valid Alpine.js variable name.
func SearchTrigger ¶ added in v1.0.0
SearchTrigger renders the Cmd+K search button placeholder.
func ThemeToggle ¶ added in v1.0.0
ThemeToggle renders a dark/light mode toggle button.
func TopBarComponent ¶ added in v1.0.0
func TopBarComponent(title string, breadcrumbs []Breadcrumb, basePath string) templ.Component
TopBarComponent renders the top bar with breadcrumbs, search trigger, notifications, and theme toggle.
Types ¶
type Breadcrumb ¶
Breadcrumb represents a single breadcrumb navigation item.
type SidebarConfig ¶ added in v1.0.0
type SidebarConfig struct {
Groups []contributor.NavGroup
ActivePath string
BasePath string
// Auth-related fields for the sidebar footer user dropdown.
EnableAuth bool
User *dashauth.UserInfo
LogoutPath string // full path, e.g. "/dashboard/auth/logout"
}
SidebarConfig holds all data needed to render the dashboard sidebar.