feature: initial commit

This commit is contained in:
Danilo Cesa
2025-06-03 23:19:34 +08:00
parent 0f0d9e3bef
commit 5ea0d31cdb
5 changed files with 18 additions and 825 deletions
+5 -2
View File
@@ -45,10 +45,12 @@ enum Route {
// The macro returns an `Asset` type that will display as the path to the asset in the browser or a local path in desktop bundles.
const FAVICON: Asset = asset!("/assets/favicon.ico");
// The asset macro also minifies some assets like CSS and JS to make bundled smaller
const MAIN_CSS: Asset = asset!("/assets/styling/main.css");
const TAILWIND_CSS: Asset = asset!("/assets/tailwind.css");
const MEDIA_CSS: Asset = asset!("/assets/styling/media.css");
const MAIN_CSS: Asset = asset!("/assets/styling/main.css");
const ICONS_CSS: Asset = asset!("/assets/styling/icons.css");
fn main() {
// The `launch` function is the main entry point for a dioxus app. It takes a component and renders it with the platform feature
// you have enabled
@@ -67,8 +69,9 @@ fn App() -> Element {
// In addition to element and text (which we will see later), rsx can contain other components. In this case,
// we are using the `document::Link` component to add a link to our favicon and main CSS file into the head of our app.
document::Link { rel: "icon", href: FAVICON }
document::Link { rel: "stylesheet", href: MAIN_CSS }
document::Link { rel: "stylesheet", href: TAILWIND_CSS }
document::Link { rel: "stylesheet", href: MEDIA_CSS }
document::Link { rel: "stylesheet", href: MAIN_CSS }
document::Link { rel: "stylesheet", href: ICONS_CSS }
// The router component renders the route enum we defined above. It will handle synchronization of the URL and render