1
0
Commit Graph

25 Commits

Author SHA1 Message Date
30ac88ccaa Add uptream 2023-12-26 20:41:42 -08:00
Markus Wüstenberg
c129ae8da1 Document Text/Textf helpers better
Both in the readme and package doc.

Fixes #133.
2023-05-11 10:06:23 +02:00
Markus Wüstenberg
868a525244
Rename master branch to main (#117) 2022-11-15 22:19:09 +01:00
Markus Wüstenberg
34df17d356
Add Go report card to readme (#111)
Also fix godoc badge to point to pkg.go.dev.
2022-10-17 12:09:37 +00:00
Markus Wüstenberg
97698614be
Fix CI badge in Readme (#100) 2022-05-25 09:01:53 +00:00
Markus Wüstenberg
bd722def27
Add link to maragu.dk and golang.dk in readme 2021-06-18 10:35:58 +02:00
Markus Wüstenberg
aca5cdfe9d Add Github action status badge to readme 2021-06-18 10:10:55 +02:00
Markus Wüstenberg
1072ec9b70
Update readme with content from website (#73) 2021-05-07 14:40:55 +02:00
Markus Wüstenberg
eb1d1f22b4
Fix code in readme (#69)
Broken in #66.
2021-05-05 09:53:19 +02:00
Markus Wüstenberg
d41c4e5a85
Add data- attribute helper (#61)
Fixes #49.
2020-12-22 11:46:49 +01:00
Markus Wüstenberg
febffb600d
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.
2020-12-10 14:20:33 +01:00
Markus Wüstenberg
100ae9e830
Rename Document to Doctype (#54) 2020-12-10 13:13:10 +01:00
Markus Wüstenberg
a76262652b
Move elements and attributes into html package (#52)
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.
2020-12-10 13:00:23 +01:00
Markus Wüstenberg
794c3b26ac
Render correct HTML5 (#44)
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.
2020-11-16 12:38:24 +01:00
Markus Wüstenberg
87d09c3824
Add package docs (#41)
Also update readme with features.
2020-11-02 11:05:23 +01:00
Markus Wüstenberg
6c8f0c2352
Render to Writer instead of string (#39)
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.)
2020-11-02 10:03:05 +01:00
Markus Wüstenberg
3df42084ae
Add HTML5 document template (#36) 2020-10-29 12:03:43 +01:00
Hans Raaf
c99025e6c5
Remove "fmt" import in readme example (#31)
Also style menu in simple example slightly.
2020-10-23 12:32:47 +02:00
Markus Wüstenberg
5d5933899c
Update readme with blog post link (#23) 2020-09-25 12:32:50 +02:00
Markus Wüstenberg
f27cb0c05f
Add Textf function (#17)
Like Text, but calls fmt.Sprintf before rendering.
2020-09-23 22:10:35 +02:00
Markus Wüstenberg
3de9270f78
Add better example in readme (#16) 2020-09-23 22:05:59 +02:00
Markus Wüstenberg
c832941edb
Add simple example (#13) 2020-09-21 16:30:29 +02:00
Markus Wüstenberg
e8faab5207
Try out codecov.io (#5) 2020-09-18 14:05:53 +02:00
Markus Wüstenberg
ad47ed56f1
Add godoc link to readme (#2) 2020-09-14 10:51:29 +02:00
Markus Wüstenberg
fc3cc0f0f3 Add first implementation of Node, El, Attr, Text 2020-09-13 22:50:19 +02:00