| Commit message (Collapse) | Author | Age | Lines |
| |
|
|
|
|
|
| |
This makes it easier to use dot-imports.
Also updated the readme and examples with new usage, and move the `Classes` helper into the `components` package.
|
|
|
|
|
|
|
|
|
| |
Previously, elements of kind void and empty elements generally would be rendered auto-closing (with a final `/` character in the start tag), which is allowed sometimes but arguably wrong. See https://dev.w3.org/html5/spec-LC/syntax.html#end-tags
This created problems with for example `textarea` and `script`, which cannot be auto-closing, or the browser renders it wrong.
Also clarified in the docs that this library outputs HTML5.
Fixes #42.
|
|
|
| |
Also update readme with features.
|
|
|
|
|
|
|
| |
The Render function has been changed to take a `Writer` instead of returning a string. This makes it possible to generate documents without having the whole content in memory.
This also removes the `gomponents.Write` function, which is now redundant.
Furthermore, the `el.Document` function has been changed to only take one child, as multiple children never make sense for it. (It's not even a child, more a sibling.)
|
| |
|
|
|
| |
Also style menu in simple example slightly.
|
| |
|
|
|
| |
Like Text, but calls fmt.Sprintf before rendering.
|
| |
|
| |
|
| |
|
| |
|
|
|