intake/web/html/html.go

24 lines
396 B
Go
Raw Normal View History

2025-01-24 00:18:41 +00:00
package html
import (
"embed"
"html/template"
"io"
)
2025-01-24 15:15:54 +00:00
//go:embed intake.css
var Stylesheet []byte
2025-01-24 00:18:41 +00:00
//go:embed *.html
var templates embed.FS
func load(file string) *template.Template {
return template.Must(template.New("layout.html").ParseFS(templates, "layout.html", file))
}
var home = load("home.html")
func Home(writer io.Writer, data any) error {
return home.Execute(writer, data)
}