//! Offline-only web UI. Everything the browser needs (HTML, CSS, JS, SVG //! logo) is embedded in the compiled binary via `include_str!` / //! `include_bytes!`. No CDN, no external fonts, no remote images — //! PXEForge renders identically on an air-gapped network. //! //! Layout follows the Netbox Labs pattern: dark left sidebar with primary //! nav, top bar with secondary tabs, card-dense content panels. #![forbid(unsafe_code)] /// Render the top-level page. `base_url` is interpolated into the footer /// so operators can see at a glance what URL clients are PXE-booting from. #[must_use] pub fn index_html(base_url: &str) -> String { INDEX_HTML.replace("{{BASE_URL}}", base_url) } #[must_use] pub fn app_js() -> &'static str { APP_JS } #[must_use] pub fn app_css() -> &'static str { APP_CSS } #[must_use] pub fn logo_svg() -> &'static str { LOGO_SVG } /// Animated forging anvil — sparks rise + glow pulse. Used for the /// imaging-progress widget and any "I'm working" loading state. Pure /// SVG + SMIL, no JS, no GIF. #[must_use] pub fn anvil_forge_svg() -> &'static str { ANVIL_FORGE_SVG } const INDEX_HTML: &str = include_str!("index.html"); const APP_CSS: &str = include_str!("app.css"); const APP_JS: &str = include_str!("app.js"); const LOGO_SVG: &str = include_str!("logo.svg"); const ANVIL_FORGE_SVG: &str = include_str!("anvil-forge.svg");