diff --git a/musical-leptos/public/styles.css b/musical-leptos/public/styles.css index 0b30a70..f57d6b0 100644 --- a/musical-leptos/public/styles.css +++ b/musical-leptos/public/styles.css @@ -10,7 +10,7 @@ /* ------------------------------------------------------------ */ body { - font-family: sans-serif; + font-family: "Comic Sans MS", "Comic Sans", sans-serif; text-align: center; } @@ -42,11 +42,11 @@ button { margin: var(--size-6); } -body > picture, +body>picture, button { display: block; margin-left: auto; margin-right: auto; text-align: center; margin: 2rem; -} +} \ No newline at end of file diff --git a/musical-leptos/src/components/dancing_lights.rs b/musical-leptos/src/components/dancing_lights.rs index dc58e46..2fd1d86 100644 --- a/musical-leptos/src/components/dancing_lights.rs +++ b/musical-leptos/src/components/dancing_lights.rs @@ -42,11 +42,11 @@ async fn load_media_stream() -> Result { #[component] pub fn DancingLights() -> impl IntoView { // TODO: do this on button click - let (listen, set_listen) = create_signal(0); + let (listen, set_listen) = create_signal(false); // TODO: this is wrong. this runs immediatly, not on first click. why? let start_listening = create_resource(listen, |x| async move { - if x == 0 { + if x == false { return Ok(None); } @@ -87,15 +87,22 @@ pub fn DancingLights() -> impl IntoView { None | Some(Ok(None)) => view! { }.into_view(), - Some(Ok(Some(media_stream_id))) => view! { }.into_view(), + Some(Ok(Some(media_stream_id))) => view! { + }.into_view(), Some(Err(err)) => view! {
Error: {err}
}.into_view(), }} diff --git a/musical-leptos/src/lib.rs b/musical-leptos/src/lib.rs index 9eacff0..0a822d6 100644 --- a/musical-leptos/src/lib.rs +++ b/musical-leptos/src/lib.rs @@ -8,6 +8,7 @@ mod pages; mod wasm_audio; // Top-Level pages +use crate::pages::about::About; use crate::pages::home::Home; use crate::pages::not_found::NotFound; @@ -27,14 +28,17 @@ pub fn App() -> impl IntoView { - // - // - // - // - // - // - - // TODO: figure out how to get the router working on github pages. i thought public url would do it - +
+ + + + + + + + +
} } diff --git a/musical-leptos/src/pages/mod.rs b/musical-leptos/src/pages/mod.rs index 8829694..699d260 100644 --- a/musical-leptos/src/pages/mod.rs +++ b/musical-leptos/src/pages/mod.rs @@ -1,2 +1,3 @@ +pub mod about; pub mod home; pub mod not_found;