feat: replace Handler() method for HTTPServeMux() for better plugin and testing integration; remove via-plugin-picocss dependency from examples; add datastar h.H nodes for data-init, data-effect, and data-ignore-morph; update realtimechart example; other small improvements

This commit is contained in:
Joao Goncalves
2025-12-17 17:11:59 -01:00
parent 6da518d990
commit 20dad802a1
11 changed files with 162 additions and 179 deletions

View File

@@ -37,7 +37,7 @@ func main() {
}
func PicoCSSPlugin(v *via.V) {
v.HandleFunc("GET /_plugins/picocss/assets/style.css", func(w http.ResponseWriter, r *http.Request) {
v.HTTPServeMux().HandleFunc("GET /_plugins/picocss/assets/style.css", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/css")
_, _ = w.Write(picoCSSFile)
})