Documentation ¶
Index ¶
- Constants
- func New(tokz *token.Tokenizer) (*template.Template, error)
- type AdminInstance
- type AdminTags
- type Common
- func (t *Common) AddFooterExtraScript(s string)
- func (t *Common) AddFooterScript(s libtemplate.Script)
- func (t *Common) AddHeadLink(l libtemplate.HeadLink)
- func (t *Common) SetAccount(account *models.Account)
- func (t *Common) SetLanguage(l string)
- func (t *Common) SetLocalizer(l *language.Localizer)
- func (t *Common) SetNavbar(nodes libtemplate.Navbar)
- func (t *Common) SetNavbarDark(dark bool)
- type Error
- type Home
- type InitTemplate
- type Login
- func (t *Login) AddFooterExtraScript(s string)
- func (t *Login) AddFooterScript(s libtemplate.Script)
- func (t *Login) AddHeadLink(l libtemplate.HeadLink)
- func (t *Login) SetAccount(account *models.Account)
- func (t *Login) SetLanguage(l string)
- func (t *Login) SetLocalizer(l *language.Localizer)
- func (t *Login) SetNavbar(nodes libtemplate.Navbar)
- func (t *Login) SetNavbarDark(dark bool)
Constants ¶
const AdminInstanceName = "admin_instance"
AdminInstanceName is the name of the admin block list template.
const AdminTagsName = "admin_tags"
AdminTagsName is the name of the admin tags list template.
const ErrorName = "error"
ErrorPageName is the name of the error template.
const HomeName = "home"
HomeName is the name of the home template.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AdminInstance ¶
type AdminInstance struct { Common Instances []*models.Instance Pagination libtemplate.Pagination FormAddError *libtemplate.Alert FormAddAction libtemplate.FormInput FormAddDomain libtemplate.FormInput FormAddObfuscatedDomain libtemplate.FormInput FormAddForce libtemplate.FormInput }
AdminInstance contains the variables for the admin block list template.
type AdminTags ¶
type AdminTags struct { Common Tags []*models.Tag Pagination libtemplate.Pagination FormAddError *libtemplate.Alert FormAddAction libtemplate.FormInput FormAddName libtemplate.FormInput FormAddDescription libtemplate.FormTextarea }
AdminTags contains the variables for the admin tags list template.
type Common ¶
type Common struct { Language string Localizer *language.Localizer Account *models.Account Alerts *[]libtemplate.Alert HeadLinks []libtemplate.HeadLink PageTitle string }
Common contains the variables used in nearly every template.
func (*Common) AddFooterExtraScript ¶
AddFooterExtraScript adds a footer script to the template.
func (*Common) AddFooterScript ¶
func (t *Common) AddFooterScript(s libtemplate.Script)
AddFooterScript adds a footer script to the template.
func (*Common) AddHeadLink ¶
func (t *Common) AddHeadLink(l libtemplate.HeadLink)
AddHeadLink adds a headder link to the template.
func (*Common) SetAccount ¶
SetAccount sets the currently logged-in account.
func (*Common) SetLanguage ¶
SetLanguage sets the template's default language.
func (*Common) SetLocalizer ¶
SetLocalizer sets the localizer the template will use to generate text.
func (*Common) SetNavbar ¶
func (t *Common) SetNavbar(nodes libtemplate.Navbar)
SetNavbar sets the top level navbar used by the template.
func (*Common) SetNavbarDark ¶
SetNavbarDark sets the navbar theme.
type Error ¶
type Error struct { Common Header string Image string SubHeader string Paragraph string ButtonHRef string ButtonLabel string }
Error contains the variables for the error template.
type InitTemplate ¶
type InitTemplate interface { AddHeadLink(l libtemplate.HeadLink) SetAccount(account *models.Account) SetLanguage(l string) SetLocalizer(l *language.Localizer) }
InitTemplate are the functions a template implementing Common will have.
type Login ¶
type Login struct {
libtemplate.Login
}
func (*Login) AddFooterExtraScript ¶
AddFooterExtraScript adds a footer script to the template.
func (*Login) AddFooterScript ¶
func (t *Login) AddFooterScript(s libtemplate.Script)
AddFooterScript adds a footer script to the template.
func (*Login) AddHeadLink ¶
func (t *Login) AddHeadLink(l libtemplate.HeadLink)
AddHeadLink adds a headder link to the template.
func (*Login) SetAccount ¶
SetAccount sets the currently logged-in account.
func (*Login) SetLanguage ¶
SetLanguage sets the template's default language.
func (*Login) SetLocalizer ¶
SetLocalizer sets the localizer the template will use to generate text.
func (*Login) SetNavbar ¶
func (t *Login) SetNavbar(nodes libtemplate.Navbar)
SetNavbar sets the top level navbar used by the template.
func (*Login) SetNavbarDark ¶
SetNavbarDark sets the navbar theme.