feat: use tailwind css

This commit is contained in:
2025-11-06 21:36:57 +01:00
parent 3153475bad
commit 8adff6ade2
8 changed files with 315 additions and 294 deletions

View File

@@ -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
}