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:
parent
09c9762fe0
commit
e3ced80278
5 changed files with 38 additions and 22 deletions
24
hscontrol/assets/assets.go
Normal file
24
hscontrol/assets/assets.go
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue