Documentation
¶
Overview ¶
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMenuDepthValue ¶ added in v1.7.2
Types ¶
type BaseAction ¶ added in v1.7.2
type BaseAction struct {
ClassName string
Show func(r *http.Request) bool
Text func(ctx context.Context) string
URL func(r *http.Request) string
}
type BaseItem ¶
type BaseSidePanel ¶ added in v1.7.2
type BaseSidePanel struct {
ID string
Ordering int
TemplateName string
Request *http.Request
PanelIcon string
PanelLabel func(ctx context.Context) string
Hidden func(p *BaseSidePanel, r *http.Request) bool
PanelMedia func(p *BaseSidePanel, r *http.Request) media.Media
Context func(p *BaseSidePanel, r *http.Request, c ctx.Context) ctx.Context
}
func (*BaseSidePanel) Content ¶ added in v1.7.2
func (p *BaseSidePanel) Content() templ.Component
func (*BaseSidePanel) Icon ¶ added in v1.7.2
func (p *BaseSidePanel) Icon() templ.Component
func (*BaseSidePanel) IsShown ¶ added in v1.7.2
func (p *BaseSidePanel) IsShown() bool
func (*BaseSidePanel) Label ¶ added in v1.7.2
func (p *BaseSidePanel) Label() string
func (*BaseSidePanel) Media ¶ added in v1.7.2
func (p *BaseSidePanel) Media() media.Media
func (*BaseSidePanel) Name ¶ added in v1.7.2
func (p *BaseSidePanel) Name() string
func (*BaseSidePanel) Order ¶ added in v1.7.2
func (p *BaseSidePanel) Order() int
type DropdownItem ¶ added in v1.7.2
type DropdownItem SubmenuItem
func (*DropdownItem) Component ¶ added in v1.7.2
func (s *DropdownItem) Component() templ.Component
func (*DropdownItem) IsShown ¶ added in v1.7.2
func (d *DropdownItem) IsShown() bool
func (*DropdownItem) Name ¶ added in v1.7.2
func (d *DropdownItem) Name() string
func (*DropdownItem) Order ¶ added in v1.7.2
func (d *DropdownItem) Order() int
type MenuItem ¶
type MenuItem interface {
// Order is used to sort the menu items
//
// The menu items are sorted in ascending order
//
// I.E. The menu item with the lowest order will be displayed first
//
// If two menu items have the same order, they will remain in the order they were added
Order() int
// IsShown is used to determine if the menu item should be displayed
IsShown() bool
// Implement a method for the templ.Component interface
//
// We explicitly only render the menu with the templ generated code.
Component() templ.Component
// Name is used to identify the menu item
//
// The name should be unique
Name() string
}
type SidePanels ¶ added in v1.7.2
func (*SidePanels) Component ¶ added in v1.7.2
func (p *SidePanels) Component() templ.Component
func (*SidePanels) HasPanels ¶ added in v1.7.2
func (p *SidePanels) HasPanels() bool
type SubmenuItem ¶
type SubmenuItem struct {
}
func (*SubmenuItem) Component ¶
func (s *SubmenuItem) Component() templ.Component
func (*SubmenuItem) IsShown ¶
func (s *SubmenuItem) IsShown() bool
Click to show internal directories.
Click to hide internal directories.