b073cc474d
- Vendor Plus Jakarta Sans + JetBrains Mono as variable woff2 (latin + latin-ext) under internal/web/static/fonts/, embedded via go:embed and served at /static/fonts/ (font/woff2, immutable cache). Google Fonts @import replaced with @font-face rules preserving unicode-range — removes the CDN dependency that silently broke on offline nodes. - Add templates/icons.html: vendored Lucide sprite (30 icons, symbol ids i-<name>), included at the top of <body> in layout.html. - Fix setup wizard handleCSS: serve the embedded web.StyleCSS() instead of a dataDir-derived filesystem path that never exists in the container (production setup silently served minimalCSS). Fallback to minimalCSS only if the embedded read errors, with a WARN log. - Tests: font route + StyleCSS accessor (web), Scenario E embedded-CSS test (setup; red-proven against the pre-fix handler).
20 lines
487 B
Go
20 lines
487 B
Go
package web
|
|
|
|
import "embed"
|
|
|
|
//go:embed templates/*.html templates/*.css
|
|
var templateFS embed.FS
|
|
|
|
//go:embed static/chart.min.js
|
|
var chartJS []byte
|
|
|
|
//go:embed static/fonts/*.woff2
|
|
var fontFS embed.FS
|
|
|
|
// StyleCSS returns the embedded dashboard stylesheet. Exported so the setup
|
|
// wizard can serve the same CSS instead of reading a filesystem path that
|
|
// does not exist inside the container image.
|
|
func StyleCSS() ([]byte, error) {
|
|
return templateFS.ReadFile("templates/style.css")
|
|
}
|