diff options
Diffstat (limited to 'internal')
-rw-r--r-- | internal/assert/assert.go | 2 | ||||
-rw-r--r-- | internal/examples/app/go.mod | 2 | ||||
-rw-r--r-- | internal/examples/app/go.sum | 4 | ||||
-rw-r--r-- | internal/examples/app/go.work.sum | 2 | ||||
-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 | ||||
-rw-r--r-- | internal/examples/app/http/pages.go | 4 | ||||
-rw-r--r-- | internal/import/import_test.go | 23 |
9 files changed, 43 insertions, 29 deletions
diff --git a/internal/assert/assert.go b/internal/assert/assert.go index 102a435..26479b2 100644 --- a/internal/assert/assert.go +++ b/internal/assert/assert.go @@ -5,7 +5,7 @@ import ( "strings" "testing" - g "maragu.dev/gomponents" + g "go.alanpearce.eu/gomponents" ) // Equal checks for equality between the given expected string and the rendered Node string. diff --git a/internal/examples/app/go.mod b/internal/examples/app/go.mod index 83e51cf..ad86ed3 100644 --- a/internal/examples/app/go.mod +++ b/internal/examples/app/go.mod @@ -2,4 +2,4 @@ module app go 1.23.2 -require maragu.dev/gomponents v1.0.0-beta1 +require go.alanpearce.eu/gomponents v1.0.0-beta1 diff --git a/internal/examples/app/go.sum b/internal/examples/app/go.sum index d3b1274..0df2e94 100644 --- a/internal/examples/app/go.sum +++ b/internal/examples/app/go.sum @@ -1,2 +1,2 @@ -maragu.dev/gomponents v1.0.0-beta1 h1:I51NqKfrtQC4GxuWShqW5CT5BrfToMEueLD76IhdSXs= -maragu.dev/gomponents v1.0.0-beta1/go.mod h1:oEDahza2gZoXDoDHhw8jBNgH+3UR5ni7Ur648HORydM= +go.alanpearce.eu/gomponents v1.0.0-beta1 h1:I51NqKfrtQC4GxuWShqW5CT5BrfToMEueLD76IhdSXs= +go.alanpearce.eu/gomponents v1.0.0-beta1/go.mod h1:oEDahza2gZoXDoDHhw8jBNgH+3UR5ni7Ur648HORydM= diff --git a/internal/examples/app/go.work.sum b/internal/examples/app/go.work.sum index 5c5a195..bca4022 100644 --- a/internal/examples/app/go.work.sum +++ b/internal/examples/app/go.work.sum @@ -1 +1 @@ -maragu.dev/gomponents v1.0.0-beta1/go.mod h1:oEDahza2gZoXDoDHhw8jBNgH+3UR5ni7Ur648HORydM= +go.alanpearce.eu/gomponents v1.0.0-beta1/go.mod h1:oEDahza2gZoXDoDHhw8jBNgH+3UR5ni7Ur648HORydM= 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)) diff --git a/internal/examples/app/http/pages.go b/internal/examples/app/http/pages.go index b09589b..a8756f7 100644 --- a/internal/examples/app/http/pages.go +++ b/internal/examples/app/http/pages.go @@ -3,8 +3,8 @@ package http import ( "net/http" - . "maragu.dev/gomponents" - ghttp "maragu.dev/gomponents/http" + . "go.alanpearce.eu/gomponents" + ghttp "go.alanpearce.eu/gomponents/http" "app/html" ) diff --git a/internal/import/import_test.go b/internal/import/import_test.go index e505e46..d81b967 100644 --- a/internal/import/import_test.go +++ b/internal/import/import_test.go @@ -3,17 +3,20 @@ package import_test import ( "testing" - . "maragu.dev/gomponents" - . "maragu.dev/gomponents/components" - . "maragu.dev/gomponents/html" - . "maragu.dev/gomponents/http" + . "go.alanpearce.eu/gomponents" + . "go.alanpearce.eu/gomponents/components" + . "go.alanpearce.eu/gomponents/html" + . "go.alanpearce.eu/gomponents/http" ) func TestImports(t *testing.T) { - t.Run("this is just a test that does nothing, but I need the dot imports above", func(t *testing.T) { - _ = El("div") - _ = A() - _ = HTML5(HTML5Props{}) - _ = Adapt(nil) - }) + t.Run( + "this is just a test that does nothing, but I need the dot imports above", + func(t *testing.T) { + _ = El("div") + _ = A() + _ = HTML5(HTML5Props{}) + _ = Adapt(nil) + }, + ) } |