Update examples, add css
This commit is contained in:
57 files changed
+964
-595
No files matched your search
@@ -1,3 +1,9 @@
|
||||
//! This example shows how to load in custom assets with the use_asset_handler hook.
|
||||
//!
|
||||
//! This hook is currently only available on desktop and allows you to intercept any request made by the webview
|
||||
//! and respond with your own data. You could use this to load in custom videos, streams, stylesheets, images,
|
||||
//! or any asset that isn't known at compile time.
|
||||
|
||||
use dioxus::desktop::{use_asset_handler, wry::http::Response};
|
||||
use dioxus::prelude::*;
|
||||
|
||||
@@ -16,8 +22,8 @@ fn app() -> Element {
|
||||
});
|
||||
|
||||
rsx! {
|
||||
div {
|
||||
img { src: "/logos/logo.png" }
|
||||
}
|
||||
style { {include_str!("./assets/custom_assets.css")} }
|
||||
h1 { "Dynamic Assets" }
|
||||
img { src: "/logos/logo.png" }
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user