mirror of
https://github.com/Xevion/glance.git
synced 2025-12-10 02:07:20 -06:00
Move template vars
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user