htmgo/htmgo-site/pages/base/root.go
2024-09-24 13:23:38 -05:00

33 lines
730 B
Go

package base
import (
"github.com/google/uuid"
"github.com/maddalax/htmgo/framework/h"
"htmgo-site/partials"
)
var Version = uuid.NewString()[0:6]
func RootPage(children ...h.Ren) *h.Element {
return h.Html(
h.HxExtension(h.BaseExtensions()),
h.Head(
h.Meta("viewport", "width=device-width, initial-scale=1"),
h.LinkWithVersion("/public/main.css", "stylesheet", Version),
h.ScriptWithVersion("/public/htmgo.js", Version),
h.Raw(`
<script src="https://buttons.github.io/buttons.js"></script>
`),
h.Style(`
html {
scroll-behavior: smooth;
}
`),
),
h.Body(
h.Class("bg-stone-50 min-h-screen overflow-x-hidden"),
partials.NavBar(false),
h.Fragment(children...),
),
)
}