24 lines
396 B
Go
24 lines
396 B
Go
package html
|
|
|
|
import (
|
|
"embed"
|
|
"html/template"
|
|
"io"
|
|
)
|
|
|
|
//go:embed intake.css
|
|
var Stylesheet []byte
|
|
|
|
//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)
|
|
}
|