diff options
Diffstat (limited to 'internal/examples/app/html')
-rw-r--r-- | internal/examples/app/html/about.go | 13 | ||||
-rw-r--r-- | internal/examples/app/html/components.go | 9 | ||||
-rw-r--r-- | internal/examples/app/html/home.go | 13 |
3 files changed, 23 insertions, 12 deletions
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 <a href="https:/github.com/maragudk/gomponents/tree/main/internal/examples/app">source code</a> to see how it’s structured.`)), + P( + Raw( + `Have a look at the <a href="https:/github.com/alanpearce/gomponents/tree/main/internal/examples/app">source code</a> to see how it’s structured.`, + ), + ), Ul(Map(items, func(s string) Node { return Li(Text(s)) |