add commands to the front end; inject json user data; close #24

This commit is contained in:
Henrique Dias
2016-08-21 20:44:28 +01:00
parent 408fa2e86f
commit 7c3a55c386
3 changed files with 24 additions and 15 deletions

View File

@@ -80,6 +80,10 @@ func (p Page) PrintAsHTML(w http.ResponseWriter, templates ...string) (int, erro
"CSS": func(s string) template.CSS {
return template.CSS(s)
},
"Marshal": func(v interface{}) template.JS {
a, _ := json.Marshal(v)
return template.JS(a)
},
}
if p.Minimal {