templates

package
v0.0.0-...-1a9902f Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 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

View Source
var GetPostModLog func(id uint64) (mLog []auth.ModLogEntry, err error)

GetPostModLog forwards db.GetPostModLog to avoid cyclic imports in cache

Functions

func Board

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

Board writes board HTML to w

func CalculateOmit

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

CalculateOmit returns the omitted post and image counts for a thread

func ChangePassword

func ChangePassword(w io.Writer)

ChangePassword renders a form for changing an account's password

func Compile

func Compile() error

Compile injects dynamic variables, hashes and stores compiled templates

func ConfigureBoard

func ConfigureBoard(w io.Writer, conf config.BoardConfigs)

ConfigureBoard renders a form for setting board configurations

func ConfigureServer

func ConfigureServer(w io.Writer, conf config.Configs)

ConfigureServer renders the form for changing server configurations

func Recompile

func Recompile() error

Recompile templates

func StaffAssignment

func StaffAssignment(w io.Writer, staff [3][]string)

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

func Thread

func Thread(w io.Writer, id uint64, board, title, theme string, abbrev,
	locked bool, pos common.ModerationLevel, postHTML []byte,
)

Thread writes thread page HTML

Types

This section is empty.

Jump to

Keyboard shortcuts

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