feat: improve real-time chart example; add small refinements to via core files

This commit is contained in:
Joao Goncalves
2025-11-07 00:44:48 -01:00
parent c167f0c74f
commit 798f024743
7 changed files with 63 additions and 20 deletions

2
via.go
View File

@@ -106,7 +106,7 @@ func (v *via) Page(route string, composeContext func(c *Context)) {
headElements := v.cfg.DocumentHeadIncludes
headElements = append(headElements, h.Meta(h.Data("signals", fmt.Sprintf("{'via-ctx':'%s'}", id))))
headElements = append(headElements, h.Meta(h.Data("init", "@get('/_sse')")))
bottomBodyElements := []h.H{h.Div(h.ID(c.id), c.view())}
bottomBodyElements := []h.H{c.view()}
for _, el := range v.cfg.DocumentBodyIncludes {
bottomBodyElements = append(bottomBodyElements, el)
}