Use head elements and new manganis syntax in examples (#2688)

* use head elements and new manganis syntax in examples
* only enable desktop workspace example scraping during a dioxus release

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
This commit is contained in:
Evan AlmloffandJonathan Kelley authored and GitHub committed 2024-07-25 21:58:00 +00:00
1 parent bd58a92441
commit c6a2e5b6c8
31 files changed
+379 -374

No files matched your search

+2 -20
View File
@@ -9,26 +9,7 @@ use std::rc::Rc;
use dioxus::{html::geometry::euclid::Rect, prelude::*};
fn main() {
LaunchBuilder::desktop()
.with_cfg(
dioxus::desktop::Config::default().with_custom_head(
r#"
<style type="text/css">
html, body {
height: 100%;
width: 100%;
margin: 0;
}
#main {
height: 100%;
width: 100%;
}
</style>
"#
.to_owned(),
),
)
.launch(app);
launch(app);
}
fn app() -> Element {
@@ -47,6 +28,7 @@ fn app() -> Element {
};
rsx!(
head::Link { rel: "stylesheet", href: asset!("./examples/assets/read_size.css") }
div {
width: "50%",
height: "50%",