Fix logo size in readme
Markus Wüstenberg markus@maragu.dk
Fri, 12 Jan 2024 09:15:57 +0100
Add logo to readme
Markus Wüstenberg markus@maragu.dk
Fri, 12 Jan 2024 09:12:16 +0100
Test Go 1.21 in CI (#147)
Markus Wüstenberg markus@maragu.dk
Fri, 08 Sep 2023 11:03:47 +0200
Add "checked" bool attribute (#136) Fixes #127.
Markus Wüstenberg markus@maragu.dk
Thu, 11 May 2023 11:23:18 +0200
Document Text/Textf helpers better (#135) Both in the readme and package doc. Fixes #133.
Markus Wüstenberg markus@maragu.dk
Thu, 11 May 2023 10:08:27 +0200
Test with Go 1.20 in CI (#134) Fixes #129.
Markus Wüstenberg markus@maragu.dk
Thu, 04 May 2023 09:49:50 +0200
Add Step attribute (#126) See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#step Fixes #120.
Markus Wüstenberg markus@maragu.dk
Tue, 17 Jan 2023 13:05:47 +0100
Add ColSpan and RowSpan attributes (#125)
Markus Wüstenberg markus@maragu.dk
Tue, 17 Jan 2023 13:00:16 +0100
Remove year from LICENSE (#121)
Markus Wüstenberg markus@maragu.dk
Tue, 03 Jan 2023 10:26:51 +0100
Upgrade codecov-action to v3 in CI (#119)
Markus Wüstenberg markus@maragu.dk
Tue, 15 Nov 2022 22:33:33 +0100
Put .PHONY in front of each target in Makefile (#118)
Markus Wüstenberg markus@maragu.dk
Tue, 15 Nov 2022 22:32:01 +0100
Rename master branch to main (#117)
Markus Wüstenberg markus@maragu.dk
Tue, 15 Nov 2022 22:19:09 +0100
Add stroke-width SVG attribute (#116)
Markus Wüstenberg markus@maragu.dk
Tue, 15 Nov 2022 14:48:01 +0100
Delete low-value helper components (#115) I'd rather reserve the package for components that have proven repeatedly useful, like `Classes` and `HTML5`.
Markus Wüstenberg markus@maragu.dk
Thu, 03 Nov 2022 11:32:16 +0100
Add Rawf (#114) Like `Raw`, but interpolates like `Textf`.
Markus Wüstenberg markus@maragu.dk
Thu, 03 Nov 2022 11:24:26 +0100
Add Go report card to readme (#111) Also fix godoc badge to point to pkg.go.dev.
Markus Wüstenberg markus@maragu.dk
Mon, 17 Oct 2022 14:09:37 +0200
Fix small typo occured -> occurred (#110)
Markus Wüstenberg markus@maragu.dk
Mon, 17 Oct 2022 14:04:24 +0200
Add EncType html attribute (#109)
Markus Wüstenberg markus@maragu.dk
Thu, 29 Sep 2022 12:46:36 +0200
Add generic Map implementation (#108) Instead of waiting for a good time to switch the `Map` implementation, I've decided to just offer two implementations: one for Go versions before 1.18, and one for 1.18 and onwards. This is achieved using build tags in the source files. This is obviously a breaking change for consumers of this library that use Go 1.18 and onwards. See #88
Markus Wüstenberg markus@maragu.dk
Thu, 22 Sep 2022 09:41:06 +0200
Add Go 1.19 to test matrix (#107)
Markus Wüstenberg markus@maragu.dk
Wed, 21 Sep 2022 10:42:07 +0200
Use output of strings.Builder in assert.Equal (#106)
Markus Wüstenberg markus@maragu.dk
Wed, 21 Sep 2022 10:37:44 +0200
Make void elements a map (#103) Makes it easier to lookup by name. Also, fixed some doc comments.
Markus Wüstenberg markus@maragu.dk
Fri, 27 May 2022 14:16:19 +0200
Update package doc to reflect new content (#102) It hadn't been updated in a while.
Markus Wüstenberg markus@maragu.dk
Wed, 25 May 2022 14:36:26 +0200
Fix CI badge in Readme (#100)
Markus Wüstenberg markus@maragu.dk
Wed, 25 May 2022 11:01:53 +0200
Update CI config (#98) - Drop current test workflows if a new one has come in - Use newer checkout and setup actions - Delete CodeQL workflow
Markus Wüstenberg markus@maragu.dk
Wed, 25 May 2022 10:21:27 +0200
Update copyright year in license
Markus Wüstenberg markus@maragu.dk
Mon, 21 Mar 2022 12:22:32 +0100
Use a test matrix with the last three stable Go versions (#96)
Markus Wüstenberg markus@maragu.dk
Mon, 21 Mar 2022 12:05:17 +0100
Add http.Adapt function (#92) In the new package `http`, an `Adapt` function converts a `Handler` into a `http.HandlerFunc` from the `http` stdlib package.
Markus Wüstenberg markus@maragu.dk
Fri, 08 Oct 2021 15:00:20 +0200
Test using Go 1.17 (#91) Also set the new `-shuffle` flag when testing.
Markus Wüstenberg markus@maragu.dk
Wed, 06 Oct 2021 20:51:31 +0200
Mark the assert test helpers as such (#90) Using `t.Helper()`. Also move the assert package to be internal.
Markus Wüstenberg markus@maragu.dk
Wed, 06 Oct 2021 20:49:43 +0200
Add loading and srcset HTML attributes (#86) Useful for `img` and `picture` elements. Fixes #85. Co-authored-by: Josep Jesus Bigorra Algaba <josep@prowarehouse.nl>
Josep Jesus Bigorra Algaba 42377845+averageflow@users.noreply.github.com
Tue, 07 Sep 2021 12:09:57 +0200
Add link to maragu.dk and golang.dk in readme
Markus Wüstenberg markus@maragu.dk
Fri, 18 Jun 2021 10:35:58 +0200
Add Github action status badge to readme
Markus Wüstenberg markus@maragu.dk
Fri, 18 Jun 2021 10:10:55 +0200
Add contributors file
Markus Wüstenberg markus@maragu.dk
Fri, 18 Jun 2021 10:09:00 +0200
Add video element and related attributes (#84) Adds the `video` element and `loop`, `muted`, `playsinline`, `poster` attributes.
Markus Wüstenberg markus@maragu.dk
Fri, 18 Jun 2021 09:39:47 +0200
Add javascript alert onclick handler to Raw example (#82) Makes for fun XSS testing.
Markus Wüstenberg markus@maragu.dk
Wed, 09 Jun 2021 10:56:22 +0200
Add examples in test files (#80) These show up in godoc.
Markus Wüstenberg markus@maragu.dk
Tue, 08 Jun 2021 18:12:04 +0200
Add LinkStylesheet and LinkPreload components (#79) These are often used in the `<head>` part of the HTML.
Markus Wüstenberg markus@maragu.dk
Tue, 08 Jun 2021 16:52:57 +0200
Escape Attr values (#77) Because this can be a place of injection if untrusted data is passed, escape all attribute values. Fixes #74.
Markus Wüstenberg markus@maragu.dk
Tue, 18 May 2021 14:21:53 +0200
Fix TailwindCSS CDN URL in example (#76) The CSS style URLs from unpkg.com redirected to a different page, but the first request set a `Content-Type` header of `text/plain`. Using the direct URLs fixes this. Fixes #75. Thanks to @gedw99 for reporting.
Markus Wüstenberg markus@maragu.dk
Tue, 11 May 2021 16:39:04 +0200
Update readme with content from website (#73)
Markus Wüstenberg markus@maragu.dk
Fri, 07 May 2021 14:40:55 +0200
Bump Go version to 1.16 in CI (#72)
Markus Wüstenberg markus@maragu.dk
Fri, 07 May 2021 14:35:47 +0200
Add more complex example using TailwindCSS (#71)
Markus Wüstenberg markus@maragu.dk
Fri, 07 May 2021 14:12:23 +0200
Add svg package and a few helpers (#67) Introducing SVG, to inline vector graphics in your HTML! 🥳
Markus Wüstenberg markus@maragu.dk
Wed, 05 May 2021 12:53:32 +0200
Fix code in readme (#69) Broken in #66.
Markus Wüstenberg markus@maragu.dk
Wed, 05 May 2021 09:53:19 +0200
Update license year (#68)
Markus Wüstenberg markus@maragu.dk
Wed, 05 May 2021 09:51:42 +0200
Streamline HTML element API (#66) 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.
Markus Wüstenberg markus@maragu.dk
Wed, 05 May 2021 09:03:16 +0200
Use g.If in HTML5 helper (#65) Inlining looks much nicer.
Markus Wüstenberg markus@maragu.dk
Wed, 28 Apr 2021 10:42:49 +0200
Return Node from all helpers instead of NodeFunc (#62) 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`.
Markus Wüstenberg markus@maragu.dk
Thu, 07 Jan 2021 10:20:03 +0100
Add data- attribute helper (#61) Fixes #49.
Markus Wüstenberg markus@maragu.dk
Tue, 22 Dec 2020 11:46:49 +0100
Add test for InputHidden (#60)
Markus Wüstenberg markus@maragu.dk
Tue, 22 Dec 2020 11:12:45 +0100
Add aria-* and role attributes (#59) Fixes #50.
Markus Wüstenberg markus@maragu.dk
Tue, 22 Dec 2020 11:07:33 +0100
Add If helper function (#57) Used to inline conditional nodes.
Markus Wüstenberg markus@maragu.dk
Tue, 22 Dec 2020 10:53:22 +0100
Change main example to be the dot-import version (#56)
Markus Wüstenberg markus@maragu.dk
Thu, 10 Dec 2020 14:27:10 +0100
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.
Markus Wüstenberg markus@maragu.dk
Thu, 10 Dec 2020 14:20:33 +0100
Rename Document to Doctype (#54)
Markus Wüstenberg markus@maragu.dk
Thu, 10 Dec 2020 13:13:10 +0100
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.
Markus Wüstenberg markus@maragu.dk
Thu, 10 Dec 2020 13:00:23 +0100
Minor refactoring and comment changes (#51)
Markus Wüstenberg markus@maragu.dk
Tue, 08 Dec 2020 21:59:47 +0100
Add example with dot imports (#47)
Markus Wüstenberg markus@maragu.dk
Tue, 17 Nov 2020 14:50:42 +0100
Add svg element (#46) Also add `cols` and `rows` attributes. Fixes #43.
Markus Wüstenberg markus@maragu.dk
Mon, 16 Nov 2020 13:03:54 +0100
Add NodeType which replaces the Placer interface (#45) The `Placer` interface was a weird interface that tried to abstract away nodes being elements or attributes, but it doesn't really make sense. Now `Nodes` just have a `NodeType`.
Markus Wüstenberg markus@maragu.dk
Mon, 16 Nov 2020 12:58:42 +0100
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.
Markus Wüstenberg markus@maragu.dk
Mon, 16 Nov 2020 12:38:24 +0100
Add package docs (#41) Also update readme with features.
Markus Wüstenberg markus@maragu.dk
Mon, 02 Nov 2020 11:05:23 +0100
Add Map function (#40) `Map` makes it easier to build lists of elements without having to iterate.
Markus Wüstenberg markus@maragu.dk
Mon, 02 Nov 2020 10:59:16 +0100
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.)
Markus Wüstenberg markus@maragu.dk
Mon, 02 Nov 2020 10:03:05 +0100
Remove fmt.Sprintf call in attribute Render (#38) Just concatenating the strings is much faster. Before: ``` make benchmark go test -bench=. goos: darwin goarch: amd64 pkg: github.com/maragudk/gomponents BenchmarkAttr/boolean_attributes-8 8194791 139 ns/op BenchmarkAttr/name-value_attributes-8 5143292 229 ns/op PASS ok github.com/maragudk/gomponents 2.841s ``` After: ``` make benchmark go test -bench=. goos: darwin goarch: amd64 pkg: github.com/maragudk/gomponents BenchmarkAttr/boolean_attributes-8 16755404 67.0 ns/op BenchmarkAttr/name-value_attributes-8 10208625 116 ns/op PASS ok github.com/maragudk/gomponents 2.702s ```
Markus Wüstenberg markus@maragu.dk
Thu, 29 Oct 2020 15:40:14 +0100
Pass attributes as pointers (#37)
Markus Wüstenberg markus@maragu.dk
Thu, 29 Oct 2020 13:07:22 +0100
Add HTML5 document template (#36)
Markus Wüstenberg markus@maragu.dk
Thu, 29 Oct 2020 12:03:43 +0100
Add attribute helpers (#35) Also refactor tests to be table-driven, for readability.
Markus Wüstenberg markus@maragu.dk
Wed, 28 Oct 2020 16:59:04 +0100
Add element helpers and refactor (#34) 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. 😉
Markus Wüstenberg markus@maragu.dk
Wed, 28 Oct 2020 16:16:18 +0100
Add contributing instructions (#33)
Markus Wüstenberg markus@maragu.dk
Fri, 23 Oct 2020 14:32:55 +0200
Add br and hr element helpers (#30)
Hans Raaf hara@oderwat.de
Fri, 23 Oct 2020 14:12:47 +0200
Remove "fmt" import in readme example (#31) Also style menu in simple example slightly.
Hans Raaf hara@oderwat.de
Fri, 23 Oct 2020 12:32:47 +0200
Don't render or error on nil children (#32) This makes it easier to e.g. conditionally skip a component for rendering.
Markus Wüstenberg markus@maragu.dk
Fri, 23 Oct 2020 12:14:23 +0200
Add Group function to group Nodes (#29)
Markus Wüstenberg markus@maragu.dk
Thu, 22 Oct 2020 09:07:57 +0200
Update package doc for gomponents (#28)
Markus Wüstenberg markus@maragu.dk
Wed, 21 Oct 2020 22:17:27 +0200
Use HTMLEscapeString in Textf (#27)
Markus Wüstenberg markus@maragu.dk
Wed, 21 Oct 2020 21:59:52 +0200
Add remaining sectioning elements as helpers (#25) Fixes #22.
Markus Wüstenberg markus@maragu.dk
Fri, 25 Sep 2020 17:36:21 +0200
Use HTMLEscapeString (#24) HTMLEscaper is not needed with strings.
Markus Wüstenberg markus@maragu.dk
Fri, 25 Sep 2020 13:39:55 +0200
Update readme with blog post link (#23)
Markus Wüstenberg markus@maragu.dk
Fri, 25 Sep 2020 12:32:50 +0200
Group element helpers in different files (#21) According to the section at https://developer.mozilla.org/en-US/docs/Web/HTML/Element
Markus Wüstenberg markus@maragu.dk
Fri, 25 Sep 2020 09:57:47 +0200
Add space before auto-closing element (#20)
Markus Wüstenberg markus@maragu.dk
Thu, 24 Sep 2020 21:55:11 +0200
Add convenience helpers for form elements (#19)
Markus Wüstenberg markus@maragu.dk
Thu, 24 Sep 2020 21:17:15 +0200
Introduce Placer interface (#18) When implemented, the `Place` method of the `Placer` interface tells `Render` in `El` where to put a Node. This is relevant for helpers that want to be rendered like attributes, inside the parent element. Fixes the bug where `attr.Classes` was rendered outside the element.
Markus Wüstenberg markus@maragu.dk
Thu, 24 Sep 2020 13:19:52 +0200
Add Textf function (#17) Like Text, but calls fmt.Sprintf before rendering.
Markus Wüstenberg markus@maragu.dk
Wed, 23 Sep 2020 22:10:35 +0200
Add better example in readme (#16)
Markus Wüstenberg markus@maragu.dk
Wed, 23 Sep 2020 22:05:59 +0200
Add children varargs to h1-6, b, strong, i, em, img helpers (#15) This makes it possible to add attributes.
Markus Wüstenberg markus@maragu.dk
Wed, 23 Sep 2020 20:35:16 +0200
Make attr.Classes a map type (#14) This makes the usage syntax prettier. Instead of `attr.Classes(map[string]bool{})`, we can just use `attr.Classes{}`.
Markus Wüstenberg markus@maragu.dk
Wed, 23 Sep 2020 20:30:14 +0200
Add simple example (#13)
Markus Wüstenberg markus@maragu.dk
Mon, 21 Sep 2020 16:30:29 +0200
Add a test for attr.String (#12)
Markus Wüstenberg markus@maragu.dk
Mon, 21 Sep 2020 16:07:39 +0200
Add a Write function (#11)
Markus Wüstenberg markus@maragu.dk
Mon, 21 Sep 2020 11:27:37 +0200
Add a lot of common elements (#10) 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.
Markus Wüstenberg markus@maragu.dk
Mon, 21 Sep 2020 11:23:47 +0200
Don't render twice with children (#9)
Markus Wüstenberg markus@maragu.dk
Mon, 21 Sep 2020 11:14:37 +0200
Add package el with element helpers (#8)
Markus Wüstenberg markus@maragu.dk
Fri, 18 Sep 2020 15:01:10 +0200
Add package attr with attribute helpers (#7)
Markus Wüstenberg markus@maragu.dk
Fri, 18 Sep 2020 14:44:47 +0200
Make NodeFunc and attr implement fmt.Stringer (#6)
Markus Wüstenberg markus@maragu.dk
Fri, 18 Sep 2020 14:38:09 +0200
Try out codecov.io (#5)
Markus Wüstenberg markus@maragu.dk
Fri, 18 Sep 2020 14:05:53 +0200
Add Makefile (#4)
Markus Wüstenberg markus@maragu.dk
Fri, 18 Sep 2020 13:57:04 +0200
Create codeql-analysis.yml (#3)
Markus Wüstenberg markus@maragu.dk
Tue, 15 Sep 2020 09:40:58 +0200
Add godoc link to readme (#2)
Markus Wüstenberg markus@maragu.dk
Mon, 14 Sep 2020 10:51:29 +0200
Add package documentation (#1)
Markus Wüstenberg markus@maragu.dk
Mon, 14 Sep 2020 10:47:14 +0200
Add first implementation of Node, El, Attr, Text
Markus Wüstenberg markus@wustenberg.dk
Sun, 13 Sep 2020 22:50:19 +0200
Make version numbers strings in yaml
Markus Wüstenberg markus@maragu.dk
Thu, 04 May 2023 09:48:27 +0200
Test with Go 1.20 in CI
Markus Wüstenberg markus@maragu.dk
Thu, 04 May 2023 09:46:20 +0200
Document Text/Textf helpers better Both in the readme and package doc. Fixes #133.
Markus Wüstenberg markus@maragu.dk
Thu, 11 May 2023 10:06:23 +0200
Add "checked" bool attribute Fixes #127.
Markus Wüstenberg markus@maragu.dk
Thu, 11 May 2023 11:22:01 +0200
Test Go 1.21 in CI
Markus Wüstenberg markus@maragu.dk
Fri, 08 Sep 2023 11:01:06 +0200