feat: add real-time chart example

This commit is contained in:
Joao Goncalves
2025-11-05 17:29:29 -01:00
parent 57b22de0e4
commit c167f0c74f
8 changed files with 302 additions and 65 deletions

View File

@@ -26,6 +26,14 @@ func Placeholder(v string) H {
return gh.Placeholder(v)
}
func Rel(v string) H {
return gh.Rel(v)
}
func Class(v string) H {
return gh.Class(v)
}
// Data attributes automatically have their name prefixed with "data-".
func Data(name, v string) H {
return gh.Data(name, v)

View File

@@ -392,6 +392,10 @@ func Var(children ...H) H {
return gh.Var(retype(children)...)
}
func StyleEl(children ...H) H {
return gh.StyleEl(retype(children)...)
}
func Video(children ...H) H {
return gh.Video(retype(children)...)
}

6
h/h.go
View File

@@ -35,6 +35,12 @@ func Raw(s string) H {
return g.Raw(s)
}
// Rawf creates a text DOM [Node] that just Renders the interpolated and
// unescaped string format.
func Rawf(format string, a ...any) H {
return g.Rawf(format, a...)
}
// Attr creates an attribute DOM [Node] with a name and optional value.
// If only a name is passed, it's a name-only (boolean) attribute (like "required").
// If a name and value are passed, it's a name-value attribute (like `class="header"`).