feat(loading_page): move loading page css to style.css and serve as static asset

This commit is contained in:
yusing
2025-11-06 20:32:40 +08:00
parent ef893974ea
commit d57d76dc65
4 changed files with 108 additions and 104 deletions

View File

@@ -3,7 +3,7 @@ package idlewatcher
import (
"bytes"
_ "embed"
"text/template"
"html/template"
"github.com/yusing/goutils/http/httpheaders"
)
@@ -18,6 +18,9 @@ type templateData struct {
var loadingPage []byte
var loadingPageTmpl = template.Must(template.New("loading_page").Parse(string(loadingPage)))
//go:embed html/style.css
var cssBytes []byte
func (w *Watcher) makeLoadingPageBody() []byte {
msg := w.cfg.ContainerName() + " is starting..."