feat: use tailwind css
This commit is contained in:
@@ -15,9 +15,13 @@ var htmlTemplate string
|
||||
//go:embed assets/style.css
|
||||
var style template.CSS
|
||||
|
||||
//go:embed assets/tailwind.js
|
||||
var tailwind template.JS
|
||||
|
||||
type tmpler struct {
|
||||
Report
|
||||
Style template.CSS
|
||||
Tailwind template.JS
|
||||
Style template.CSS
|
||||
}
|
||||
|
||||
func (r Report) ToHTML() (html string, err error) {
|
||||
@@ -33,7 +37,7 @@ func (r Report) ToHTML() (html string, err error) {
|
||||
|
||||
buf := new(bytes.Buffer)
|
||||
|
||||
err = tmpl.Execute(buf, tmpler{r, style})
|
||||
err = tmpl.Execute(buf, tmpler{r, tailwind, style})
|
||||
if err != nil {
|
||||
return html, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user