template

package
v0.9.20251226 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type C

type C interface {
}

C is the empty interface used for allowing the different page type structures (contexts) to use the same page generation function

type T

type T struct {
	// contains filtered or unexported fields
}

T contains the tempate snippets that get concatenated to create the page template

func (*T) AddPageFooter

func (t *T) AddPageFooter(i int, md *m.MetaData)

AddPageFooter adds the final snippet for generating the end of the page to create

func (*T) AddPageHeader

func (t *T) AddPageHeader(i int, md *m.MetaData)

AddPageHeader adds the initial snippet for the page to create (HTML head plus navigation menu bar)

func (*T) AddSectionHeader

func (t *T) AddSectionHeader(s string)

AddSectionHeader adds a section header for pages with multiple sections

func (*T) AddSnippet

func (t *T) AddSnippet(s string)

AddSnippet add a template snippet to the template source accumulator

func (*T) AddTableColumns

func (t *T) AddTableColumns(tabType string)

AddTableColumns adds the snippet for the columns list for a table page (displayed columns depend on table type: table, view, etc.)

func (*T) AddTableHead

func (t *T) AddTableHead(tabType string)

AddTableHead adds the snippet for a table report header (based on the table type)

func (*T) RenderPage

func (t *T) RenderPage(dirName, fileName string, context C, minify bool) error

RenderPage takes the supplied view context and renders/writes the html file

Jump to

Keyboard shortcuts

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