From 0751a9142b4dce3eb995002a20b56b949326eebf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asger=20Juul=20Brunsh=C3=B8j?= Date: Fri, 28 Mar 2025 13:23:42 +0100 Subject: [PATCH] fix: grid max-height --- crates/ascend/src/pages/wall.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/crates/ascend/src/pages/wall.rs b/crates/ascend/src/pages/wall.rs index 66cabfa..9ceb128 100644 --- a/crates/ascend/src/pages/wall.rs +++ b/crates/ascend/src/pages/wall.rs @@ -177,11 +177,7 @@ fn View() -> impl IntoView { -
- -
Ascend
-
- +
@@ -204,6 +200,8 @@ fn View() -> impl IntoView {
+ +
} } @@ -440,11 +438,12 @@ fn Wall() -> impl IntoView { let style = { let grid_rows = crate::css::grid_rows_n(wall.rows); let grid_cols = crate::css::grid_cols_n(wall.cols); - format!("max-height: 100vh; {}", [grid_rows, grid_cols].join(" ")) + let max_width = format!("{}vh", wall.rows as f64 / wall.cols as f64 * 100.); + format!("max-height: 100vh; max-width: {max_width}; {}", [grid_rows, grid_cols].join(" ")) }; view! { -
+
{cells}
} @@ -464,7 +463,7 @@ fn Hold( crate::tracing::on_enter!(); move || { - let mut class = "bg-sky-100 aspect-square rounded-sm hover:brightness-125".to_string(); + let mut class = "bg-sky-100 max-w-full max-h-full aspect-square rounded-sm hover:brightness-125".to_string(); if let Some(role) = role { let role = role.get();