diff --git a/src/app.rs b/src/app.rs
index 96c41ac..266ac2f 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -6,18 +6,19 @@ use yew::{function_component, html, Html};
#[function_component(App)]
pub fn app() -> Html {
- let topografix = move || -> Html {
- html! { {"GPX files"} }
- };
-
html! {
<>
- { "a client-side tool for merging "}{ topografix() }
+ { "a client-side tool for merging "}
+
+ { "gpx files" }
+
@@ -34,41 +35,46 @@ fn footer() -> Html {
let notes = Vec::from([
// note 1
"this has only been tested on GPX files produced by \
- strava and \
- garmin",
+ strava and \
+ garmin",
// note 2
"all third-party extension info \
- \
+ \
is stripped",
// note 3
"if the app breaks, try refreshing the page",
"source (public access): git://pingo.thermokar.st/gpx-web-utils",
// note 4
"source (mirror): \
- \
+ \
https://github.com/thermokarst/gpx-web-utils",
]);
html! {
- { for notes.iter().map(|f| li(f)) }
+ { for notes.iter().map(|n| inner_html_enabled_li(n)) }
+
- { "\u{000A9} matthew ryan dillon, 2021" }
+
+ { "\u{000A9} matthew ryan dillon, 2021" }
+
}
}
-fn li(data: &str) -> Html {
+fn inner_html_enabled_li(data: &str) -> Html {
let li = web_sys::window()
.unwrap()
.document()
.unwrap()
.create_element("li")
.unwrap();
+
li.set_inner_html(data);
+
let node = Node::from(li);
VNode::VRef(node)