theme

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: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultCacheControl = "public, max-age=604800, no-transform, immutable"
)
View Source
var (
	SemanticStylesOrder = []string{
		"color",
		"overlay",
		"primary",
		"secondary",
		"accent",
		"highlight",
		"alternate",
		"style",
		"desktop",
		"mobile",
		"page",
		"z",
		"fa",
		"fa-solid",
		"fa-regular",
		"fa-brands",
		"icon",
		"theme",
	}
)

Functions

func New

func New(origin, path string, themeFs, staticFs fs.FileSystem, autoload bool) (ft feature.Theme, err error)

Types

type CTheme

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

func (*CTheme) AddFormatProvider

func (t *CTheme) AddFormatProvider(providers ...feature.PageFormatProvider)

func (*CTheme) FindLayout

func (t *CTheme) FindLayout(named string) (layout feature.ThemeLayout, name string, ok bool)

func (*CTheme) GetBlockThemeNames

func (t *CTheme) GetBlockThemeNames() (names []string)

func (*CTheme) GetConfig

func (t *CTheme) GetConfig() (config *feature.ThemeConfig)

func (*CTheme) GetFormat

func (t *CTheme) GetFormat(name string) (format feature.PageFormat)

func (*CTheme) GetParent

func (t *CTheme) GetParent() (parent feature.Theme)

func (*CTheme) Layouts

func (t *CTheme) Layouts() feature.ThemeLayouts

func (*CTheme) ListArchetypes added in v0.5.0

func (t *CTheme) ListArchetypes() (names []string)

func (*CTheme) ListFormats

func (t *CTheme) ListFormats() (names []string)

func (*CTheme) Locales

func (t *CTheme) Locales() (locales fs.FileSystem, ok bool)

func (*CTheme) MakeArchetype added in v0.5.0

func (t *CTheme) MakeArchetype(enjin feature.Internals, name string) (format string, data []byte, err error)

func (*CTheme) MatchFormat

func (t *CTheme) MatchFormat(filename string) (format feature.PageFormat, match string)

func (*CTheme) Middleware

func (t *CTheme) Middleware(next http.Handler) http.Handler

func (*CTheme) Name

func (t *CTheme) Name() string

func (*CTheme) NewHtmlTemplate

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

func (*CTheme) NewTextTemplate

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

func (*CTheme) ReadStaticFile added in v0.5.0

func (t *CTheme) ReadStaticFile(path string) (data []byte, mime string, err error)

func (*CTheme) StaticFS

func (t *CTheme) StaticFS() fs.FileSystem

func (*CTheme) ThemeFS

func (t *CTheme) ThemeFS() fs.FileSystem

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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