1
0
dwelling-home/web/web.go

26 lines
772 B
Go

package web
import (
"embed"
"io/fs"
"net/http"
)
//go:generate $GOPATH/bin/jade -basedir ./templates -pkg=web -writer index.pug stuff.pug mindflow.pug
//go:generate $GOPATH/bin/jade -basedir ./templates -pkg=web -writer about.pug guestbook.pug rss.pug
//go:generate $GOPATH/bin/jade -basedir ./templates -pkg=web -writer guestbook_admin.pug mindflow_admin.pug
//go:generate $GOPATH/bin/jade -basedir ./templates -pkg=web -writer article.pug privacy.pug
//go:generate $GOPATH/bin/jade -basedir ./templates -pkg=web -writer errorXXX.pug
//go:embed assets
var assetsDir embed.FS
func Assets() http.FileSystem {
f, _ := fs.Sub(assetsDir, "assets")
return http.FS(f)
}
func AssetsGetFile(path string) ([]byte, error) {
return assetsDir.ReadFile("assets/" + path)
}