aboutsummaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorjan <jan@ruken.pw>2015-12-29 22:13:09 (UTC)
committerjan <jan@ruken.pw>2015-12-29 22:13:09 (UTC)
commit10f014d5da7f1a35d2fc6cf0aa617a5ec4bb074f (patch)
treef0cff6de142552fa95e5f011ccb401fb89d40711 /frontend
parent365bd4578a0c9b2e4ae5938d280609bd9af37faf (diff)
UI für die simple pagination. 'add' und 'sub' template-funktionen hinzugefügt.
Diffstat (limited to 'frontend')
-rw-r--r--frontend/renderer.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/frontend/renderer.go b/frontend/renderer.go
index a3aa83d..524c2c8 100644
--- a/frontend/renderer.go
+++ b/frontend/renderer.go
@@ -47,9 +47,16 @@ func New(path string) *Renderer {
47 "html": func(in string) template.HTML { 47 "html": func(in string) template.HTML {
48 return template.HTML(in) 48 return template.HTML(in)
49 }, 49 },
50 "add": func(a, b int) int {
51 return a + b
52 },
53 "sub": func(a, b int) int {
54 return a - b
55 },
50 } 56 }
57
51 r := &Renderer{ 58 r := &Renderer{
52 template.Must(template.ParseGlob(path + "/*")).Funcs(funcMap), 59 template.Must(template.New("").Funcs(funcMap).ParseGlob(path + "/*")),
53 make(map[string]interface{}), 60 make(map[string]interface{}),
54 } 61 }
55 62