An experimental IndieWeb site built in Go.
1package layouts
2
3import (
4 "github.com/puregarlic/space/html/components"
5 "net/http"
6)
7
8func RenderDefault(title string, page templ.Component) http.Handler {
9 document := Default(title, page)
10
11 return templ.Handler(document)
12}
13
14templ Default(title string, body templ.Component) {
15 <!DOCTYPE html>
16 <html>
17 @components.Head(title)
18 <body class="px-4 py-12 md:py-20 text-text bg-base">
19 @body
20 </body>
21 </html>
22}