Create a complete braindump note-taking application with Dioxus 0.7 featuring: - Note capture with title, content, and tags - Full CRUD operations (create, read, update, delete) - Search functionality for notes - Tag-based filtering - Note pinning for quick access - Modern dark theme with purple accents - Responsive sidebar layout - Clean card-based note list - Full-text editor with auto-save hint Implemented with: - Dioxus 0.7.1 fullstack for reactive UI and server functions - Workspace pattern with shared API crate - In-memory storage using LazyLock - Server functions for note management All core features working and ready for testing.
31 lines
754 B
Rust
31 lines
754 B
Rust
use crate::Route;
|
|
use dioxus::prelude::*;
|
|
|
|
const BLOG_CSS: Asset = asset!("/assets/blog.css");
|
|
|
|
#[component]
|
|
pub fn Blog(id: i32) -> Element {
|
|
rsx! {
|
|
document::Link { rel: "stylesheet", href: BLOG_CSS}
|
|
|
|
div {
|
|
id: "blog",
|
|
|
|
// Content
|
|
h1 { "This is blog #{id}!" }
|
|
p { "In blog #{id}, we show how the Dioxus router works and how URL parameters can be passed as props to our route components." }
|
|
|
|
// Navigation links
|
|
Link {
|
|
to: Route::Blog { id: id - 1 },
|
|
"Previous"
|
|
}
|
|
span { " <---> " }
|
|
Link {
|
|
to: Route::Blog { id: id + 1 },
|
|
"Next"
|
|
}
|
|
}
|
|
}
|
|
}
|