templates

package
v4.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2017 License: AGPL-3.0, AGPL-3.0-or-later Imports: 18 Imported by: 0

Documentation

Overview

Package templates generates and stores HTML templates

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Board

func Board(
	b, theme string,
	page, total int,
	pos auth.ModerationLevel,
	minimal, catalog bool,
	threadHTML []byte,
) []byte

Board renders board page HTML for noscript browsers. withIndex specifies, if the rendered board page should be embedded in the index page

func CalculateOmit

func CalculateOmit(t common.Thread) (int, int)

CalculateOmit returns the omitted post and image counts for a thread

func ChangePassword

func ChangePassword() string

ChangePassword renders a form for changing an account's password

func Compile

func Compile() error

Injects dynamic variables, hashes and stores compiled templates

func ConfigureBoard

func ConfigureBoard(conf config.BoardConfigs) string

ConfigureBoard renders a form for setting board configurations

func ConfigureServer

func ConfigureServer(conf config.Configs) string

ConfigureServer renders the form for changing server configurations

func StaffAssignment

func StaffAssignment(staff [3][]string) string

StaffAssignment renders a staff assignment form with the current staff already filled in

func Thread

func Thread(
	id uint64,
	board, title, theme string,
	abbrev bool,
	pos auth.ModerationLevel,
	postHTML []byte,
) []byte

Thread renders thread page HTML for noscript browsers

Types

This section is empty.

Jump to

Keyboard shortcuts

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