Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EchoError = server.EchoError
Functions ¶
func CtxWithSession ¶
Types ¶
type Branding ¶
type Branding struct {
Title string // app name in topbar + <title> suffix
Logo string // filename under <data-dir>/branding/, "" = text brand only
Favicon string // favicon filename under <data-dir>/branding/, "" = built-in default
Primary string // --brand-primary
Accent string // --brand-accent
Surface string // --surface-1 (page background)
SurfaceAlt string // --surface-2 (content background)
Text string // --text-1
// Dark-mode palette. Built-in defaults apply when colorsDark is omitted;
// brand primary/accent are shared across modes (not duplicated here).
SurfaceDark string // --surface-1 in dark
SurfaceAltDark string // --surface-2 in dark
TextDark string // --text-1 in dark
}
Branding holds the resolved branding values (defaults applied) used by both HTML templates and the templated CSS.
func LoadBranding ¶
LoadBranding applies any overrides in the given branding.json bytes onto the defaults. nil/empty input or a parse error yields the defaults unchanged.
type PageBuilder ¶
type PageBuilder struct {
// contains filtered or unexported fields
}
PageBuilder assembles the shared base.html page context (branding, nav, version, current user, csrf). It is the single place base page context is constructed, used by the web handlers as well as the auth providers' login pages (via the auth.PageContextBuilder interface).
func NewPageBuilder ¶
func NewPageBuilder(branding Branding) PageBuilder
NewPageBuilder returns a PageBuilder for the given branding.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.