about summary refs log tree commit diff stats
path: root/el
Commit message (Collapse)AuthorAgeLines
* Move elements and attributes into html package (#52)Markus Wüstenberg2020-12-10-687/+0
| | | | | 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.
* Add svg element (#46)Markus Wüstenberg2020-11-16-0/+5
| | | | | Also add `cols` and `rows` attributes. Fixes #43.
* Render correct HTML5 (#44)Markus Wüstenberg2020-11-16-18/+30
| | | | | | | | | 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.
* Render to Writer instead of string (#39)Markus Wüstenberg2020-11-02-9/+19
| | | | | | | 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.)
* Add element helpers and refactor (#34)Markus Wüstenberg2020-10-28-487/+556
| | | | | | | This change adds a lot of element helpers, and refactors: - helpers into simple, text, and other helpers - most tests into table-driven tests, so they're easier to read Thanks to @oderwat for pushing me to improve the tests. 😉
* Add br and hr element helpers (#30)Hans Raaf2020-10-23-0/+20
|
* Add Group function to group Nodes (#29)Markus Wüstenberg2020-10-22-32/+20
|
* Add remaining sectioning elements as helpers (#25)Markus Wüstenberg2020-09-25-0/+105
| | | Fixes #22.
* Group element helpers in different files (#21)Markus Wüstenberg2020-09-25-302/+368
| | | According to the section at https://developer.mozilla.org/en-US/docs/Web/HTML/Element
* Add space before auto-closing element (#20)Markus Wüstenberg2020-09-24-16/+16
|
* Add convenience helpers for form elements (#19)Markus Wüstenberg2020-09-24-3/+117
|
* Add children varargs to h1-6, b, strong, i, em, img helpers (#15)Markus Wüstenberg2020-09-23-33/+35
| | | This makes it possible to add attributes.
* Add a lot of common elements (#10)Markus Wüstenberg2020-09-21-0/+216
| | | Especially add elements that are either used in every document, that nearly always have text content, or that are almost always used with certain attributes.
* Add package el with element helpers (#8)Markus Wüstenberg2020-09-18-0/+80