Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Dummy struct{}
Dummy can be referenced in vugu files to prevent go from causing errors due to not used imports.
Use it like this:
_ = navigation.Dummy
Functions ¶
This section is empty.
Types ¶
type ButtonFullscreen ¶
type PageInfo ¶
type PageInfo struct { Path string // URL path. Title string // Title that can be defined by the page component. LongTitle string ShortTitle string MetaDescription string // Meta description tag that can be defined by the page component. }
PageInfo represents the path of a route. This is used by navigation components.
type PageInfoRef ¶
type PageInfoRef struct {
*PageInfo
}
func (*PageInfoRef) PageInfoSet ¶
func (p *PageInfoRef) PageInfoSet(pageInfo *PageInfo)
type PageInfoSetter ¶
type PageInfoSetter interface {
PageInfoSet(*PageInfo)
}
type PageMetaGetter ¶
type PageMetaGetter interface {
PageMetaDescription() (metaDescription string)
}
Can be implemented by page components to define their meta description.
type PageTitleGetter ¶
type PageTitleGetter interface {
PageTitle() (title, longTitle, shortTitle string)
}
Can be implemented by page components to define their page title.
type PaginateEvent ¶
type PaginateEvent struct { vugu.DOMEvent PaginationInfo // The current state of the pagination component. }
type PaginateFunc ¶
type PaginateFunc func(event PaginateEvent)
PaginateFunc implements PaginateHandler as a function.
func (PaginateFunc) PaginateHandle ¶
func (f PaginateFunc) PaginateHandle(event PaginateEvent)
PaginateHandle implements the PaginateHandler interface.
type PaginateHandler ¶
type PaginateHandler interface {
PaginateHandle(event PaginateEvent)
}
PaginationHandler is the interface for things that can handle PaginationEvent.
type Pagination ¶
type Pagination struct { AttrMap vugu.AttrMap Bind PaginationBinder Paginate PaginateHandler // External handler that is called upon an event. // contains filtered or unexported fields }
func (*Pagination) Compute ¶
func (c *Pagination) Compute(ctx vugu.ComputeCtx)
func (*Pagination) Page ¶
func (c *Pagination) Page() int
Page returns the currently selected page as a 1-based index. A result of 0 means there is no selected page.
func (*Pagination) Pages ¶
func (c *Pagination) Pages() int
Pages returns the total page number that this pagination component shows.
type PaginationBinder ¶
type PaginationBinder interface { PaginationPage() int // Page returns the current page, as a 1-based index. A value of 0 means there is no active page. PaginationPages() int // Pages returns the total number of pages. SetPaginationPage(page int) // SetPage changes the current page as a 1-based index. A value of 0 means there is no active page. }
PaginationBinder is an interface that everything that every type that wants to bind to a pagination component must implement.
type PaginationInfo ¶
type PaginationInfo struct { Page int // The current page as a 1-based index. A value of 0 means there is no current page. Pages int // The number of total pages. }
PaginationInfo implements the PaginationBinder interface and represents the current state of a pagination component.
func (*PaginationInfo) PaginationPage ¶
func (p *PaginationInfo) PaginationPage() int
func (*PaginationInfo) PaginationPages ¶
func (p *PaginationInfo) PaginationPages() int
func (*PaginationInfo) SetPaginationPage ¶
func (p *PaginationInfo) SetPaginationPage(page int)
type Sidebar ¶
type Sidebar struct { AttrMap vugu.AttrMap MenuEntries vugu.Builder `vugu:"data"` // Menu content at the top. Either embedded into the sidebar or at the top edge. Entries vugu.Builder `vugu:"data"` // Main content of the sidebar. BottomEntries vugu.Builder `vugu:"data"` // Static bottom part of the sidebar. Body vugu.Builder `vugu:"data"` // The body contains the content that is right to or behind the sidebar. Minimized bool `vugu:"data"` // If true, the sidebar is reduced to icons. // contains filtered or unexported fields }
func (*Sidebar) Compute ¶
func (c *Sidebar) Compute(ctx vugu.ComputeCtx)
type SidebarEntry ¶
type SidebarEntry struct { PageInfoRef AttrMap vugu.AttrMap IconSlot vugu.Builder `vugu:"data"` // Slot for the symbol. DefaultSlot vugu.Builder `vugu:"data"` // Slot for the text and other stuff. Should be a div element! URL string `vugu:"data"` // contains filtered or unexported fields }
func (*SidebarEntry) Build ¶
func (c *SidebarEntry) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut)
func (*SidebarEntry) Compute ¶
func (c *SidebarEntry) Compute(ctx vugu.ComputeCtx)