Export xsl into seperate file via embedding

This commit is contained in:
Simon Martens
2024-12-28 10:53:17 +01:00
parent 58df7cc1cb
commit 579ce63ee2
8 changed files with 152 additions and 73 deletions

View File

@@ -9,6 +9,7 @@ import (
"github.com/Theodor-Springmann-Stiftung/kgpz_web/app"
"github.com/Theodor-Springmann-Stiftung/kgpz_web/functions"
"github.com/Theodor-Springmann-Stiftung/kgpz_web/views"
"github.com/gofiber/fiber/v2"
)
@@ -50,6 +51,8 @@ func (e *Engine) Funcs(app *app.KGPZ) error {
e.AddFunc("Lower", strings.ToLower)
e.AddFunc("Safe", functions.Safe)
e.AddFunc("EmbedSafe", functions.EmbedSafe(views.StaticFS))
// App specific
e.AddFunc("GetAgent", app.Library.Agents.Item)
e.AddFunc("GetPlace", app.Library.Places.Item)