cmd/pkgserver: flatten static site
Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -2,9 +2,20 @@
|
||||
|
||||
package ui
|
||||
|
||||
import "embed"
|
||||
import (
|
||||
"embed"
|
||||
"io/fs"
|
||||
)
|
||||
|
||||
//go:generate tsc
|
||||
//go:generate cp index.html style.css static
|
||||
//go:embed static
|
||||
var content embed.FS
|
||||
var _static embed.FS
|
||||
|
||||
var static = func() fs.FS {
|
||||
if f, err := fs.Sub(_static, "static"); err != nil {
|
||||
panic(err)
|
||||
} else {
|
||||
return f
|
||||
}
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user