dis: Rework styling and build procedure
This commit is contained in:
parent
1e1d1a3cad
commit
cdc7d69ad9
51 changed files with 1251 additions and 339 deletions
20
internal/component/static/entry.go
Normal file
20
internal/component/static/entry.go
Normal 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))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue