all repos — gomponents @ febffb600db7fbfd81827ded1b8fa3774bf42107

HTML components in pure Go

Simplify available elements (#55) `a`, `form`, `img`, `input`, `label`, `option`, `progress`, `select`, and `textarea` are now just regular elements (without helper parameters), because: - Sometimes the use case doesn't fit (`a` as anchor without href, for example) - There's no reason these are special among the others, so streamlining them makes sense Also added new attributes `action`, `alt`, `for`, `method` that I had somehow missed.

Markus Wüstenberg
commit

febffb600db7fbfd81827ded1b8fa3774bf42107

parent

100ae9e8308f380eeb3c6a5ea7a7e3277483aa43

1 file changed, 1 insertion(+), 1 deletion(-)

changed files
M examples/dot-import/dot-import.goexamples/dot-import/dot-import.go
@@ -40,5 +40,5 @@ )
} func NavbarLink(href, name, currentPath string) g.Node { - return A(href, Classes{"is-active": currentPath == href}, g.Text(name)) + return A(Href(href), Classes{"is-active": currentPath == href}, g.Text(name)) }