layouts

package
v0.5.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLayout

func NewLayout(path string, efs beFs.FileSystem) (layout feature.ThemeLayout, err error)

Types

type Layout

type Layout struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Layout) Apply added in v0.5.0

func (l *Layout) Apply(other feature.ThemeLayout)

func (*Layout) ApplyHtmlTemplate

func (l *Layout) ApplyHtmlTemplate(enjin feature.Internals, tt *htmlTemplate.Template, ctx context.Context) (err error)

func (*Layout) ApplyTextTemplate

func (l *Layout) ApplyTextTemplate(enjin feature.Internals, tt *textTemplate.Template, ctx context.Context) (err error)

func (*Layout) CacheKeys added in v0.5.0

func (l *Layout) CacheKeys() (keys []string)

func (*Layout) CacheValue added in v0.5.0

func (l *Layout) CacheValue(key string) (value string)

func (*Layout) Name

func (l *Layout) Name() (name string)

func (*Layout) NewHtmlTemplate

func (l *Layout) NewHtmlTemplate(enjin feature.Internals, ctx context.Context) (tmpl *htmlTemplate.Template, err error)

func (*Layout) NewHtmlTemplateFrom

func (l *Layout) NewHtmlTemplateFrom(enjin feature.Internals, parent feature.ThemeLayout, ctx context.Context) (tmpl *htmlTemplate.Template, err error)

func (*Layout) NewTextTemplate

func (l *Layout) NewTextTemplate(enjin feature.Internals, ctx context.Context) (tmpl *textTemplate.Template, err error)

func (*Layout) NewTextTemplateFrom

func (l *Layout) NewTextTemplateFrom(enjin feature.Internals, parent feature.ThemeLayout, ctx context.Context) (tmpl *textTemplate.Template, err error)

type Layouts

type Layouts struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewLayouts

func NewLayouts(t feature.Theme) (layouts *Layouts, err error)

func (*Layouts) ApplyHtmlTemplates

func (l *Layouts) ApplyHtmlTemplates(enjin feature.Internals, tmpl *htmlTemplate.Template, ctx context.Context) (err error)

func (*Layouts) ApplyTextTemplates

func (l *Layouts) ApplyTextTemplates(enjin feature.Internals, tmpl *textTemplate.Template, ctx context.Context) (err error)

func (*Layouts) GetLayout

func (l *Layouts) GetLayout(name string) (layout feature.ThemeLayout)

func (*Layouts) ListLayouts added in v0.5.0

func (l *Layouts) ListLayouts() (names []string)

func (*Layouts) NewHtmlTemplate

func (l *Layouts) NewHtmlTemplate(enjin feature.Internals, name string, ctx context.Context) (tmpl *htmlTemplate.Template, err error)

func (*Layouts) NewTextTemplate

func (l *Layouts) NewTextTemplate(enjin feature.Internals, name string, ctx context.Context) (tmpl *textTemplate.Template, err error)

func (*Layouts) SetLayout

func (l *Layouts) SetLayout(name string, layout feature.ThemeLayout)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL