Move template vars

This commit is contained in:
Svilen Markov
2024-11-29 20:45:33 +00:00
parent 6886716e67
commit 03035d1a2d
3 changed files with 8 additions and 8 deletions

View File

@@ -11,11 +11,7 @@ import (
"golang.org/x/text/message"
)
var (
pageTemplate = mustParseTemplate("page.html", "document.html")
pageContentTemplate = mustParseTemplate("page-content.html")
forumPostsTemplate = mustParseTemplate("forum-posts.html", "widget-base.html")
)
var intl = message.NewPrinter(language.English)
var globalTemplateFunctions = template.FuncMap{
"formatViewerCount": formatViewerCount,
@@ -43,8 +39,6 @@ func mustParseTemplate(primary string, dependencies ...string) *template.Templat
return t
}
var intl = message.NewPrinter(language.English)
func formatViewerCount(count int) string {
if count < 1_000 {
return strconv.Itoa(count)