templating

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package templating provides functionality related to html templates

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteTemplate

func ExecuteTemplate(w io.Writer, name string, data interface{}) error

ExecuteTemplate calls ExecuteTemplate with the given arguments on the loaded templates.

func GenerateFooter

func GenerateFooter()

GenerateFooter generates the html footer. Must be called before the footer is used, i.e. before any call to GetFooter.

func GenerateNavBar

func GenerateNavBar()

GenerateNavBar generates the navigation bar. Must be called before the navigation bar is used, i.e. before any call to GetNavBar.

func GetFooter

func GetFooter() *string

GetFooter returns the html string of the footer.

func GetNavBar

func GetNavBar() *string

GetNavBar returns the html string of the navigation bar.

func Load

func Load(r *mux.Router)

Load loads all html templates. It has to be called before using the templates, i.e. before calling ExecuteTemplate.

func LoadTemplates

func LoadTemplates(fs fs.FS, pattern string) (*template.Template, error)

LoadTemplates loads templates with the given pattern from a filesystem fs.FS

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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