From 3a9a1fd26540ddd0299771a729740cdd88239dde Mon Sep 17 00:00:00 2001
From: Alan Pearce
Date: Wed, 19 Mar 2025 12:20:24 +0100
Subject: Rename and document fork
---
internal/examples/app/html/about.go | 13 +++++++++----
internal/examples/app/html/components.go | 9 +++++----
internal/examples/app/html/home.go | 13 +++++++++----
3 files changed, 23 insertions(+), 12 deletions(-)
(limited to 'internal/examples/app/html')
diff --git a/internal/examples/app/html/about.go b/internal/examples/app/html/about.go
index 61a5001..1a0517d 100644
--- a/internal/examples/app/html/about.go
+++ b/internal/examples/app/html/about.go
@@ -3,14 +3,15 @@ package html
import (
"time"
- . "maragu.dev/gomponents"
- . "maragu.dev/gomponents/html"
+ . "go.alanpearce.eu/gomponents"
+ . "go.alanpearce.eu/gomponents/html"
)
func AboutPage() Node {
now := time.Now()
- return page("About",
+ return page(
+ "About",
H1(Text("About")),
P(Textf("Built with gomponents and rendered at %v.", now.Format(time.TimeOnly))),
@@ -20,6 +21,10 @@ func AboutPage() Node {
If(now.Second()%2 != 0, Text("It's an odd second!")),
),
- Img(Class("max-w-sm"), Src("https://www.gomponents.com/images/logo.png"), Alt("gomponents logo")),
+ Img(
+ Class("max-w-sm"),
+ Src("https://www.gomponents.com/images/logo.png"),
+ Alt("gomponents logo"),
+ ),
)
}
diff --git a/internal/examples/app/html/components.go b/internal/examples/app/html/components.go
index ad5d582..78079d2 100644
--- a/internal/examples/app/html/components.go
+++ b/internal/examples/app/html/components.go
@@ -1,9 +1,9 @@
package html
import (
- . "maragu.dev/gomponents"
- . "maragu.dev/gomponents/components"
- . "maragu.dev/gomponents/html"
+ . "go.alanpearce.eu/gomponents"
+ . "go.alanpearce.eu/gomponents/components"
+ . "go.alanpearce.eu/gomponents/html"
)
func page(title string, children ...Node) Node {
@@ -56,7 +56,8 @@ func container(padY bool, children ...Node) Node {
}
func footer() Node {
- return Div(Class("bg-gray-900 text-white shadow text-center h-16 flex items-center justify-center"),
+ return Div(
+ Class("bg-gray-900 text-white shadow text-center h-16 flex items-center justify-center"),
A(Href("https://www.gomponents.com"), Text("gomponents")),
)
}
diff --git a/internal/examples/app/html/home.go b/internal/examples/app/html/home.go
index 5743d38..fdd48dc 100644
--- a/internal/examples/app/html/home.go
+++ b/internal/examples/app/html/home.go
@@ -1,17 +1,22 @@
package html
import (
- . "maragu.dev/gomponents"
- . "maragu.dev/gomponents/html"
+ . "go.alanpearce.eu/gomponents"
+ . "go.alanpearce.eu/gomponents/html"
)
func HomePage(items []string) Node {
- return page("Home",
+ 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.`)),
+ P(
+ Raw(
+ `Have a look at the source code to see how it’s structured.`,
+ ),
+ ),
Ul(Map(items, func(s string) Node {
return Li(Text(s))
--
cgit 1.4.1