summaryrefslogtreecommitdiff
path: root/templ
diff options
context:
space:
mode:
Diffstat (limited to 'templ')
-rw-r--r--templ/template.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/templ/template.go b/templ/template.go
index f609bc4..9cefadc 100644
--- a/templ/template.go
+++ b/templ/template.go
@@ -7,7 +7,7 @@ import (
"os"
"sync"
- "github.com/Necoro/form"
+ "gosten/form"
)
//go:embed *.tpl
@@ -17,7 +17,6 @@ var templates = make(map[string]*template.Template)
var muTpl sync.RWMutex
var baseTpl *template.Template
-var formBuilder form.Builder
var isLive = sync.OnceValue(checkLive)
@@ -31,10 +30,9 @@ func checkLive() bool {
func loadBase(fs fs.FS) {
baseTpl = template.Must(template.New("base.tpl").
- Funcs(form.FuncMap()).
+ Funcs(form.ParsingFuncMap()).
ParseFS(fs, "base.tpl", "form.tpl", "navlinks.tpl", "content.tpl"))
- formBuilder = form.Builder{InputTemplate: baseTpl.Lookup("formItem")}
- baseTpl.Funcs(formBuilder.FuncMap())
+ baseTpl.Funcs(form.FuncMap(baseTpl.Lookup("formItem")))
}
func Lookup(name string) *template.Template {
e='2024-10-17 00:43:31 +0200'>2 daysHandle login routing at login pageRené 'Necoro' Neumann2-16/+22 2 daysRestructure and change to chi as muxing frameworkRené 'Necoro' Neumann9-140/+197