Files
fnx_web/webcontroller/templates/funcs.go

27 lines
403 B
Go
Raw Normal View History

2017-11-10 12:39:55 +01:00
package templates
import (
"html/template"
"time"
"fornaxian.com/pixeldrain-web/conf"
)
var funcMap = template.FuncMap{
"bgPatternCount": bgPatternCount,
"debugMode": debugMode,
2017-12-17 23:34:49 +01:00
"apiUrl": apiURL,
2017-11-10 12:39:55 +01:00
}
func bgPatternCount() uint8 {
return uint8(time.Now().UnixNano() % 16)
}
func debugMode() bool {
return conf.DebugMode()
}
2017-12-17 23:34:49 +01:00
func apiURL() string {
return conf.ApiUrlExternal()
}