diff --git a/framework/h/tag.go b/framework/h/tag.go index 9c0696b..2cf6289 100644 --- a/framework/h/tag.go +++ b/framework/h/tag.go @@ -364,7 +364,7 @@ func Indicator(tag string) Renderable { return Attribute("hx-indicator", tag) } -func P(children ...Renderable) Renderable { +func P(text string, children ...Renderable) Renderable { return Tag("p", children...) } diff --git a/starter-template/go.mod b/starter-template/go.mod index 2b7f113..fcde4be 100644 --- a/starter-template/go.mod +++ b/starter-template/go.mod @@ -8,11 +8,13 @@ require ( github.com/redis/go-redis/v9 v9.6.1 ) + require ( github.com/andybalholm/brotli v1.0.5 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/klauspost/compress v1.17.0 // indirect + github.com/maddalax/mhtml/framework v0.0.0-20240913171301-3ef5039befe2 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect @@ -20,5 +22,5 @@ require ( github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasthttp v1.51.0 // indirect github.com/valyala/tcplisten v1.0.0 // indirect - golang.org/x/sys v0.15.0 // indirect + golang.org/x/sys v0.25.0 // indirect ) diff --git a/main.go b/starter-template/main.go similarity index 85% rename from main.go rename to starter-template/main.go index 426f26b..c11e70b 100644 --- a/main.go +++ b/starter-template/main.go @@ -3,10 +3,10 @@ package main import ( "github.com/gofiber/fiber/v2" "github.com/google/uuid" + "github.com/maddalax/mhtml/framework/h" + "github.com/maddalax/mhtml/starter-template/pages" + "github.com/maddalax/mhtml/starter-template/partials/load" "log" - "mhtml/h" - "mhtml/pages" - "mhtml/partials/load" "time" )