templates

package
v3.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2016 License: AGPL-3.0, AGPL-3.0-or-later Imports: 17 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 string,
	ln lang.Pack,
	withIndex bool,
	threadHTML []byte,
) ([]byte, error)

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

func BoardNavigation

func BoardNavigation(lang map[string]string) string

func CalculateOmit

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

CalculateOmit returns the omitted post and image counts for a thread

func CatalogThreads

func CatalogThreads(b common.Board) string

func ChangePassword

func ChangePassword(ln lang.Pack) string

ChangePassword renders a form for changing an account's password

func Compile

func Compile() error

Compile reads template HTML from disk, injects dynamic variables, hashes and stores them

func ConfigureBoard

func ConfigureBoard(conf config.BoardConfigs, ln lang.Pack) string

ConfigureBoard renders a form for setting board configurations

func ConfigureServer

func ConfigureServer(conf config.Configs, ln lang.Pack) string

ConfigureServer renders the form for changing server configurations

func CreateBoard

func CreateBoard(ln lang.Pack) string

func OwnedBoard

func OwnedBoard(boards config.BoardTitles, lang map[string]string) string

func StreamBoardNavigation

func StreamBoardNavigation(qw422016 *qt422016.Writer, lang map[string]string)

func StreamCatalogThreads

func StreamCatalogThreads(qw422016 *qt422016.Writer, b common.Board)

func StreamCreateBoard

func StreamCreateBoard(qw422016 *qt422016.Writer, ln lang.Pack)

func StreamOwnedBoard

func StreamOwnedBoard(qw422016 *qt422016.Writer, boards config.BoardTitles, lang map[string]string)

func StreamThreadPosts

func StreamThreadPosts(qw422016 *qt422016.Writer, t common.Thread, json []byte, omit, imageOmit int)

func Thread

func Thread(ln lang.Pack, withIndex bool, postHTML []byte) ([]byte, error)

Thread renders thread page HTML for noscript browsers

func ThreadPosts

func ThreadPosts(t common.Thread, json []byte, omit, imageOmit int) string

func WriteBoardNavigation

func WriteBoardNavigation(qq422016 qtio422016.Writer, lang map[string]string)

func WriteCatalogThreads

func WriteCatalogThreads(qq422016 qtio422016.Writer, b common.Board)

func WriteCreateBoard

func WriteCreateBoard(qq422016 qtio422016.Writer, ln lang.Pack)

func WriteOwnedBoard

func WriteOwnedBoard(qq422016 qtio422016.Writer, boards config.BoardTitles, lang map[string]string)

func WriteThreadPosts

func WriteThreadPosts(qq422016 qtio422016.Writer, t common.Thread, json []byte, omit, imageOmit int)

Types

This section is empty.

Jump to

Keyboard shortcuts

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