38 lines
1.2 KiB
Rust
38 lines
1.2 KiB
Rust
use dioxus::prelude::*;
|
|
|
|
const FAVICON: Asset = asset!("/assets/favicon.ico");
|
|
const MAIN_CSS: Asset = asset!("/assets/main.css");
|
|
const HEADER_SVG: Asset = asset!("/assets/header.svg");
|
|
|
|
fn main() {
|
|
dioxus::launch(App);
|
|
}
|
|
|
|
#[component]
|
|
fn App() -> Element {
|
|
rsx! {
|
|
document::Link { rel: "icon", href: FAVICON }
|
|
document::Link { rel: "stylesheet", href: MAIN_CSS }
|
|
Hero {}
|
|
|
|
}
|
|
}
|
|
|
|
#[component]
|
|
pub fn Hero() -> Element {
|
|
rsx! {
|
|
div {
|
|
id: "hero",
|
|
img { src: HEADER_SVG, id: "header" }
|
|
div { id: "links",
|
|
a { href: "https://dioxuslabs.com/learn/0.7/", "📚 Learn Dioxus" }
|
|
a { href: "https://dioxuslabs.com/awesome", "🚀 Awesome Dioxus" }
|
|
a { href: "https://github.com/dioxus-community/", "📡 Community Libraries" }
|
|
a { href: "https://github.com/DioxusLabs/sdk", "⚙️ Dioxus Development Kit" }
|
|
a { href: "https://marketplace.visualstudio.com/items?itemName=DioxusLabs.dioxus", "💫 VSCode Extension" }
|
|
a { href: "https://discord.gg/XgGxMSkvUM", "👋 Community Discord" }
|
|
}
|
|
}
|
|
}
|
|
}
|