mod views; mod components; use dioxus::prelude::*; use crate::views::editor::dionotes_editor::EditorRoute; use crate::views::workspace_selector::selector::WorkspaceRoute; const FAVICON: Asset = asset!("/assets/favicon.ico"); // Linked individually rather than via @import in a single entry file: asset!() // only emits files it is given by name, so an @import chain would 404 at runtime. // Order matters — tokens, then baseline, then layout, then components. const TAILWIND_CSS: Asset = asset!("/assets/tailwind.css"); const TOKENS_CSS: Asset = asset!("/assets/css/tokens.css"); const BASE_CSS: Asset = asset!("/assets/css/base.css"); const LAYOUT_CSS: Asset = asset!("/assets/css/layout.css"); const COMPONENTS_CSS: Asset = asset!("/assets/css/components.css"); fn main() { launch(App); } #[component] fn App() -> Element { let workspace_selected: Signal = use_signal(|| false); rsx! { document::Link { rel: "icon", href: FAVICON } // Tailwind first: its preflight lives in @layer base, our unlayered // rules win the cascade regardless, but this keeps source order honest. document::Link { rel: "stylesheet", href: TAILWIND_CSS } document::Link { rel: "stylesheet", href: TOKENS_CSS } document::Link { rel: "stylesheet", href: BASE_CSS } document::Link { rel: "stylesheet", href: LAYOUT_CSS } document::Link { rel: "stylesheet", href: COMPONENTS_CSS } if workspace_selected() { Router:: {} } else { Router:: {} } } }