diff --git a/.helix/languages.toml b/.helix/languages.toml index 6cbd9aa..710e116 100644 --- a/.helix/languages.toml +++ b/.helix/languages.toml @@ -5,9 +5,8 @@ language-servers = ["rust-analyzer", "tailwindcss-ls"] [language-server.rust-analyzer.config] # procMacro = { ignored = { leptos_macro = ["server"] } } cargo = { features = ["ssr", "hydrate"] } - -[language-server.rust-analyzer.config.check] -command = "clippy" +check = { command = "clippy" } +rustfmt = { overrideCommand = ["leptosfmt", "--stdin", "--rustfmt"] } [language-server.tailwindcss-ls] config = { userLanguages = { rust = "html", "*.rs" = "html" } } diff --git a/crates/ascend/src/app.rs b/crates/ascend/src/app.rs index 8efd20c..1264772 100644 --- a/crates/ascend/src/app.rs +++ b/crates/ascend/src/app.rs @@ -8,7 +8,7 @@ pub fn shell(options: LeptosOptions) -> impl IntoView { use leptos_meta::MetaTags; view! { - +
diff --git a/crates/ascend/src/components/icons.rs b/crates/ascend/src/components/icons.rs new file mode 100644 index 0000000..c4b4f1d --- /dev/null +++ b/crates/ascend/src/components/icons.rs @@ -0,0 +1,51 @@ +use leptos::prelude::*; + +#[component] +pub fn Bolt() -> impl IntoView { + view! { + + } +} + +#[component] +pub fn Wrench() -> impl IntoView { + view! { + + } +} + +#[component] +pub fn Forward() -> impl IntoView { + view! { + + } +} diff --git a/crates/ascend/src/lib.rs b/crates/ascend/src/lib.rs index c3763a9..f24eb19 100644 --- a/crates/ascend/src/lib.rs +++ b/crates/ascend/src/lib.rs @@ -15,7 +15,9 @@ pub mod components { pub mod header; pub mod problem; pub mod problem_info; + pub mod icons; } + pub mod resources { use crate::codec::ron::Ron; use crate::codec::ron::RonEncoded; diff --git a/crates/ascend/src/pages/routes.rs b/crates/ascend/src/pages/routes.rs index 6d322fd..5a317eb 100644 --- a/crates/ascend/src/pages/routes.rs +++ b/crates/ascend/src/pages/routes.rs @@ -30,10 +30,10 @@ pub fn Routes() -> impl IntoView { let wall = crate::resources::wall_by_uid(wall_uid); let problems = crate::resources::problems_for_wall(wall_uid); - let header_items = HeaderItems { + let header_items = move || HeaderItems { left: vec![HeaderItem { text: "← Ascend".to_string(), - link: Some("/".to_string()), + link: Some(format!("/wall/{}", wall_uid.get())), }], middle: vec![HeaderItem { text: "Routes".to_string(), @@ -63,7 +63,10 @@ pub fn Routes() -> impl IntoView { each=problems_sample key=|problem| problem.uid children=move |problem: models::Problem| { - view! {