html

package
v0.0.0-...-7693fda Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Defaults

type Defaults struct {
	FgBlack   template.HTML
	FgRed     template.HTML
	FgGreen   template.HTML
	FgYellow  template.HTML
	FgBlue    template.HTML
	FgMagenta template.HTML
	FgCyan    template.HTML
	FgWhite   template.HTML
	End       template.HTML
	Separator struct {
		Single template.HTML
		Double template.HTML
	}
}

type TemplateSet

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

func (*TemplateSet) Read

func (t *TemplateSet) Read(dir string) error

Read attempts to read recognized templates from within the given directory. Missing template files will be substituted with the defaults.

func (*TemplateSet) UseDefaults

func (t *TemplateSet) UseDefaults()

UseDefaults resets the template set to its defaults.

type Writer

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

func NewWriter

func NewWriter(r *http.Request, w http.ResponseWriter, ts TemplateSet) *Writer

func (*Writer) WriteBoard

func (w *Writer) WriteBoard(board tchan.BoardOverview) error

func (*Writer) WriteError

func (w *Writer) WriteError(status int, err error) error

func (*Writer) WriteThread

func (w *Writer) WriteThread(thread tchan.Thread) error

func (*Writer) WriteWelcome

func (w *Writer) WriteWelcome(boards []tchan.Board) error

Jump to

Keyboard shortcuts

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