pages

package
v0.0.0-...-4126366 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2022 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package pages contains embedded resources

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(tmpl *template.Template, w io.Writer, v interface{})

func ExecuteComponent

func ExecuteComponent(tmpl *template.Template, w io.Writer, name string, v interface{})

func MountStatic

func MountStatic() http.Handler

func NewTemplate

func NewTemplate(name string, funcMap template.FuncMap) *template.Template

Types

type RenderState

type RenderState struct {
	*stats.Database
	SiteName string
}

func (*RenderState) Template

func (s *RenderState) Template(name string, funcMap template.FuncMap) *Template

type Template

type Template struct {
	*template.Template
	*RenderState
}

func (*Template) AddComponent

func (s *Template) AddComponent(path string)

func (*Template) Execute

func (s *Template) Execute(w io.Writer, v interface{})

func (*Template) ExecuteComponent

func (s *Template) ExecuteComponent(w io.Writer, name string, v interface{})

func (*Template) HTMLComponentRenderer

func (s *Template) HTMLComponentRenderer(name string) func(interface{}) template.HTML

func (*Template) RenderHTML

func (s *Template) RenderHTML(v interface{}) template.HTML

func (*Template) RenderHTMLComponent

func (s *Template) RenderHTMLComponent(name string, v interface{}) template.HTML

func (*Template) RenderHandler

func (s *Template) RenderHandler(w http.ResponseWriter, r *http.Request)

RenderHandler renders into the writer as a handler. It renders with the receiver as the argument.

Directories

Path Synopsis
components
internal

Jump to

Keyboard shortcuts

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