about summary refs log tree commit diff stats
path: root/components
Commit message (Collapse)AuthorAgeLines
* Streamline HTML element API (#66)Markus Wüstenberg2021-05-05-1/+1
| | | | | There were a lot of elements previously, like `Em`, `H1`, and a lot more, that took a string as the first argument previously. This was weird when you wanted to mix elements to output html like `<strong><em>…</em></strong>` or `<h1>Something <em>something</em> something</h1>`. gomponents is not an HTML validator, so I want people to be able to use elements however they please, also without text content. This also means that all elements now have the same API.
* Use g.If in HTML5 helper (#65)Markus Wüstenberg2021-04-28-9/+2
| | | Inlining looks much nicer.
* Return Node from all helpers instead of NodeFunc (#62)Markus Wüstenberg2021-01-07-2/+2
| | | | | This makes it clearer that the helpers return a `Node` of any kind, and that the type is not important. This also streamlines the API, as attribute helpers already return just `Node`.
* Add test for InputHidden (#60)Markus Wüstenberg2020-12-22-0/+16
|
* Add If helper function (#57)Markus Wüstenberg2020-12-22-0/+10
| | | Used to inline conditional nodes.
* Rename Document to Doctype (#54)Markus Wüstenberg2020-12-10-1/+1
|
* Move elements and attributes into html package (#52)Markus Wüstenberg2020-12-10-22/+89
| | | | | 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.
* Render correct HTML5 (#44)Markus Wüstenberg2020-11-16-2/+2
| | | | | | | | | 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.
* Add package docs (#41)Markus Wüstenberg2020-11-02-0/+1
| | | Also update readme with features.
* Add HTML5 document template (#36)Markus Wüstenberg2020-10-29-0/+73