Documentation
¶
Overview ¶
templ: version: v0.3.1070
templ: version: v0.3.1070
Package ui renders the admin's pages. The handlers fill these view structs; the templ components only lay them out.
Index ¶
- func Delete(p DeletePage) templ.Component
- func DeleteDialog(p DeletePage) templ.Component
- func FlashFragment(f *Flash) templ.Component
- func Form(p FormPage) templ.Component
- func FormFragment(p FormPage) templ.Component
- func History(p HistoryPage) templ.Component
- func Index(p IndexPage) templ.Component
- func List(p ListPage) templ.Component
- func ListFragment(p ListPage) templ.Component
- func Log(p LogPage) templ.Component
- func Login(p LoginPage) templ.Component
- func LoginError(text string) templ.Component
- func Logout(p LoginPage) templ.Component
- func Message(p MessagePage) templ.Component
- func Static() fs.FS
- type Cell
- type CellKind
- type Chrome
- type Crumb
- type DeleteObject
- type DeletePage
- type Filter
- type FilterOption
- type Flash
- type FormField
- type FormPage
- type HistoryPage
- type IndexPage
- type InlineList
- type InputKind
- type ListColumn
- type ListPage
- type ListRow
- type LogEntry
- type LogPage
- type LoginPage
- type MessagePage
- type NavGroup
- type NavModel
- type Option
- type PageLink
- type Pager
- type Param
- type Search
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
func Delete(p DeletePage) templ.Component
func DeleteDialog ¶
func DeleteDialog(p DeletePage) templ.Component
DeleteDialog is the same confirmation as a dialog over the page.
func FlashFragment ¶
Flash patches the message area alone.
func FormFragment ¶
FormFragment is the form alone, which a Datastar save patches with its errors. The id is on a wrapper: an input named after a column called id would shadow the form's own id property, and the patch would find no target.
func History ¶
func History(p HistoryPage) templ.Component
func ListFragment ¶
ListFragment is what a Datastar search, filter, sort or page patches: the filters the search form keeps, and the results with their sidebar.
func LoginError ¶
LoginError is the login form's message, patched alone after a failed Datastar sign-in.
func Message ¶
func Message(p MessagePage) templ.Component
MessagePage is a page that only says something: not found, forbidden.
Types ¶
type Cell ¶
type Cell struct {
Kind CellKind
Text string
Title string // the whole value, when Text is cut or formatted
Bool bool
Mono bool
Numeric bool
Href string // a link to a related row
Note string // the related row's name, beside its key
}
Cell is one value in a list or a read-only row.
type Chrome ¶
type Chrome struct {
SiteTitle string
Base string // BasePath, without the trailing slash
PageTitle string
User string // username, "" on the login page
LogoutURL string // "" when the Authenticator serves no logout
Active string // slug of the model the page is about
Crumbs []Crumb
Flash *Flash
}
Chrome is what every page around its content shows.
type DeleteObject ¶
type DeleteObject struct {
Label, URL string
}
type DeletePage ¶
type Filter ¶
type Filter struct {
Label string
Note string
Options []FilterOption
}
type FilterOption ¶
type HistoryPage ¶
type InlineList ¶
type ListColumn ¶
type ListPage ¶
type ListPage struct {
Chrome Chrome
Plural string
Label string
ListURL string
AddURL string
Search *Search
Hidden []Param // the filters and order the search form keeps
Columns []ListColumn
Rows []ListRow
Filters []Filter
Total int64
Pager Pager
CanDelete bool
ClearURL string // "" when nothing is filtered or searched
ResultLabel string
}