hscontrol: consolidate assets into single package

Move favicon.png, style.css, and headscale.svg to hscontrol/assets/
and create a single assets.go file with all embed directives.

Update hscontrol/handlers.go and hscontrol/templates/general.go to
use the centralized assets package.
This commit is contained in:
Kristoffer Dalby
2025-11-12 14:23:15 +01:00
committed by Kristoffer Dalby
parent 09c9762fe0
commit e3ced80278
5 changed files with 38 additions and 22 deletions

View File

@@ -0,0 +1,24 @@
// Package assets provides embedded static assets for Headscale.
// All static files (favicon, CSS, SVG) are embedded here for
// centralized asset management.
package assets
import (
_ "embed"
)
// Favicon is the embedded favicon.png file served at /favicon.ico
//
//go:embed favicon.png
var Favicon []byte
// CSS is the embedded style.css stylesheet used in HTML templates.
// Contains Material for MkDocs design system styles.
//
//go:embed style.css
var CSS string
// SVG is the embedded headscale.svg logo used in HTML templates.
//
//go:embed headscale.svg
var SVG string