diff --git a/examples/chat/Dockerfile b/examples/chat/Dockerfile index 5f9bc42..eae23dd 100644 --- a/examples/chat/Dockerfile +++ b/examples/chat/Dockerfile @@ -14,7 +14,7 @@ RUN go mod download COPY . . # Build the Go binary for Linux -RUN CGO_ENABLED=0 GOPRIVATE=github.com/maddalax LOG_LEVEL=debug go run github.com/maddalax/htmgo/cli/htmgo@8b816e956692683337d9fff6416ccc31f5047b59 build +RUN CGO_ENABLED=0 GOPRIVATE=github.com/maddalax LOG_LEVEL=debug go run github.com/maddalax/htmgo/cli/htmgo@latest build RUN CGO_ENABLED=1 GOOS=linux go build -tags prod -o ./dist -a -ldflags '-linkmode external -extldflags "-static"' . diff --git a/htmgo-site/assets/public/chat-example.jpg b/htmgo-site/assets/public/chat-example.jpg new file mode 100644 index 0000000..eb57c98 Binary files /dev/null and b/htmgo-site/assets/public/chat-example.jpg differ diff --git a/htmgo-site/pages/examples.go b/htmgo-site/pages/examples.go index 7a8d6c2..3db313a 100644 --- a/htmgo-site/pages/examples.go +++ b/htmgo-site/pages/examples.go @@ -14,6 +14,12 @@ type Example struct { } var examples = []Example{ + { + Title: "Chat App Example", + Github: "https://github.com/maddalax/htmgo/tree/master/examples/chat", + Demo: "https://chat-example.htmgo.dev", + Image: "public/chat-example.jpg", + }, { Title: "Todo List MVC", Github: "https://github.com/maddalax/htmgo/tree/master/examples/todo-list", @@ -67,10 +73,10 @@ func ExamplesPage(ctx *h.RequestContext) *h.Page { func ExampleCards() *h.Element { return h.Div( - h.Class("prose-h2:my-1 prose-img:my-1 flex flex-col md:flex-row gap-6 md:gap-2 text-center pb-8"), // Left-aligns and allows multiple cards in a row + h.Class("prose-h2:my-1 prose-img:my-1 grid grid-cols-1 md:grid-cols-3 gap-6 text-center pb-8"), // Using grid for 3-column layout h.List(examples, func(example Example, index int) *h.Element { return h.Div( - h.Class("border border-gray-200 shadow-sm rounded-md px-4 pb-4 w-full md:w-1/2 bg-neutral-100"), // Reduces padding + h.Class("border border-gray-200 shadow-sm rounded-md px-4 pb-4 bg-neutral-100"), // Removed specific width, handled by grid h.Div( h.Class("flex flex-col gap-1 mt-4"), h.H2(