dis: Rework styling and build procedure

This commit is contained in:
Tom Wiesing 2022-10-14 16:48:12 +02:00
parent 1e1d1a3cad
commit cdc7d69ad9
No known key found for this signature in database
51 changed files with 1251 additions and 339 deletions

View file

@ -0,0 +1,20 @@
package static
import (
"bytes"
"github.com/FAU-CDI/wisski-distillery/pkg/resources"
)
var EntryHome = mustParseResources("dist/home/index.html")
var EntryControlIndex = mustParseResources("dist/control/index.html")
var EntryControlInstance = mustParseResources("dist/control/instance.html")
// mustParseResources loads the resources from the provided files or panic()s
func mustParseResources(path string) resources.Resources {
data, err := distStaticFS.ReadFile(path)
if err != nil {
panic("mustParseResources: Unable to open " + path)
}
return resources.Parse(bytes.NewReader(data))
}