2025-08-24 00:19:00 +02:00
|
|
|
// Package assets provides embedded static web assets for the SkyView application.
|
2025-08-24 10:29:25 +02:00
|
|
|
//
|
|
|
|
|
// This package uses Go 1.16+ embed functionality to include all static web files
|
|
|
|
|
// directly in the compiled binary, eliminating the need for external file dependencies
|
|
|
|
|
// at runtime. The embedded assets include:
|
|
|
|
|
// - index.html: Main web interface with aircraft tracking map
|
|
|
|
|
// - css/style.css: Styling for the web interface
|
|
|
|
|
// - js/app.js: JavaScript client for WebSocket communication and map rendering
|
2025-08-24 18:36:14 +02:00
|
|
|
// - icons/*.svg: Type-specific SVG icons for aircraft markers
|
2025-08-24 10:29:25 +02:00
|
|
|
// - favicon.ico: Browser icon
|
|
|
|
|
//
|
|
|
|
|
// The embedded filesystem is used by the HTTP server to serve static content
|
|
|
|
|
// and enables single-binary deployment without external asset dependencies.
|
2025-08-24 00:19:00 +02:00
|
|
|
package assets
|
|
|
|
|
|
|
|
|
|
import "embed"
|
|
|
|
|
|
2025-08-24 10:29:25 +02:00
|
|
|
// Static contains all embedded static web assets from the static/ directory.
|
2025-08-24 18:36:14 +02:00
|
|
|
//
|
2025-08-24 10:29:25 +02:00
|
|
|
// Files are embedded at build time and can be accessed using the standard
|
|
|
|
|
// fs.FS interface. Path names within the embedded filesystem preserve the
|
|
|
|
|
// directory structure, so files are accessed as:
|
2025-08-24 18:36:14 +02:00
|
|
|
// - "static/index.html"
|
2025-08-24 10:29:25 +02:00
|
|
|
// - "static/css/style.css"
|
|
|
|
|
// - "static/js/app.js"
|
|
|
|
|
// - etc.
|
|
|
|
|
//
|
|
|
|
|
// This approach ensures the web interface is always available without requiring
|
|
|
|
|
// external file deployment or complicated asset management.
|
2025-08-24 00:57:49 +02:00
|
|
|
//
|
2025-08-31 19:43:58 +02:00
|
|
|
// Updated to include database.html for database status page
|
2025-09-01 10:05:29 +02:00
|
|
|
//
|
2025-08-24 00:57:49 +02:00
|
|
|
//go:embed static
|
2025-08-24 10:29:25 +02:00
|
|
|
var Static embed.FS
|