Skip to content

Commit

Permalink
use style.css for loader css styling
Browse files Browse the repository at this point in the history
  • Loading branch information
richardjennings committed Apr 28, 2024
1 parent 061e683 commit 74d4f02
Show file tree
Hide file tree
Showing 6 changed files with 429 additions and 4 deletions.
7 changes: 5 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ var indexTemplate string
//go:embed dist/main.js
var loaderJs string

//go:embed dist/style.css
var loaderCss string

//go:embed example/index.html
var exampleHtml []byte

Expand All @@ -26,7 +29,7 @@ var exampleJs []byte

func main() {
key := os.Args[1]
htmlEnc, err := precrypt.Encrypt(exampleHtml, []byte(key));
htmlEnc, err := precrypt.Encrypt(exampleHtml, []byte(key))
e(err)
cssEnc, err := precrypt.Encrypt(exampleCss, []byte(key))
e(err)
Expand All @@ -39,7 +42,7 @@ func main() {
"c": []string{string(jsEnc)},
})
e(err)
err = tmpl.Execute(os.Stdout, map[string]interface{}{"data": string(data), "js": string(loaderJs)})
err = tmpl.Execute(os.Stdout, map[string]interface{}{"data": string(data), "js": loaderJs, "css": loaderCss})
e(err)
}

Expand Down
Loading

0 comments on commit 74d4f02

Please sign in to comment.