diff --git a/web/fup/fupstatic/fupstatic.go b/web/fup/fupstatic/fupstatic.go new file mode 100644 index 0000000000..0a96865308 --- /dev/null +++ b/web/fup/fupstatic/fupstatic.go @@ -0,0 +1,23 @@ +package fupstatic + +import ( + "embed" + "io/fs" +) + +//go:embed css js +var static embed.FS + +var Static fs.FS = newStaticFS(static) + +//go:embed tmpl +var templates embed.FS + +var Templates fs.FS = must(fs.Sub(templates, "tmpl")) + +func must(fsys fs.FS, err error) fs.FS { + if err != nil { + panic(err) + } + return fsys +}