stemplate

package
v0.0.0-...-43e1acc Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FuncMap = template.FuncMap{
	"Downcase":                downcase,
	"Favicon":                 favicon,
	"FormatTimeLocal":         formatTimeLocal,
	"FormatTimeWithMinute":    formatTimeWithMinute,
	"FormatTimeYearMonth":     formatTimeYearMonth,
	"InKM":                    inKM,
	"LazyRetinaImage":         lazyRetinaImage,
	"LazyRetinaImageLightbox": lazyRetinaImageLightbox,
	"Mod":                     mod,
	"MonthName":               monthName,
	"NanoglyphSignup":         nanoglyphSignup,
	"NumberWithDelimiter":     numberWithDelimiter,
	"Pace":                    pace,
	"RandIntn":                randIntn,
	"RenderPublishingInfo":    renderPublishingInfo,
	"RetinaImageAlt":          RetinaImageAlt,
	"Sub":                     sub,
	"ToStars":                 toStars,
	"TimeInLocal":             timeInLocal,
	"URLBaseExt":              urlBaseExt,
	"URLBaseFile":             urlBaseFile,
}

FuncMap is a set of helper functions to make available in templates for the project.

View Source
var LocalLocation *time.Location

LocalLocation is the location to show times in which use FormatTimeLocal.

Functions

func RetinaImageAlt

func RetinaImageAlt(src, alt string) template.HTML

RetinaImageAlt is a shortcut for creating an image with `mtemplate.ImgAndAlt` and rendering it with `mteplate.RenderHTML`. This is mostly for backwards compatibility as the interface was changed around a bit.

Types

This section is empty.

Jump to

Keyboard shortcuts

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