about summary refs log tree commit diff stats
path: root/components
Commit message (Collapse)AuthorAgeLines
* Rename and document fork v1.2.0Alan Pearce24 hours-14/+29
|
* Set slice capacity based on input in `Map` and `Classes.Render` (#243)Gabe Cook2025-03-03-1/+1
| | | | | | | | | Hey! I just discovered this repo and I love being able to write templates while still having compile-time checks. I was looking through the code and noticed slices aren't currently preallocated in `Map()` and `Classes.Render()`. Preallocating will improve performance since the resulting slice won't have to be grown dynamically during the append loop.
* Add support for additional HTML attributes in HTML5 template (#238)Winni Neessen2024-11-06-1/+15
| | | | | This PR updates the HTML5 function to accept and render additional HTML attributes. An additional test case to validate this enhancement has been added as well.
* Move module to maragu.dev/gomponents namespace (#215)Markus Wüstenberg2024-10-03-6/+6
| | | | | | | | | | This is a breaking change to move gomponents to my own import namespace. I will obviously be careful with this, test it out in all kinds of scenarios, release betas, etc. But otherwise, because the `Node` interface is so simple and has basically never changed, I don't think this will break much. 🤞 Fixes #200
* Add links to godoc (#183)Markus Wüstenberg2024-06-26-2/+3
| | | | | Also add an example for `http.Adapt`. Fixes #182
* Delete low-value helper components (#115)Markus Wüstenberg2022-11-03-124/+61
| | | | I'd rather reserve the package for components that have proven repeatedly useful, like `Classes` and `HTML5`.
* Mark the assert test helpers as such (#90)Markus Wüstenberg2021-10-06-3/+3
| | | | | Using `t.Helper()`. Also move the assert package to be internal.
* Add examples in test files (#80)Markus Wüstenberg2021-06-08-0/+7
| | | These show up in godoc.
* Add LinkStylesheet and LinkPreload components (#79)Markus Wüstenberg2021-06-08-0/+22
| | | These are often used in the `<head>` part of the HTML.
* 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