From 12acb8041060306b361109b46f9f05dbb4382ea0 Mon Sep 17 00:00:00 2001 From: Markus Wüstenberg Date: Thu, 19 Sep 2024 21:45:31 +0200 Subject: Add full example app (#204) Also, remove the other examples and simplify the readme.--- internal/examples/app/html/home.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 internal/examples/app/html/home.go (limited to 'internal/examples/app/html/home.go') diff --git a/internal/examples/app/html/home.go b/internal/examples/app/html/home.go new file mode 100644 index 0000000..d4e192c --- /dev/null +++ b/internal/examples/app/html/home.go @@ -0,0 +1,20 @@ +package html + +import ( + . "github.com/maragudk/gomponents" + . "github.com/maragudk/gomponents/html" +) + +func HomePage(items []string) Node { + return page("Home", + H1(Text("Home")), + + P(Text("This is a gomponents example app!")), + + P(Raw(`Have a look at the source code to see how it’s structured.`)), + + Ul(Group(Map(items, func(s string) Node { + return Li(Text(s)) + }))), + ) +} -- cgit 1.4.1