htmgo/examples/chat/pages/root.go

27 lines
559 B
Go
Raw Normal View History

package pages
import (
"github.com/maddalax/htmgo/framework/h"
)
func RootPage(children ...h.Ren) h.Ren {
extensions := h.BaseExtensions()
return h.Html(
h.HxExtension(extensions),
2024-10-03 17:04:49 +00:00
h.Meta("viewport", "width=device-width, initial-scale=1"),
h.Meta("title", "htmgo chat example"),
h.Meta("charset", "utf-8"),
h.Meta("author", "htmgo"),
h.Head(
h.Link("/public/main.css", "stylesheet"),
h.Script("/public/htmgo.js"),
),
h.Body(
h.Div(
h.Class("flex flex-col gap-2 bg-white h-full"),
h.Fragment(children...),
),
),
)
}