shell

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

templ: version: v0.3.977

templ: version: v0.3.977

templ: version: v0.3.977

templ: version: v0.3.977

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthRedirectScript added in v0.10.0

func AuthRedirectScript() templ.Component

AuthRedirectScript handles HTMX 401 responses by reading the HX-Redirect header and performing a full-page redirect to the login page.

func BreadcrumbsNav(crumbs []Breadcrumb, basePath string) templ.Component

BreadcrumbsNav renders a breadcrumb navigation trail.

func ConnectionIndicator added in v1.0.0

func ConnectionIndicator() templ.Component

ConnectionIndicator shows SSE connection status.

func DashboardStoreScript

func DashboardStoreScript(basePath string) templ.Component

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

func HTMXConfigScript() templ.Component

HTMXConfigScript configures HTMX behavior for the dashboard.

func HTMXScript

func HTMXScript() templ.Component

HTMXScript returns the HTMX CDN script tag.

func HelperScripts

func HelperScripts() templ.Component

HelperScripts provides utility JavaScript functions used throughout the dashboard.

func NotificationBell added in v1.0.0

func NotificationBell(basePath string) templ.Component

NotificationBell renders the notification bell with unread count.

func SanitizeAlpineKey

func SanitizeAlpineKey(name string) string

SanitizeAlpineKey converts a group name to a valid Alpine.js variable name.

func SearchTrigger added in v1.0.0

func SearchTrigger() templ.Component

SearchTrigger renders the Cmd+K search button placeholder.

func ThemeToggle added in v1.0.0

func ThemeToggle() templ.Component

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 struct {
	Label string
	Path  string // empty = current page (no link)
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL