File tree Expand file tree Collapse file tree 5 files changed +8
-10
lines changed
examples/router/src/pages Expand file tree Collapse file tree 5 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 11use crate :: { content, generator:: Generated , Route } ;
22use content:: PostPart ;
3+ use std:: borrow:: Cow ;
34use yew:: prelude:: * ;
45use yew_router:: prelude:: * ;
56
@@ -46,7 +47,7 @@ impl Component for Post {
4647 html ! {
4748 <>
4849 <section class="hero is-medium is-light has-background" >
49- <img class="hero-background is-transparent" src=post. meta. image_url />
50+ <img class="hero-background is-transparent" src=Cow :: Owned ( post. meta. image_url. clone ( ) ) />
5051 <div class="hero-body" >
5152 <div class="container" >
5253 <h1 class="title" >
@@ -77,7 +78,7 @@ impl Post {
7778 <article class="media block box my-6" >
7879 <figure class="media-left" >
7980 <p class="image is-64x64" >
80- <img src=quote. author. image_url loading="lazy" />
81+ <img src=Cow :: Owned ( quote. author. image_url. clone ( ) ) loading="lazy" />
8182 </p>
8283 </figure>
8384 <div class="media-content" >
@@ -97,7 +98,7 @@ impl Post {
9798 fn render_section_hero ( & self , section : & content:: Section ) -> Html {
9899 html ! {
99100 <section class="hero is-dark has-background mt-6 mb-3" >
100- <img class="hero-background is-transparent" src=section. image_url loading="lazy" />
101+ <img class="hero-background is-transparent" src=Cow :: Owned ( section. image_url. clone ( ) ) loading="lazy" />
101102 <div class="hero-body" >
102103 <div class="container" >
103104 <h2 class="subtitle" >{ & section. title } </h2>
Original file line number Diff line number Diff line change 11[package ]
22name = " yew-router-macro"
3- version = " 0.14 .0"
3+ version = " 0.15 .0"
44authors = [" Hamza <muhammadhamza1311@gmail.com>" ]
55edition = " 2018"
66license = " MIT OR Apache-2.0"
Original file line number Diff line number Diff line change 11[package ]
22name = " yew-router"
3- version = " 0.14 .0"
3+ version = " 0.15 .0"
44authors = [" Hamza <muhammadhamza1311@gmail.com>" ]
55edition = " 2018"
66license = " MIT OR Apache-2.0"
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ fn component() -> Html {
6161 <a onclick=onclick>{ "click me" } </a>
6262 </>
6363 } ,
64- Routes :: No { id } => html ! { <No id=id /> } ,
64+ Routes :: No { id } => html ! { <No id=* id /> } ,
6565 Routes :: NotFound => html ! { <div id="result" >{ "404" } </div> } ,
6666 }
6767 } ) ;
Original file line number Diff line number Diff line change @@ -30,17 +30,14 @@ slab = "0.4"
3030thiserror = " 1"
3131wasm-bindgen = " 0.2.74"
3232wasm-bindgen-futures = " 0.4"
33- yew-macro = { version = " 0.17 .0" , path = " ../yew-macro" }
33+ yew-macro = { version = " ^0.18 .0" , path = " ../yew-macro" }
3434
3535# optional encodings
3636bincode = { version = " 1" , optional = true }
3737rmp-serde = { version = " 0.15.0" , optional = true }
3838serde_cbor = { version = " 0.11.1" , optional = true }
3939serde_yaml = { version = " 0.8.4" , optional = true }
4040toml = { version = " 0.5" , optional = true }
41- wasm-bindgen = { version = " 0.2.60" , optional = true }
42- wasm-bindgen-futures = { version = " 0.4" , optional = true }
43- yew-macro = { version = " ^0.18.0" , path = " ../yew-macro" }
4441
4542[dependencies .web-sys ]
4643version = " 0.3"
You can’t perform that action at this time.
0 commit comments