htmgo/examples/hackernews/pages/root.go

32 lines
856 B
Go
Raw Normal View History

2024-10-10 22:00:20 +00:00
package pages
import (
"github.com/maddalax/htmgo/framework/h"
)
func RootPage(children ...h.Ren) h.Ren {
return h.Html(
h.HxExtensions(h.BaseExtensions()),
h.Head(
h.Meta("viewport", "width=device-width, initial-scale=1"),
h.Link("/public/favicon.ico", "icon"),
h.Link("/public/apple-touch-icon.png", "apple-touch-icon"),
2024-10-10 23:01:51 +00:00
h.Meta("title", "hackernews"),
2024-10-10 22:00:20 +00:00
h.Meta("charset", "utf-8"),
h.Meta("author", "htmgo"),
2024-10-10 23:01:51 +00:00
h.Meta("description", "hacker news reader, built with htmgo"),
h.Meta("og:title", "hacker news reader"),
h.Meta("og:url", "https://hn.htmgo.dev"),
h.Link("canonical", "https://hn.htmgo.dev"),
h.Meta("og:description", "hacker news reader, built with htmgo"),
2024-10-10 22:00:20 +00:00
h.Link("/public/main.css", "stylesheet"),
h.Script("/public/htmgo.js"),
),
h.Body(
h.Div(
h.Fragment(children...),
),
),
)
}