Update examples, add css
This commit is contained in:
57 files changed
+964
-595
No files matched your search
@@ -1,3 +1,10 @@
|
||||
//! A simple example on how to use assets loading from the filesystem.
|
||||
//!
|
||||
//! If the feature "collect-assets" is enabled, the assets will be collected via the dioxus CLI and embedded into the
|
||||
//! final bundle. This lets you do various useful things like minify, compress, and optimize your assets.
|
||||
//!
|
||||
//! We can still use assets without the CLI middleware, but generally larger apps will benefit from it.
|
||||
|
||||
use dioxus::prelude::*;
|
||||
|
||||
#[cfg(not(feature = "collect-assets"))]
|
||||
@@ -14,7 +21,7 @@ fn main() {
|
||||
fn app() -> Element {
|
||||
rsx! {
|
||||
div {
|
||||
p { "This should show an image:" }
|
||||
h1 { "This should show an image:" }
|
||||
img { src: ASSET_PATH.to_string() }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user