all repos — gomponents @ 100ae9e8308f380eeb3c6a5ea7a7e3277483aa43

HTML components in pure Go

Rename Document to Doctype (#54)

Markus Wüstenberg
commit

100ae9e8308f380eeb3c6a5ea7a7e3277483aa43

parent

a76262652b227c95ce140f3698c46f59b79354ac

1 file changed, 4 insertions(+), 4 deletions(-)

changed files
M README.mdREADME.md
@@ -54,7 +54,7 @@ _ = Page("Hi!", r.URL.Path).Render(w)
} func Page(title, currentPath string) g.Node { - return Document( + return Doctype( HTML( Lang("en"), Head(
@@ -94,7 +94,7 @@ import (
"net/http" g "github.com/maragudk/gomponents" - . "github.com/maragudk/gomponents/components" + c "github.com/maragudk/gomponents/components" . "github.com/maragudk/gomponents/html" )
@@ -107,7 +107,7 @@ _ = Page("Hi!", r.URL.Path).Render(w)
} func Page(title, currentPath string) g.Node { - return HTML5(HTML5Props{ + return c.HTML5(c.HTML5Props{ Title: title, Language: "en", Head: []g.Node{
@@ -129,7 +129,7 @@ )
} func NavbarLink(href, name, currentPath string) g.Node { - return A(href, Classes{"is-active": currentPath == href}, g.Text(name)) + return A(href, c.Classes{"is-active": currentPath == href}, g.Text(name)) } ```