initial commit from original sev version
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package web
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"io/fs"
|
||||
)
|
||||
|
||||
// Templates contains all server-rendered HTML templates.
|
||||
//
|
||||
//go:embed templates/index.html
|
||||
var Templates embed.FS
|
||||
|
||||
// Assets contains every browser asset needed by the POC page.
|
||||
// The production binary serves these files from memory, so the server does not
|
||||
// depend on a static/ directory beside the executable.
|
||||
//
|
||||
//go:embed static/* static/css/* static/js/* favicon.ico
|
||||
var Assets embed.FS
|
||||
|
||||
func StaticFS() (fs.FS, error) {
|
||||
return fs.Sub(Assets, "static")
|
||||
}
|
||||
|
||||
func Favicon() ([]byte, error) {
|
||||
return Assets.ReadFile("favicon.ico")
|
||||
}
|
||||
Reference in New Issue
Block a user