From 316560ac1e4832af9d176570207adfa17064347e Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Thu, 9 Dec 2021 10:20:35 -0700 Subject: [PATCH] wip --- src/app.rs | 112 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 66 insertions(+), 46 deletions(-) diff --git a/src/app.rs b/src/app.rs index 2e38532..919fb3d 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1,56 +1,76 @@ use super::loader::Loader; -use yew::{html, Component, Context, Html}; +use web_sys::Node; +use yew::virtual_dom::VNode; +use yew::{html, Html, function_component}; -pub struct App; +#[function_component(App)] +pub fn app() -> Html { + let topografix = move || -> Html { + html! { {"GPX files"} } + }; -impl Component for App { - type Message = (); - type Properties = (); + html! { + <> +

+ { "gpx.thermokar.st" } +

- fn create(_ctx: &Context) -> Self { - Self - } +

+ { "a client-side tool for merging "}{ topografix() } +

- fn view(&self, _ctx: &Context) -> Html { - let topografix = move || -> Html { - html! { {"GPX files"} } - }; + - let garmin = move || -> Html { - html! {{"Garmin"}} - }; +
- let strava = move || -> Html { - html! {{"Strava"}} - }; - - html! { - <> -

- { "gpx.thermokar.st" } -

- -

- { "A client-side tool for merging "}{ topografix() }{ "." } -

- - - -
- -

- { "Note, this has only been tested on GPX files produced by " } - { garmin() }{ " and " }{ strava() }{ " - your mileage may vary." } -

- -

- - { "source (public access): " } - { "git://pingo.thermokar.st/gpx-web-utils" } - -

- - } +