"Ascend"
}
+pub struct HeaderItems {
+ pub left: Vec
+ // Left side of header
+
+
+ // Expanding space in the middle
+
+
+ }
+}
+
+#[component]
+fn Items(items: Vec
+
+
+
+ // Right side of header
+
-
-
+
@@ -44,7 +90,10 @@ fn Ready(data: InitialData) -> impl leptos::IntoView {
let grid_classes = format!("grid grid-rows-{} grid-cols-{} gap-2", data.wall.rows, data.wall.cols);
- view! {
- }
+ view! {
}
})
};
view! {
impl leptos::IntoView {
load_initial_data().await.unwrap()
};
+ let header_items = HeaderItems {
+ left: vec![],
+ middle: vec![HeaderItem {
+ text: "Ascend".to_string(),
+ link: None,
+ }],
+ right: vec![HeaderItem {
+ text: "Edit wall".to_string(),
+ link: Some("/wall/edit".to_string()),
+ }],
+ };
+
leptos::view! {
+ // Left gradient chunk
+
+
+
+
+
+
+
+
+
+
+ // Right gradient chunk
+
+
+ // Left gradient chunk
+
+
+
+
+
+ // Background color gradient
+
+
+
+ // Right gradient chunk
+
+
+
+
+ {holds}
}
+ view! {
+
+
}
}
#[component]
@@ -98,15 +147,13 @@ fn Hold(hold: models::Hold) -> impl leptos::IntoView {
let img = move || {
hold.read().image.as_ref().map(|img| {
let src = format!("/files/holds/{}", img.filename);
- view! {
- "Click hold to replace image"
+{holds}
-
+
@@ -43,7 +57,7 @@ fn Ready(data: InitialData) -> impl leptos::IntoView {
let role = move || current_problem.get().and_then(|problem| problem.holds.get(&hold_position).copied());
let role = Signal::derive(role);
- let cell = view! { };
+ let cell = view! { };
cells.push(cell);
}
@@ -63,7 +77,8 @@ fn Hold(hold: models::Hold, #[prop(into)] role: Signal