Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move the document trait into a separate crate #3035

Merged
merged 154 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
fac7ee6
wip: fix manganis import path
jkelleyrtp Aug 3, 2024
d263e40
upgrade tauri bundler, convert todo!() to unimplemented!()
jkelleyrtp Aug 3, 2024
9d0ae13
NO MORE CACHE THRASH PLEASE
jkelleyrtp Aug 3, 2024
249c51b
wip: rip out old asset protocol api
jkelleyrtp Aug 6, 2024
25faa07
use dif path
jkelleyrtp Aug 7, 2024
23495f3
change lock
jkelleyrtp Aug 9, 2024
4e4f950
Merge branch 'main' into jk/proper-asset-crossplatform
jkelleyrtp Aug 9, 2024
26046d5
feat: mobile hotreloading + ios asset configuration
jkelleyrtp Aug 9, 2024
340102c
lockfile...
jkelleyrtp Aug 17, 2024
b1e35a3
Merge branch 'main' into jk/proper-asset-crossplatform
jkelleyrtp Aug 17, 2024
e90fe83
remove oid demo and its associated env vars
jkelleyrtp Aug 17, 2024
b661c3d
nuke all the things that cause cache thrashing
jkelleyrtp Aug 17, 2024
aa047a6
shrink the diff
jkelleyrtp Aug 17, 2024
4940849
swap to Asset type
jkelleyrtp Aug 17, 2024
8db5d77
add some more logs
jkelleyrtp Aug 17, 2024
fa6651b
bump versions
jkelleyrtp Aug 17, 2024
9db4eb6
... screw it, bring in manganis
jkelleyrtp Aug 17, 2024
547c860
temp no basepath
jkelleyrtp Aug 17, 2024
e664a38
display impl for attrvalue
jkelleyrtp Aug 17, 2024
d2ea92d
dont panic on collect failure
jkelleyrtp Aug 17, 2024
b6a1527
cut down web deps to 150
jkelleyrtp Aug 17, 2024
34082dc
clean up deps in a lot of places, simplify build scripts
jkelleyrtp Aug 18, 2024
a853514
clean up asset resolution and cli-dev profile
jkelleyrtp Aug 19, 2024
38594e9
wire up absolute paths for manganis asset in a particular mode
jkelleyrtp Aug 19, 2024
4485c64
move document related things around to shorten compile times
jkelleyrtp Aug 21, 2024
80dbb49
move most things to `document::Item` and then decompose the cli-config
jkelleyrtp Aug 22, 2024
deb0df3
switch link to stylesheet for clarity in examples
jkelleyrtp Aug 22, 2024
6829d90
untangle another serialize struct
jkelleyrtp Aug 22, 2024
56b03c3
move manganis workspace example to examples folder
jkelleyrtp Aug 22, 2024
37642f7
decompose manganis-cli-support
jkelleyrtp Aug 22, 2024
c3896da
dont need mobile demo anymore
jkelleyrtp Aug 22, 2024
3346861
simplify some things, drop some crates
jkelleyrtp Aug 22, 2024
3e1c05c
remove gloo dialogs
jkelleyrtp Aug 22, 2024
170bc6b
html doesnt need document
jkelleyrtp Aug 22, 2024
76ef0bd
rename hotreload to devtools
jkelleyrtp Aug 22, 2024
9acbb4d
rename hotreload to devtools
jkelleyrtp Aug 22, 2024
1860611
really clean up the html crate
jkelleyrtp Aug 22, 2024
8a52fdd
fix weird rsx spacing
jkelleyrtp Aug 22, 2024
92f2f62
refactor document a bit
jkelleyrtp Aug 22, 2024
a1b361a
wip: remove query
jkelleyrtp Aug 22, 2024
2d10ba2
wip: work on assets
jkelleyrtp Aug 22, 2024
bc1c574
merge main
jkelleyrtp Aug 22, 2024
a0f51d5
clean up desktop to use callback
jkelleyrtp Aug 22, 2024
6533740
clean up document a bit
jkelleyrtp Aug 22, 2024
97292fb
things compile again :)
jkelleyrtp Aug 22, 2024
3b47bf7
re-wire up devsocket
jkelleyrtp Aug 22, 2024
6f5dcea
fix utf css
jkelleyrtp Aug 22, 2024
294de5f
yeeeet that js out of here
jkelleyrtp Aug 22, 2024
d85d3fa
synthetic web system works
jkelleyrtp Aug 22, 2024
6101b52
web crate almost done being cleaned up
jkelleyrtp Aug 22, 2024
0da7ea5
desktop mostly cleaned up too
jkelleyrtp Aug 22, 2024
c0fe097
clean up cli a bit
jkelleyrtp Aug 22, 2024
5261e24
more cli cleanup
jkelleyrtp Aug 22, 2024
12fa005
cli builds again
jkelleyrtp Aug 22, 2024
dc68704
clean up cli, inline structs, cut down number of unique types where p…
jkelleyrtp Aug 23, 2024
76b04ed
hotreload works again for desktop and this time, mobile too
jkelleyrtp Aug 23, 2024
f3fc792
cfg out tungstenite
jkelleyrtp Aug 23, 2024
daf235b
devserver err
jkelleyrtp Aug 23, 2024
2d5ae42
Merge branch 'main' into jk/proper-asset-crossplatform
jkelleyrtp Aug 23, 2024
12f3ae6
more refactor to cli builder
jkelleyrtp Sep 1, 2024
67eb0c3
switch to unbounded_send
jkelleyrtp Sep 2, 2024
629aaf3
wip
jkelleyrtp Sep 2, 2024
7648b83
add comment
jkelleyrtp Sep 2, 2024
4b65c36
new structure is much cleaner
jkelleyrtp Sep 4, 2024
d843884
bit more cleanup
jkelleyrtp Sep 4, 2024
778b5ec
add http serve subcommand
jkelleyrtp Sep 5, 2024
49849f8
bundled hotreload
jkelleyrtp Sep 5, 2024
c340834
kick stylsheets
jkelleyrtp Sep 5, 2024
c3bf9ee
clean up a bit more, split up eventloop
jkelleyrtp Sep 5, 2024
221b84f
Clean up stdout joiner
jkelleyrtp Sep 5, 2024
ce4339b
amazingly serve seems done
jkelleyrtp Sep 5, 2024
61b47b4
lil bit more cleanup
jkelleyrtp Sep 5, 2024
59fe248
change from pub to pub(crate) in cli
jkelleyrtp Sep 5, 2024
f872d7e
remove tools
jkelleyrtp Sep 5, 2024
b9ea5cd
bit more polish to cli
jkelleyrtp Sep 5, 2024
32ff7c4
fix issue with join
jkelleyrtp Sep 5, 2024
8f94523
fix fullstack
jkelleyrtp Sep 5, 2024
fc07bf5
gracefully handle fullstack without a server
jkelleyrtp Sep 5, 2024
01d8863
fullstack mobile demo
jkelleyrtp Sep 5, 2024
e7ff878
fix launch function, move projects into example-projects folder
jkelleyrtp Sep 5, 2024
17456e6
hoist examples
jkelleyrtp Sep 5, 2024
bb46819
add "run" command
jkelleyrtp Sep 5, 2024
c413934
fix some path issues
jkelleyrtp Sep 5, 2024
962eb06
clean up launch
jkelleyrtp Sep 5, 2024
374dd43
remove old manual websocket receiver
jkelleyrtp Sep 5, 2024
e9e409b
doctor command
jkelleyrtp Sep 5, 2024
d411ec9
allow desktop to scroll
jkelleyrtp Sep 5, 2024
7812621
cut apart router crate
jkelleyrtp Sep 6, 2024
39095bf
fix cargotoml
jkelleyrtp Sep 6, 2024
84b4d73
dont put launch in prelude
jkelleyrtp Sep 6, 2024
66dd2cf
use dioxus::launch where possible
jkelleyrtp Sep 6, 2024
80c88ea
remove random latent command chars
jkelleyrtp Sep 6, 2024
fc2289b
fix a few more uses of launch
jkelleyrtp Sep 6, 2024
f3e3a4f
it all compiles again...
jkelleyrtp Sep 6, 2024
8320a3e
rename pwa
jkelleyrtp Sep 6, 2024
34dd5af
pull out router
jkelleyrtp Sep 6, 2024
528a94c
cut out hotreload from rsx
jkelleyrtp Sep 6, 2024
fdad091
kill out commented code
jkelleyrtp Sep 6, 2024
e2342be
rename rsx, cut out hotreload tests
jkelleyrtp Sep 6, 2024
9a356ac
Hoist more dependencies
jkelleyrtp Sep 12, 2024
00c461a
rename method
jkelleyrtp Sep 12, 2024
8f07c4a
Merge branch 'main' into jk/proper-asset-crossplatform
jkelleyrtp Sep 13, 2024
ff32f46
add log
jkelleyrtp Sep 13, 2024
8284ee8
comment out, fix merge conflict
jkelleyrtp Sep 13, 2024
15dc656
compiles again
jkelleyrtp Sep 13, 2024
224d30e
oh damn it launches
jkelleyrtp Sep 13, 2024
ba09427
fix dioxus compile
jkelleyrtp Sep 13, 2024
dbe6634
hmm
jkelleyrtp Sep 13, 2024
eb8ec92
Merge branch 'main' into jk/proper-asset-crossplatform
jkelleyrtp Sep 13, 2024
afcb52c
remove liveview project
jkelleyrtp Sep 13, 2024
a858c95
bump native
jkelleyrtp Sep 14, 2024
35297b4
Merge branch 'main' into jk/proper-asset-crossplatform
jkelleyrtp Sep 15, 2024
30992f8
drop example-projects change
jkelleyrtp Sep 16, 2024
a1468c0
drop changes to examples
jkelleyrtp Sep 16, 2024
611bad0
drop changes to examples
jkelleyrtp Sep 16, 2024
a130b81
revert changes to examples
jkelleyrtp Sep 16, 2024
356b487
revert changes to examples
jkelleyrtp Sep 16, 2024
6d31561
revert changes to examples
jkelleyrtp Sep 16, 2024
61ca1b2
no need to change .cargo
jkelleyrtp Sep 16, 2024
0b1e13b
small cleanup, revert some changes
jkelleyrtp Sep 16, 2024
5311693
undo launch changes
jkelleyrtp Sep 16, 2024
b934933
dont nuke fullstack examples
jkelleyrtp Sep 16, 2024
dc3a5eb
dont move random line
jkelleyrtp Sep 16, 2024
e407464
Merge branch 'main' into jk/proper-asset-crossplatform
jkelleyrtp Sep 16, 2024
6136001
Merge branch 'main' into jk/proper-asset-crossplatform
jkelleyrtp Sep 16, 2024
0014322
Merge branch 'main' into jk/proper-asset-crossplatform
jkelleyrtp Sep 16, 2024
efa1701
drop random change
jkelleyrtp Sep 16, 2024
5b6897a
fix another stray
jkelleyrtp Sep 16, 2024
9bad01a
Merge branch 'main' into jk/proper-asset-crossplatform
jkelleyrtp Sep 16, 2024
1e51ec9
Merge branch 'main' into jk/proper-asset-crossplatform
jkelleyrtp Sep 17, 2024
ac5b01d
revert changes from cli/dev refactor
jkelleyrtp Sep 17, 2024
da7d931
remove native and web features from dioxus-html
ealmloff Sep 26, 2024
fe31b6e
Fix downcasting web events
ealmloff Sep 26, 2024
1d5ec2a
Fix desktop with tokio disabled
ealmloff Sep 26, 2024
90e2c8c
clean up the git diff a bit
ealmloff Sep 26, 2024
955a165
Merge branch 'jk/extract-document' into move-file-engine-renderers
ealmloff Sep 26, 2024
132d155
Revert all changes outside the document crate
ealmloff Sep 30, 2024
0a635a1
move more of the head element logic into the new crate
ealmloff Oct 4, 2024
c10c8a7
Merge branch 'main' into document-trait-crate
ealmloff Oct 4, 2024
7da7ba1
merge latest bug fixes into the new head components
ealmloff Oct 4, 2024
3a68c08
add a default head method through eval
ealmloff Oct 4, 2024
8721014
move over eval logic
ealmloff Oct 4, 2024
584d9fe
revert a few unrelated changes
ealmloff Oct 7, 2024
e26058f
remove the old document trait
ealmloff Oct 7, 2024
af4dfc7
implement document for each platform
ealmloff Oct 7, 2024
cc7956e
Update remaining examples
ealmloff Oct 7, 2024
4013682
Fix tests
ealmloff Oct 7, 2024
5595050
Fix desktop crate doc tests
ealmloff Oct 7, 2024
3a848d2
more doc test fixes
ealmloff Oct 7, 2024
467764c
even more doc test fixes
ealmloff Oct 8, 2024
b428271
Merge branch 'main' into document-trait-crate
jkelleyrtp Oct 14, 2024
b0edbe6
regen hash
jkelleyrtp Oct 14, 2024
2e2eff5
fix merge conflicts
jkelleyrtp Oct 14, 2024
c5a4408
fix document imports, add comments for assets
jkelleyrtp Oct 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 25 additions & 23 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
[workspace]
resolver = "2"
members = [
"packages/dioxus",
"packages/dioxus-lib",
"packages/core",
"packages/core-types",
"packages/cli",
"packages/autofmt",
"packages/check",
"packages/cli-config",
"packages/core-macro",
"packages/cli",
"packages/config-macro",
"packages/router-macro",
"packages/core-macro",
"packages/core-types",
"packages/core",
"packages/desktop",
"packages/devtools-types",
"packages/devtools",
"packages/dioxus-lib",
"packages/dioxus",
"packages/document",
"packages/extension",
"packages/router",
"packages/html",
"packages/html-internal-macro",
"packages/fullstack",
"packages/generational-box",
"packages/hooks",
"packages/web",
"packages/ssr",
"packages/desktop",
"packages/mobile",
"packages/html-internal-macro",
"packages/html",
"packages/interpreter",
"packages/lazy-js-bundle",
"packages/liveview",
"packages/autofmt",
"packages/check",
"packages/rsx",
"packages/mobile",
"packages/router-macro",
"packages/router",
"packages/rsx-hotreload",
"packages/rsx-rosetta",
"packages/generational-box",
"packages/signals",
"packages/devtools",
"packages/devtools-types",
"packages/fullstack",
"packages/rsx",
"packages/server-macro",
"packages/signals",
"packages/ssr",
"packages/static-generation",
"packages/lazy-js-bundle",
"packages/web",

# Full project examples
"example-projects/fullstack-hackernews",
Expand Down Expand Up @@ -76,6 +77,7 @@ dioxus-core-macro = { path = "packages/core-macro", version = "0.6.0-alpha.0" }
dioxus-config-macro = { path = "packages/config-macro", version = "0.6.0-alpha.0" }
dioxus-router = { path = "packages/router", version = "0.6.0-alpha.0" }
dioxus-router-macro = { path = "packages/router-macro", version = "0.6.0-alpha.0" }
dioxus-document = { path = "packages/document", version = "0.6.0-alpha.0", default-features = false }
dioxus-html = { path = "packages/html", version = "0.6.0-alpha.0", default-features = false }
dioxus-html-internal-macro = { path = "packages/html-internal-macro", version = "0.6.0-alpha.0" }
dioxus-hooks = { path = "packages/hooks", version = "0.6.0-alpha.0" }
Expand Down
2 changes: 1 addition & 1 deletion example-projects/ecommerce-site/src/components/loading.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use dioxus::prelude::*;
#[component]
pub(crate) fn ChildrenOrLoading(children: Element) -> Element {
rsx! {
head::Link {
document::Link {
rel: "stylesheet",
href: asset!("./public/loading.css")
}
Expand Down
2 changes: 1 addition & 1 deletion example-projects/ecommerce-site/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ mod api;
fn main() {
dioxus::launch(|| {
rsx! {
head::Link {
document::Link {
rel: "stylesheet",
href: asset!("./public/tailwind.css")
}
Expand Down
4 changes: 2 additions & 2 deletions example-projects/file-explorer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ fn app() -> Element {
let mut files = use_signal(Files::new);

rsx! {
head::Link {
document::Link {
rel: "stylesheet",
href: asset!("./assets/fileexplorer.css")
}
div {
head::Link { href: "https://fonts.googleapis.com/icon?family=Material+Icons", rel: "stylesheet" }
document::Link { href: "https://fonts.googleapis.com/icon?family=Material+Icons", rel: "stylesheet" }
header {
i { class: "material-icons icon-menu", "menu" }
h1 { "Files: " {files.read().current()} }
Expand Down
2 changes: 1 addition & 1 deletion example-projects/fullstack-hackernews/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub fn App() -> Element {
#[component]
fn Homepage(story: ReadOnlySignal<PreviewState>) -> Element {
rsx! {
head::Link { rel: "stylesheet", href: asset!("./assets/hackernews.css") }
document::Link { rel: "stylesheet", href: asset!("./assets/hackernews.css") }
div { display: "flex", flex_direction: "row", width: "100%",
div {
width: "50%",
Expand Down
2 changes: 1 addition & 1 deletion examples/all_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn app() -> Element {
};

rsx! {
head::Link { rel: "stylesheet", href: STYLE }
document::Link { rel: "stylesheet", href: STYLE }
div { id: "container",
// focusing is necessary to catch keyboard events
div { id: "receiver", tabindex: 0,
Expand Down
2 changes: 1 addition & 1 deletion examples/calculator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ fn app() -> Element {
};

rsx! {
head::Link { rel: "stylesheet", href: STYLE }
document::Link { rel: "stylesheet", href: STYLE }
div { id: "wrapper",
div { class: "app",
div { class: "calculator", tabindex: "0", onkeydown: handle_key_down_event,
Expand Down
2 changes: 1 addition & 1 deletion examples/calculator_mutable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fn app() -> Element {
let mut state = use_signal(Calculator::new);

rsx! {
head::Link { rel: "stylesheet", href: asset!("./examples/assets/calculator.css") }
document::Link { rel: "stylesheet", href: asset!("./examples/assets/calculator.css") }
div { id: "wrapper",
div { class: "app",
div {
Expand Down
2 changes: 1 addition & 1 deletion examples/clock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fn app() -> Element {
);

rsx! {
head::Link { rel: "stylesheet", href: STYLE }
document::Link { rel: "stylesheet", href: STYLE }
div { id: "app",
div { id: "title", "Carpe diem 🎉" }
div { id: "clock-display", "{time}" }
Expand Down
2 changes: 1 addition & 1 deletion examples/control_focus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fn app() -> Element {
});

rsx! {
head::Link { rel: "stylesheet", href: STYLE }
document::Link { rel: "stylesheet", href: STYLE }
h1 { "Input Roulette" }
button { onclick: move |_| running.toggle(), "Toggle roulette" }
div { id: "roulette-grid",
Expand Down
2 changes: 1 addition & 1 deletion examples/counters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fn app() -> Element {
let sum = use_memo(move || counters.read().iter().copied().sum::<i32>());

rsx! {
head::Link { rel: "stylesheet", href: STYLE }
document::Link { rel: "stylesheet", href: STYLE }

div { id: "controls",
button { onclick: move |_| counters.write().push(0), "Add counter" }
Expand Down
4 changes: 2 additions & 2 deletions examples/crm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ fn main() {
}))
.launch(|| {
rsx! {
head::Link {
document::Link {
rel: "stylesheet",
href: asset!("https://unpkg.com/[email protected]/build/pure-min.css"),
integrity: "sha384-Uu6IeWbM+gzNVXJcM9XV3SohHtmWE+3VGi496jvgX1jyvDTXfdK+rfZc8C1Aehk5",
crossorigin: "anonymous"
}
head::Link { rel: "stylesheet", href: asset!("./examples/assets/crm.css") }
document::Link { rel: "stylesheet", href: asset!("./examples/assets/crm.css") }
h1 { "Dioxus CRM Example" }
Router::<Route> {}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/dynamic_asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fn app() -> Element {
});

rsx! {
head::Link { rel: "stylesheet", href: STYLE }
document::Link { rel: "stylesheet", href: STYLE }
h1 { "Dynamic Assets" }
img { src: "/logos/logo.png" }
}
Expand Down
6 changes: 3 additions & 3 deletions examples/eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fn app() -> Element {
// The `eval` is available in the prelude - and simply takes a block of JS.
// Dioxus' eval is interesting since it allows sending messages to and from the JS code using the `await dioxus.recv()`
// builtin function. This allows you to create a two-way communication channel between Rust and JS.
let mut eval = eval(
let mut eval = document::eval(
r#"
dioxus.send("Hi from JS!");
let msg = await dioxus.recv();
Expand All @@ -29,10 +29,10 @@ fn app() -> Element {
);

// Send a message to the JS code.
eval.send("Hi from Rust!".into()).unwrap();
eval.send("Hi from Rust!").unwrap();

// Our line on the JS side will log the message and then return "hello world".
let res = eval.recv().await.unwrap();
let res: String = eval.recv().await.unwrap();

// This will print "Hi from JS!" and "Hi from Rust!".
println!("{:?}", eval.await);
Expand Down
2 changes: 1 addition & 1 deletion examples/file_upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fn app() -> Element {
};

rsx! {
head::Link { rel: "stylesheet", href: STYLE }
document::Link { rel: "stylesheet", href: STYLE }

h1 { "File Upload Example" }
p { "Drop a .txt, .rs, or .js file here to read it" }
Expand Down
2 changes: 1 addition & 1 deletion examples/flat_router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const STYLE: &str = asset!("./examples/assets/flat_router.css");
fn main() {
dioxus::launch(|| {
rsx! {
head::Link { rel: "stylesheet", href: STYLE }
document::Link { rel: "stylesheet", href: STYLE }
Router::<Route> {}
}
})
Expand Down
2 changes: 1 addition & 1 deletion examples/global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fn main() {

fn app() -> Element {
rsx! {
head::Link { rel: "stylesheet", href: STYLE }
document::Link { rel: "stylesheet", href: STYLE }
Increment {}
Decrement {}
Reset {}
Expand Down
2 changes: 1 addition & 1 deletion examples/image_generator_openai.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fn app() -> Element {
});

rsx! {
head::Link { rel: "stylesheet", href: "https://unpkg.com/[email protected]/css/bulma.min.css" }
document::Link { rel: "stylesheet", href: "https://unpkg.com/[email protected]/css/bulma.min.css" }
div { class: "container",
div { class: "columns",
div { class: "column",
Expand Down
2 changes: 1 addition & 1 deletion examples/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fn main() {

fn app() -> Element {
rsx! (
head::Link { rel: "stylesheet", href: STYLE }
document::Link { rel: "stylesheet", href: STYLE }
Router::<Route> {}
)
}
Expand Down
10 changes: 5 additions & 5 deletions examples/meta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ fn app() -> Element {
// You can use the Meta component to render a meta tag into the head of the page
// Meta tags are useful to provide information about the page to search engines and social media sites
// This example sets up meta tags for the open graph protocol for social media previews
Meta {
document::Meta {
property: "og:title",
content: "My Site",
}
Meta {
document::Meta {
property: "og:type",
content: "website",
}
Meta {
document::Meta {
property: "og:url",
content: "https://www.example.com",
}
Meta {
document::Meta {
property: "og:image",
content: "https://example.com/image.jpg",
}
Meta {
document::Meta {
name: "description",
content: "My Site is a site",
}
Expand Down
2 changes: 1 addition & 1 deletion examples/overlay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fn app() -> Element {
_ = use_global_shortcut("cmd+g", move || show_overlay.toggle());

rsx! {
head::Link {
document::Link {
rel: "stylesheet",
href: asset!("./examples/assets/overlay.css"),
}
Expand Down
2 changes: 1 addition & 1 deletion examples/read_size.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fn app() -> Element {
};

rsx!(
head::Link { rel: "stylesheet", href: asset!("./examples/assets/read_size.css") }
document::Link { rel: "stylesheet", href: asset!("./examples/assets/read_size.css") }
div {
width: "50%",
height: "50%",
Expand Down
2 changes: 1 addition & 1 deletion examples/reducer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fn app() -> Element {
let mut state = use_signal(|| PlayerState { is_playing: false });

rsx!(
head::Link { rel: "stylesheet", href: STYLE }
document::Link { rel: "stylesheet", href: STYLE }
h1 {"Select an option"}

// Add some cute animations if the radio is playing!
Expand Down
2 changes: 1 addition & 1 deletion examples/resize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn app() -> Element {
let mut dimensions = use_signal(Size2D::zero);

rsx!(
head::Link { rel: "stylesheet", href: asset!("./examples/assets/read_size.css") }
document::Link { rel: "stylesheet", href: asset!("./examples/assets/read_size.css") }
div {
width: "50%",
height: "50%",
Expand Down
2 changes: 1 addition & 1 deletion examples/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const STYLE: &str = asset!("./examples/assets/router.css");
fn main() {
dioxus::launch(|| {
rsx! {
head::Link { rel: "stylesheet", href: STYLE }
document::Link { rel: "stylesheet", href: STYLE }
Router::<Route> {}
}
});
Expand Down
Loading
Loading