Initial commit

This commit is contained in:
2026-09-12 23:26:07 +02:00
commit a180fe4b52
35 changed files with 4921 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
// Package web holds the frontend, embedded into the binary. There is no build
// step: the templates and assets are hand-written and shipped as-is.
package web
import (
"embed"
"io/fs"
)
//go:embed templates/*.html
var templatesFS embed.FS
//go:embed static/*
var staticFS embed.FS
// Templates returns the raw template files, rooted at "templates".
func Templates() fs.FS { return templatesFS }
// Static returns the assets to be served under /static/, with the directory
// prefix stripped.
func Static() fs.FS {
sub, err := fs.Sub(staticFS, "static")
if err != nil {
panic(err) // impossible: the directory is embedded above
}
return sub
}